Automata Theory Interview Questions & Answers

Automata Theory Interview Questions

Looking for Automata Theory interview questions? Don’t know how to prepare?. Then do not worry, we’ve a right answer for your interview preparation. If you are preparing for automata theory interview and don’t know how to crack interview and what level or difficulty of questions to be asked in interviews then go through Wisdomjobs automata theory interview questions and answers page. Automata Theory is the theory in computer science and mathematics. It is the concept of abstract machines and automata. The study of the mathematical properties of such automata is called automata theory. You can find many variants in this theory and standard one is deterministic finite automation. Please have a look at our Automata Theory job interview questions and answers page to win your interview.

Automata Theory Interview Questions And Answers

Automata Theory Interview Questions
    1. Question 1. What Is The Difference Between The Strings And The Words Of A Language?

      Answer :

      A string is any combination of the letters of an alphabet where as the words of a language are the strings that are always made according to certain rules used to define that language.For example if we take

      Alphabet Σ = { a , b }  Here a , b are the letters of this alphabet.

      As you can see we can make a lot of strings from these letters a and b.

      For example a,b,aa,ab,ba,bb,aaa,aab,aba,baa,…………………… and so on.

      But when we define a language over this alphabet having no a’s and only odd number ofb’s. Then the words of this language would have only those strings that have only odd number of b’s and no a’s.some example words of our defined language are b , bbb , bbbbb , bbbbbbb ,……………………………..and so on.

      So we can say that all the words are strings but all the strings may not be the words of a language. Hence strings are any combination of letters of an alphabet and the words of a language are strings made according to some rule.

    2. Question 2. What Is The Difference Between An Alphabet And An Element Of A Set. Whether Alphabet Is An Element Of A Set Or It Is A Set Itself?

      Answer :

      An Alphabet is a set in itself. The elements of an Alphabet are called letters.

      For example

      Binary Alphabet Σ = {0,1}

      Here 0,1 are the letters of binary alphabet.

      Binary Alphabet is very important because it the Alphabet used by the computer.

      Set of Natural Numbers


      Here 1,2,3……………………………………. are the elements of set of Natural Numbers.

    3. Question 3. What Is Null String (Λ) ?

      Answer :

      The string with zero occurrences of symbols (letters) from ∑.

      It is denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called an empty string or null string.

      The capital lambda will mostly be used to denote the empty string, in further discussion.

    4. Question 4. What Is The Concept Of Valid And Invalid Alphabets ?

      Answer :

      While defining an alphabet of letters consisting of more than one symbols, no letter should be started with any other the letter of the same alphabet i.e. one letter should not be the prefix of another. However, a letter may be ended in the letter of same alphabet i.e. one letter may be the suffix of another.

      Σ= { a , b } ( Valid Alphabet)
      Σ= { a , b , cd } ( Valid Alphabet)
      Σ= { a , b , ac } ( Invalid Alphabet)

    5. Question 5. What Is Algol ?

      Answer :

      ALGOL (ALGOrithmic Language) is one of several high level languages designed specifically for programming scientific computations. It started out in the late 1950’s, first formalized in a report titled ALGOL 58, and then progressed through reports ALGOL 60, and ALGOL 68. It was designed by an international committee to be a universal language. Their original conference, which took place in Zurich, was one of the first formal attempts to address the issue of software portability. ALGOL’s machine independence permitted the designers to be more creative, but it made implementation much more difficult. Although ALGOL never reached the level of commercial popularity of FORTRAN and COBOL, it is considered the most important language of its era in terms of its influence on later language development.

      ALGOL’s lexical and syntactic structures became so popular that virtually all languages designed since have been referred to as “ALGOL – like”; that is they have been hierarchical in structure with nesting of both environments and control structures.

    6. Question 6. What Is Non-determinism And Determinism And What Is The Difference Between Them ?

      Answer :

      Determinism means that our computational model (machine) knows what to do for every possible inputs. Non determinism our machine may or may not know what it has to do on all possible inputs.

      As you can conclude from above definition that Non-Deterministic machine can not be implemented ( used ) on computer unless it is converted in Deterministic machine.

    7. Question 7. What Is Meant By Equivalent Fa’s ?

      Answer :

      FA’s that accept the same set of languages are called Equivalent FA’s.

    8. Question 8. What Is The Difference Between Palindrome And Reverse Function?

      Answer :

      It is to be denoted that the words of PALINDROME are called palindromes.

      Reverse   = w

      Example: Σ={a,b},

      PALINDROME={Λ , a, b, aa, bb, aaa, aba, bab, bbb, …}

      If a is a word in some language L, then reverse (a) is the same string of letters spelled backwards, called the reverse of a.


      reverse (xxx) = xxx
      reverse (623) = 326
      reverse (140) = 041

    9. Question 9. Valid/in-valid Alphabets?

      Answer :

      Any alphabet is valid if any of its letter does not appear in the start of any other letter otherwise it is invalid.

    10. Question 10. What Is Reverse Of A String?

      Answer :

      Alphabet provides only a set of symbols. A string is a concatenation of these symbols. Reverse of the string means to write the string in reverse order. It has no effect on alphabet. Alphabet will remain same.

    11. Question 11. Differentiate Kleene Star Closure And Plus?

      Answer :

      Given Σ, then the Kleene Star Closure of the alphabet Σ, denoted by Σ*, is the collection of all strings defined over Σ, including Λ.

      Plus Operation is same as Kleene Star Closure except that it does not generate Λ (null string), automatically.

      Given Σ, then the Kleene Star Closure of the alphabet Σ, denoted by Σ*, is the collection of all strings defined over Σ, including Λ.

      Plus Operation is same as Kleene Star Closure except that it does not generate Λ (null string), automatically.

      You can use other symbol for alphabet but we are mostly use sigma symbol.

    12. Question 12. Define Regular Expression?

      Answer :

      Regular Expression is the generalized form of any regular language through which you can construct any string related to that language.

      Take an example from your handouts

      L1 = {Λ, a, aa, aaa, …} and L2 = {a, aa, aaa, aaaa, …} can simply be expressed by a* and a+, respectively.

      so a* and a+ are the generalized form of Languages L1, L2.

      And a* and a+ are called the regular expressions (RE) for L1 and L2 respectively.

    13. Question 13. What Is The Concept Of Fa Also Known As Fsm ( Finite State Machine) ?

      Answer :

      FA (Finite Automaton) is a finite state machine that recognizes a regular language. In computer science, a finite-state machine (FSM) or finite-state automaton (FSA) is an abstract machine that has only a finite, constant amount of memory. The internal states of the machine carry no further structure. This kind of model is very widely used in the study of computation and languages.

    14. Question 14. What Is The Difference Between Fa , Tg , Gtg. ?

      Answer :

      In every FA, we mark transitions with single letter of the given alphabet but in TG transitions can be marked with letters or strings (combination of letters).

      In every FA, every state shows transition for all letters of given alphabet but in any TG it is not necessary to show all transition for all letters of given alphabet. In TG, we may or may not show all letter transitions according to requirement. We can also show transitions on reading any strings in TGs but it is not possible in FA’s. In GTG Directed edges connecting some pair of states are labeled with regular expressions . It may be noted that in GTG, the labels of transition edges are corresponding regular expressions. In TG we write strings and in GTG we are bound to write RE. Every FA is also a TG but not every TG is FA.

    15. Question 15. What Is The Difference Between Fa’s And Tg’s .why We Need Tg’s When We Have Fa’s?

      Answer :

      The Transition Graphs (TG) differ from FA in the following areas

      • TG’s are generalizations of FA’s.
      • TG’s can change state without an input ( Null transition).
      • Can read more than one letter (words of the language they are accepting) along the transition edges at a time.
      • Can have a regular expression as a edge label.
      • Can have more then one start state.

      We have been given more freedom in TG’s. But this freedom is on the cost of more memory and processing power it means that if we implement TG’s on computer using some programming language it will need more memory and processing power of computer than used in the implementation of FA’s.

    16. Question 16. What Is The Concept Of The Union Of Fa’s ?

      Answer :

      When we take Union of two FA’s it means that resultant FA’s should accept all the words that were accepted by the two FA’s individually. It is like taking union of two sets, the resultant set contain members of both sets.

      For example

      Let A ={1,3,5,7,9}
      B = {0,2,4,6,8,10}
      then, A U B = { 0,1,2,3,4,5,6,7,8,9,10 }

      you can see that A U B contain elements of both sets similar is the case with FA’s.

    17. Question 17. What Is The Difference Between Is Tg And Gtg ?

      Answer :

      In TG, there are letter transitions for the strings. While in GTG, one can write whole RE as a transition from one state to another one.

    18. Question 18. What Is Difference Between Fa’s And Nfa’s. Are They Opposite To Each Other ?

      Answer :

      FA stands for finite automata while NFA stands for non-deterministic finite automata, In FA there must be a transition for each letter of the alphabet from each state. So in FA number of transitions must be equal to (number of states * number of letter in alphabet).

      While in NFA there may be more than one transition for a letter from a state. And finally every FA is an NFA while every NFA may be an FA or not.

    19. Question 19. Differentiate Between (a,b) And (a+b)?

      Answer :

      (a, b) = Represents a and b.

      (a + b) = Represents either a or b.

    20. Question 20. What Is The Difference Between Gt And Gtg ?

      Answer :

      In TG, there are transitions for the strings. While in GTG, one can write whole RE as a transition from one state to another one.

    21. Question 21. How To Create A Re Of A Particular Language?

      Answer :

      Regular expression is used to express the infinite or finite language, these RE are made in such a way that these can generate the strings of that unique language also for the cross check that the defined RE is of a specified language that RE should accept all the string of that language and all language strings should be accepted by that RE.

    22. Question 22. How Diagrams Of Fa’s Are Created ?

      Answer :

      It depends upon the question how many states involve in a FA. There is not any formal procedure to design FA for a language. This ability just improves with time and practice.

      Every FA is also a TG but not every TG is FA. In every FA, every state shows transition of all letters of given alphabet but in any TG it is not must. In TG, we may or may not show all letters transition according to requirement. We can also show transitions on reading any strings in TGs but it is not possible in FAs.

    23. Question 23. What Is The Difference Between Fa’s ,and Tg’s ?

      Answer :

      There are two or three big differences between FA’s and TG’s.

      In FA there can be maximum one initial or starting state while in TG there may be more than one initial state.

      In FA there can be transition for letters only while in TG transitions from a state to another one can be for strings.

      In FA there must be transition from each state for each letter (deterministic) while in TG there may be no transition for specific letter from a state and there may be more than one path for a string or letter from a state.

    24. Question 24. What Is The Exact Definition Of Fa ?

      Answer :

      Definition: A Finite automaton (FA), is a collection of the followings

      • Finite number of states, having one initial and some (maybe none) final states.
      • Finite set of input letters (Ó) from which input strings are formed.
      • Finite set of transitions i.e. for each state and for each input letter there is a transition showing how to move from one state to another.

    25. Question 25. What Is The Concept Of Nondeterministic Finite Automaton (nfa) ?

      Answer :

      Nondeterminism plays a key role in the theory of computing. A nondeterministic finite state automaton is one in which the current state of the machine and the current input do not uniquely determine the next state. This just means that a number of subsequent states (zero or more) are possible next states of the automaton at every step of a computation. Of course, nondeterminism is not realistic, because in real life, computers must be deterministic. Still, we can simulate nondeterminism with deterministic programs. Furthermore, as a mathematical tool for understanding computability, nondeterminism is invaluable.

      As with deterministic finite state automata, a nondeterministic finite state automaton has five components.

      • a set of states
      • a finite input alphabet from which input strings can be constructed
      • a transition function that describes how the automaton changes states as it processes an input string
      • a single designated starting state
      • a set of accepting states

      The only difference lies in the transition function, which can now target subsets of the states of the automaton rather than a single next state for each state, input pair.

    26. Question 26. If A Language Can Be Expressed In The Form Of Fa Than Why It Is Needed To Use Nfa ?

      Answer :

      NFA stands for non-deterministic FA and this sort of structure has relaxation compared with FA. So it is rather more easy to represent a language using NFA.

      We have methods to convert NFA into FA’s so sometimes it is easier to build NFA of a given language and than convert its NFA into FA using these methods rather than directly building an FA for a language which may be very difficult.

    27. Question 27. How To Made Nfa Corresponding To The Closure Of An Fa ?

      Answer :

      While generating NFA corresponding to closure of an FA one should take care of the null string. Simple way to accept null string is declare initial state, final as well. But in this way a lot of other strings will also be accepted.

      Therefore, accurate way is draw another state. Declare the new state initial as well as final. Connect the new state with the states originally connected with the old start state with the same transitions as the old start state. Newly drawn diagram will be an NFA representing the language closure of the given FA

    28. Question 28. How Moore And Mealy Machine Works In Computer Memory What Is Their Importance In Computing ?

      Answer :

      Mealy & Moore Machines work in computing as incrementing machine & 1’s complement machine etc. These operations as basic computer operations so these machines are very important.

    29. Question 29. What Is The Significance Of Pumping Lemma Ii ?

      Answer :

      The significance of 2nd version of ‘pumping lemma’ is that there are some infinite non regular languages like PALINDROME we can built FA that can accept there certain words but if we increase the length of their words that FA don’t accept these words so by pumping lemma version I it is very difficult to prove them non regular but with the second version we can prove that a language is Non regular even it’s some words may be accepted by some FA’s.

    30. Question 30. Moore And Mealy Machine?

      Answer :

      1. In order to run a string on a Mealy or Moore machine, you can take directions from transition table. Running string on Mealy or Moore machine is similar to running string on a FA. For example, if want to run abba on the machine, take start from initial state. Check what is the transition for a, what state it goes. After that check what is the path of b from that state and so on. In this way you will be able to run whole of the string. Note that there is no final state in Mealy or Moore machine. So there is no case of acceptance or rejection of string. You just have to determine what the output is. I hope that will clear your mind for further clarification please listens to your lecture carefully.
      2. The string is taken for the testing purposes. You can take any sort of string and determine its output using machine.

    31. Question 31. What Is The Difference Between Semiword And Word Please Also Give An Example Regarding This?

      Answer :

      Word: A word is complete combinations of terminals only e.g. abba or ab or a or null string.

      Semiword: A semiword is a string of terminals (may be none) concatenated with exactly one nonterminal on the right i.e. a semi word, in general, is of the following form (terminal)(terminal) ——- (terminal)(nonterminal)

      For example

      aaaaaaB , aabbaaaA , A.

    32. Question 32. What Is The Difference Between Derivation Tree And Total Tree ?

      Answer :

      A Derivation tree is the one that shows how to derive any specific word of the language described by CFG but Total Language Tree shows all words of the Language described by CFG on it.

    33. Question 33. What Does Mean The Language Is Closed?

      Answer :

      When we say that a Language is closed it is always with respect to certain operation.

      A simple example may be that the set of integers is closed under addition. It means when we take two numbers from set of integers say 3, 7 the result of their addition would also be in the set of integers.

      Similarly if the result of an operation on the words of a language results in the word of the same language we say that the language is closed under that operation.

    34. Question 34. What Are The Productions?

      Answer :

      Productions are the grammatical rules and regulations. These rules express the behavior of CFG. Using production in CFG terminals are converted into non-terminals and when all the terminals are converted using productions, a word is acquired.

    35. Question 35. What Is The Difference Between Concatenation And Intersection Of Two Fa’s Also What Is The Difference Among Union Of Two Fa’s And Addition Of Them?

      Answer :

      In intersection of two FA’s only those strings are accepted which are independently accepted by both FA’s, while in concatenation of two FA’s only those strings will be accepted in which first part of string is accepted by first FA and remaining part of string is accepted by the second FA.

      While taking union of two FA’s one can represent it using + sign. So (FA1 U FA2) and (FA + FA2) both are same. There is no difference between them.

    36. Question 36. Is It Possible To Make Cfg For Infix And Post-fix Expression’s Using Derivation Tree ?

      Answer :

      Derivation tree is only used to derive words of language that is described by a CFG. Yes, we can create CFG for languages infix expressions, postfix expressions.

    37. Question 37. What Is The Uses Of Push Down Automata In Computing ?

      Answer :

      PDA is just an enhancement in FAs. i.e Memory is attached with machine that recognizes some language. FA is basic structure for most advanced electronic machines such as computer etc.

    38. Question 38. What Is Difference Between Push Down Stack And Push Down Store ?

      Answer :

      No difference at all. Both terms are used to describe memory structure attached with FAs to store some characters in it.

    39. Question 39. What Is Meant By The Terms Stack Consistence And Input Tape Consistence ?

      Answer :

      Term Stack consistent means we can pop any character from the top of the stack only. PDA should not be able to pop any character other than that is present on the top of the stack.

      Term Tape consistent means we can read only the first letter on the tape not any other letter of the tape after the first one.

    40. Question 40. What Is Unit Production?

      Answer :

      The production in which one non-terminal leads to only one non-terminal.

Automata Theory Related Tutorials

Automata Theory Related Interview Questions

Automata Theory Related Practice Tests

Popular Interview Questions

All Interview Questions

Automata Theory Practice Test

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Automata Theory Tutorial