Practice Set - Short and Long Questions - Automata
Practice Set - Short and Long Questions - Automata
NS, z
PS I1 I2 I3 I4
A - - E,1 -
B C,0 A,1 B,0 -
C C,0 D,1 - A,0
D - E,1 B, - -
E B,0 - C, - B,0
Find out the minimal machine which covers the above machine by using merger graph and
compatibility graph.
NS, z
PS
x=0 x=1
A B,0 A,1
B C,0 D,1
C E,1 A,0
D E,0 C,0
E C,1 E,0
Is the machine described above lossless or lossy? If it is a lossless machine of finite order, find
out the order.
7. Consider the following NFA
Є Є
𝑞0 Є 𝑞1 Є 𝑞2
Є Є
a b a
PS NS
Input x = a Input x = b
q0 q1 q2
q1 q4 q3
q2 q4 q3
*q3 q5 q6
*q4 q7 q6
q5 q3 q6
q6 q6 q6
q7 q4 q6
NS, z
PS
x=0 x=1
A D,0 H,0
B F,1 C,1
C D,0 F,1
D C,0 E,1
E C,1 D,1
F D,1 C,1
G D,1 H,1
H B,1 D,1
11. Design a Finite Automata (FA) that accepts set of all strings over Σ = {a,b} such that every string
ends with abb.
12. Design a Finite Automata (FA) that accepts set of all strings over Σ = {a,b} such that every string
ends with 101.
13. Design a Finite Automata (FA) that accepts set of all strings over Σ = {0,1} such that every string
contains exactly single 1.
14. Determine the regular expression that accepts set of all strings over ∑ = {0, 1} such that number of
1’s is divisible by 3.
15. Construct a Finite Automata equivalent to the Regular Expression
L = ab(a+b)(ab)*b
16. By applying Pumping Lemma prove that
L = {anbn | n >= 1} is not regular.
22. Convert the following CFG into equivalent Chomsky Normal Form:
S → ASB
A → aAS | a | ε
B → SbS | bb
23. Consider the following grammar and prove that it is an ambiguous grammar.
E → E + E | E × E | id
NS
PS x=a x=b
A B E
B C D
*C H I
*D I H
E F G
*F H I
*G H I
H H H
I I I
26. Construct a derivation tree for the string aabbabba for the CFG given by,
S → aB | bA
A → a | aS | bAA
B → b | bS | aBB