Automata Interview Questions and Answers
Question - 11 : - Differentiate Kleene Star Closure And Plus?
Answer - 11 : -
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.
Question - 12 : - Define Regular Expression?
Answer - 12 : -
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.
Question - 13 : - What Is The Concept Of Fa Also Known As Fsm ( Finite State Machine) ?
Answer - 13 : -
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.
Question - 14 : - What Is The Difference Between Fa , Tg , Gtg. ?
Answer - 14 : -
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.
Question - 15 : - What Is The Difference Between Fa’s And Tg’s .why We Need Tg’s When We Have Fa’s?
Answer - 15 : -
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.
Question - 16 : - What Is The Concept Of The Union Of Fa’s ?
Answer - 16 : -
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}
and
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.
Question - 17 : - What Is The Difference Between Is Tg And Gtg ?
Answer - 17 : -
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.
Question - 18 : - What Is Difference Between Fa’s And Nfa’s. Are They Opposite To Each Other ?
Answer - 18 : -
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.
Question - 19 : - Differentiate Between (a,b) And (a+b)?
Answer - 19 : -
(a, b) = Represents a and b.
(a + b) = Represents either a or b.
Question - 20 : - What Is The Difference Between Gt And Gtg ?
Answer - 20 : -
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.