Toc
Toc
Sl. No Question
5 Define DFA and Design a DFA which accept strings of 0’s and 1’s which when interpreted as a binary integer is multiple of
5. Also give the sequence of states that DFA is in while processing the input string: 1001011.
6 Construct a deterministic finite sate machine for the following language over ∑ ={a,b}
i) L = {W:|W| mod 3>|W| mod 2}
ii) L ={ w ∈(a,b)*: w has even number of a’s and even number of b’s}
L ={w| |w| mod 3=0}
9 Obtain NFA to accept strings of a’s and b’s ending with ab or ba. Convert this NFA to its equivalent DFA
Give DFA’s accepting the following languages over the alphabet {0,1}
a) The set of all strings such that each block of 5 consecutive symbols contains at least two 0’s
b) The set of strings such that the number of 0s is divisible by 5 and the number of 1s is divisible by 3
c)The set of all strings that when interpreted in reverse as a binary integer is divisible by 5 Examples of strings
in the language are 0,10011,1001100
MODULE 2
2 Apply the concept of RE, prove that if L=L(A) for some DFA A, then there is a regular expression R such that
L=L(R)
4 i) Obtain a RE representing strings of a’s and b’s whose length is either even or multiples of 3 or both.
ii) Obtain a RE representing the words with two or more letters but beginning and ending with same letter where
∑= {a,b}
iii) Obtain a RE for Language L={w: string ends with ab or ba where w belongs to (a,b)*.
7 Define CFG. Design CFG for the languages i) L={02n1m | n>=0,m>=0} ii) L={0i1j2k |i=j or j=k}
8 Give DFA’s accepting the following languages over the alphabet {0,1}
a) The set of all strings such that each block of 5 consecutive symbols contains at least two 0’s
b) The set of strings such that the number of 0s is divisible by 5 and the number of 1s is divisible by 3
c)The set of all strings that when interpreted in reverse as a binary integer is divisible by 5 Examples of strings
in the language are 0,10011,1001100
MODULE 3
E-> E * E | E - E
E-> E ^ E | E / E
E-> E + E
E-> (E) | id
A→a|aS|bAA
i)leftmost derivation ii)rightmost derivation iii) parse tree iv)Define Derivation Tree
6 a) State and prove pumping lemma theorem for regular languages. And show that the language L={wwr; wϵ{0,1}*)
is not regular.
b) Show that regular languages are closed under complement and intersection.
7 a) DePine PDA. Design a PDA to accept the following language. L={anbn ; n>=0}. Draw the transition diagram for the
constructed PDA. Show the ID’s for the string aaabbb.
b) Design a PDA to accept the following language. L={WCWr ; w ∈(a +b)*} }. Draw the transition diagram for the
constructed PDA
c) DePine PDA. Design a PDA to accept the following language. L={anb2n ; n>=0}. Draw the transition diagram for
the constructed PDA.
MODULE 4
1 De$ine CNF and explain the rules. Convert the following CFG to CNF. S->aACa A->B/a B->C/c C->cC/ϵ
2 Obtain a PDA to accept L={ anbn | n>=0} Give the transition diagram and show the trace for a string
aaabbb.
3 Simplify for given CFG a) S->AB/AC ,A->aAb/ ϵ,B->bA,C->bCa,D->AB
b) S->aA|aBb|cC,A->aB,B->a|Aa,C->cCD,D->ddd
MODULE-5
1 Design a TM for the language L = { 1n2n3n | n>=1} show that the string 112233 is accepted by ID.
2 a) Design a TM for the language L = { anbn | n>=1} show that the string aaaabbbb is accepted by ID.
3 Apply the TM technique to a) Explain with neat diagram, the working of Turing Machine model. b)
Briefly explain the techniques for the TM construction
4 Apply the TM technique to explain the working principle of Turing machine with diagram. Design a
Turing Machine to accept string formed on {0,1} and ending with 000.Write transition diagram and
ID for w=101000.
5 Explain TM technique to i) Explain Restricted Turing machines.
ii) Write applications of Turing machine