Professional Documents
Culture Documents
P ABCD
A aA | cC | oD | iC
B ov | ovC
C id | id-D | ɛ
D0|1|2|3|4|5|6|7|8|9
CFG-1
Find out if the above mentioned CFG is ambiguous or not, and give proper
justification. You may use “covid-19” as input string to test the ambiguousness.
(b) Consider the following CFG-2 and answer the following questions. [4]
X QRP
Q vR | vP
R acc | accPP | at | atPP
Pi|n|o|ɛ
CFG-2
Use LMD and RMD to produce “vaccination” from the above CFG-2.
Q3. (a) Draw NFA from the following regular expressions. [3]
+ +
i. 0 (0 U 1) 1
ii. A(B+D)C | PQ*R
(b) Convert the following NFA in Fig.1 into a DFA using subset construction method. [5]
“The bad news is time flies. The good news is you’re the pilot” - Michael Altshuler
Best of luck