Regular languages and finite automata
Question 1 |
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1*
{[Tex]epsilon [/Tex]} | |
[Tex]phi [/Tex] | |
a* | |
{[Tex]epsilon [/Tex],a} |
Discuss it
L1 L2* U L1* Result of L1 L2* is . {
} indicates an empty language. Concatenation of
with any other language is
. It works as 0 in multiplication. L1* =
* which is {
}. Union of
and {
} is {
}
Question 2 |
Consider the DFA given.

Which of the following are FALSE?
Complement of L(A) is context-free. | |
L(A) = L((11*0+0)(0 + 1)*0*1*). | |
For the language accepted by A, A is the minimal DFA. | |
A accepts all strings over {0, 1} of length at least 2. |
Discuss it
1 is true. L(A) is regular, its complement would also be regular. A regular language is also context free. 2 is true. 3 is false, the DFA can be minimized to two states. Where the second state is final state and we reach second state after a 0. 4 is clearly false as the DFA accepts a single 0.
Question 3 |
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
abaabaaabaa | |
aaaabaaaa | |
baaaaabaaaab | |
baaaaabaa |
Discuss it
See question 2 of http://www.geeksforgeeks.org/automata-theory-set-2/
Question 4 |
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
abaabaaabaa | |
aaaabaaaa | |
baaaaabaaaab | |
baaaaabaa |
Discuss it
See question 2 of http://www.geeksforgeeks.org/automata-theory-set-2/
Question 5 |
Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.
The missing arcs in the DFA are
| |
| |
| |
|
Discuss it
Question 6 |
Definition of a language L with alphabet {a} is given as following.
L={|ank|k>0, and n is a positive integer constant}
What is the minimum number of states needed in DFA to recognize L?
k+1 | |
n+1 | |
2(n+1) | |
2[Tex](k+1)[/Tex] |
Discuss it
See Question 3 of http://www.geeksforgeeks.org/automata-theory-set-4/
Question 7 |



A | |
B | |
C | |
D |
Discuss it
Question 8 |
n-1 | |
n | |
n+1 | |
2n-1 |
Discuss it
Question 9 |
The set of all strings containing the substring 00. | |
The set of all strings containing at most two 0’s. | |
The set of all strings containing at least two 0’s. | |
The set of all strings that begin and end with either 0 or 1. |
Discuss it
Question 10 |
There is unique minimal DFA for every regular language | |
Every NFA can be converted to an equivalent PDA. | |
Complement of every context-free language is recursive. | |
Every nondeterministic PDA can be converted to an equivalent deterministic PDA. |
Discuss it