21CS1503-TOC-QB
21CS1503-TOC-QB
2. Differentiate between proof by contradiction and proof by contra [BL2] [CO1] [2]
positive.
3. [BL4] [CO1] [2]
Construct DFA which accepts a string that contains second symbol is zero and fourth symbol is 1 over an alphabet ={0
Course Marks
Bloom’s Level
Outcome Allotted
1. write a regular expression for the language which accepts all strings [BL2] [CO1] [2]
with at least two a’s over the set Σ= {a, b}.
2. Show that (ϕ)*= ε for a regular expression. [BL4] [CO1] [2]
3. Construct finite automata for the regular expression (0+1)*1*. [BL3] [CO1] [2]
5. Prove that the complement of a regular language is also regular. [BL2] [CO1] [2]
7. Compute Regular Expression for the given Finite Automata. [BL3] [CO1] [13]
8. Write and explain algorithm for minimization of a DFA. Using the [BL3] [CO1] [13]
above algorithm minimize following DFA.
9. Construct a minimized DFA from the Regular expression (0+1)1(0+1)* [BL5] [CO1] [15]
and trace for a string w=01101.
10. Show that the regular language is closed under: [BL2] [CO1] [13]
a. Union
b. Intersection
c. Kleen closure
d. Complement
1. Derive the string "00101" for rightmost derivation using a CFG given [BL3] [CO2] [2]
by,
SA1B
4. Convert the following CFG to a push down automaton: [BL3] [CO3] [2]
A🡪0A | 1A | 0 | 1.
5. What are the closure properties of CFL? State the proof of any two [BL1] [CO1] [2]
properties.
Descriptive Questions ( 13 /15/16 Marks)
6. i.Solve the following grammar: [BL3] [CO2] [9]
S🡪aAa | bBb | BB
A🡪C
B🡪S|A
C🡪S | є
For the string abaabbba. Find left most, rightmost derivation and
parse tree.
ii. Show that the following gra tommar is ambiguous: [BL4] [CO2] [4]
{S a | S + S | S S | S* | ( S ) }
7. Construct a PDA for language L = {0n+m1n2m | n>=1, m>=1} [BL5] [CO3] [13]
8. i.Construct Push down Automat to recognize the grammar G with [BL4] [CO3] [7]
following production and trace for a string of acceptance and rejection.
S 🡪aSA | ε
A 🡪bB | cc
B 🡪 bd |ε
ii.State pumping lemma for CFL. Use pumping lemma to show that the [BL4] [CO4] [6]
language L = {aibjck | i<j<k} is not a CFL.
9. Construct the PDA for L= {WCWR | W is in (a+b)*} [BL5] [CO3] [13]
10. Give a CFG for the language N (M) where M=({q0,q1},{0,1},{z0,x}, [BL5] [CO3] [15]
δ,q0,z0, φ)where δ is given by ,
δ(q0,1,z0)={(q0,xz0)}
δ(q0,1,x)={(q0, xx)}
δ(q0, 0,x)= {(q1,x)}
δ(q0,ε,z0)={(q0, ε)}
δ(q1,1,x)={(q1, ε)}
δ(q1, 0,z0)={(q0, z0)}
1. Convert the following grammar into an equivalent one with no unit [BL3] [CO2] [2]
productions and no useless symbols:
S ABA
A aAA|aBC|bB
B A|bB|Cb
C CC|cC.
2. State the two normal forms and give an example. [BL1] [CO2] [2]
4. Design a TM that accepts the language of even integers written in [BL3] [CO4] [2]
10. Construct a Turing Machine for multiplying two non-negative integers [BL6] [CO5] [15]
using “copy” subroutine.
UNIT- V - UNDECIDABILITY
Course Marks
PART A ( 2 Marks) Bloom’s Level
Outcome Allotted
2. Let L be a language and L' be its complement. Identify whether the [BL4] [CO6] [2]
given language is recursive or recursively enumerable.
3. Let Σ={0,1}. Let A and B be the lists of three strings each, defined as [BL4] [CO6] [2]
List A List B
I wi xi
1 1 111
2 10111 10
3 10 0
Does this PCP have a solution? Explain?
4. What is Post Correspondence Problem (PCP)? [BL1] [CO6] [2]