Professional Documents
Culture Documents
MODEL QP Set-3
MODEL QP Set-3
:
SET
3
δ a b c ε
→p {p} {q} {r} ϕ
q {q} {r} ϕ {p}
*r {r} ϕ {p} {q}
12. A(i) Design a FA from given regular expression 10 + (0 + 11)0* 1. A (8) CO2
A(ii) Show that L={0n10n|n≥1} is not regular. S (8) CO2
(OR)
12. B Construct a minimized DFA that can be derived from the following U (16) CO2
regular expression 0*(01)(0/111)*
13. A(i) Let G be a grammar S→0B | 1A, A→0 | 0S | 1AA, B→1 |1S | 0BB. U (8) CO3
For the string 00110101 find its leftmost derivation and derivation tree.
A(ii) Show that the language L= { 02 i /i ≥ 1 } is not a context free grammar A (8) CO3
(OR)
13. B(i) Convert the following to Greibach Normal Form. S (8) CO3
S → a | AB, A→a | BC, B→b,C→b.
B(ii) Find the CNF Grammar for the following grammar S (8) CO3
S→AB/aB
A→aab/ε
B→bbA
14. A Construct a CFG accepting L= {am bn | n<m} and construct a PDA A (16) CO4
accepting L by empty stack.
(OR)
14. B(i) Design a TM to recognize all strings that has an even number of 1’s or S (6) CO4
accept that the language L={1n | n is even}.
B(ii) Draw a Turing machine to find 2’s complement of a binary number. A (10) CO4
15. A(i) Let ∑ = {0,1} A and B be the lists of three strings each defined as. S (8) CO5
List A ( wi ) List B (wi )
1. 1 111
2 10111 10
3 10 0
Does this PCP have a solution?
15. A(ii) Show that the language Lu is recursively enumerable but not recursive. S (8) CO5
(OR)
15. B Explain Class P and NP with an example. R (16) CO5