18CS54
18CS54
Module-1
1 a. Define the following terms with examples :
i) Alphabet ii) String iii) Language iv) Concatenation at Languages
v) Power of an Alphabet. (10 Marks)
b. Define DFSM. Design DFSM
i) To accept strings having Even number of a’s and even number b’s
Important Note : 1. On completing your answers, compulsorily draw diagonal cross lines on the remaining blank pages.
OR
2 a. Convert the following NDFSM of DFSM. [Refer Fig Q2(a)].
Module-2
3 a. Define Regular Expression. Write RE for the following Languages. (10 Marks)
i) Strings of 0’s and 1’s ending with three consecutive zeroes.
ii) Strings of a’s and b’s having substring aa.
b. Write DFSM to accept intersection of Languages L1 = (a + b)*a and L2 = (a + b)*b (10 Marks)
OR
4 a. Using Kleen’s theorem, prove that for any Regular Expression R, their exits a finite
automata M = (Q, Σ, δ, q0, F) which accepts L(R). (10 Marks)
b. State and prove pumping Lemma for Regular Languages. Show that the Language
L = {wwr : w (0, 1)*} is not regular. (10 Marks)
1 of 2
18CS54
Module-3
5 a. Define Context Free Grammar. Design CFG for the following Languages.
i) L1= {w : |w| Mod 3 = 0} over Σ = {a}
ii) L2 = {anb mck : m = n + k } over Σ = {a, b, c} (10 Marks)
b. Define Ambiguity. Consider the grammar
E → E + E | E * E | (E) | id
Find Leftmost and Rightmost derivations and parse tree for the string id + id * id, show that
the grammar is ambiguous. (10 Marks)
OR
6 a. What is Chomsky Normal Form of CFG? Convert the following grammar to CNF.
S ABC |BaB
A aA | BaC | aaa
B bBb |a| D
C CA | AC
D→
Eliminate - productions, Unit productions and useless symbols if any before conversion.
(10 Marks)
b. What is NPDA? Design NPDA for Language L = {anbn | n ≥ 1}. Draw transition diagram.
Write sequence of moves made by NPDA to accept the string aaabbb. (10 Marks)
Module-4
7 a. Design TM for WCWR over Σ = {0, 1}. Write transition diagram, and ID for w = 101C101
(14 Marks)
b. Explain : i) Multitape ii) Non-deterministic TM (06 Marks)
OR
8 a. Define Turning Machine. Explain the working of Turning Machine. (06 Marks)
b. Design Turning machine to accept the Language L {0 1 2 n 0} . Draw the transition
n n n
diagram. Write sequence of moves made by TM for string 001122. (14 Marks)
Module-5
9 a. Explain Halting problem in Turning machine. (07 Marks)
b. Write applications of Turning Machine. (06 Marks)
c. Explain Recursively Enumerable Languages. (07 Marks)
OR
10 a. Explain Quantum Computers. (07 Marks)
b. Explain P and NP classes. (07 Marks)
c. Explain Church Turning Thesis. (06 Marks)
*****
2 of 2