0% found this document useful (0 votes)
30 views

Toc

Uploaded by

shivu.asrj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Toc

Uploaded by

shivu.asrj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MODULE 1

Sl. No Question

1 a. Define the following terms:


i) Alphabet ii) power of an alphabet iii) Strings iv) Language

2 Explain relations on the String

3 Construct the DFA’s for the following languages over ∑ = {a,b}

i) The set of all strings ending with abb


ii) The set of all strings not containing the substring aab
The set of all strings that either begins or ends or both with the substring ab

4 Construct the DFA’s for the following languages over ∑ = {a,b}

i) L = {w: w ends either with ab or ba}

ii) L ={awa| w ∈(a +b)*}

L ={w: na (w)>=1, nb (w)=2}

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}

7 Define NDFSM. Convert the following NDFSM to DFSM.

i) Compute the ε-closure of each state


ii) Convert the automations to a DFA.
8 What are distinguishable and indistinguishable states. Minimize the following DFSM.

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

1 Convert the regular expression (0+1)*011(0+1) to NDFSM

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)

3 Design i) role of Lexical Analyzer.


ii) Specification of Token, Recognition of Token

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)*.

5 Show that L={(ab)n | n>=0} is not regular.

6 Convert the regular expression (0+1)+011(0+1)* to NDFSM

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

9 Use Min DFSM algorithm to minimize m given below

10 Convert below diagram its equivalent DFSM

11 Obtain NDFSM for given RE (a* union ab)(a Union b)*

MODULE 3

1 Define CFG. Design CFG for the languages

a)L={anb2n where n>=1}

b)L={anbmcmdn where n and m>=1}

c)L={am+n bm cn where n and m>=1}


2 Is the following grammar is ambiguous? And check for the string ibtibtaea
S iCtS|iCtSeS|a
C b

3 Connvert the following ambiguous grammar into unambiguous grammar.

E-> E * E | E - E
E-> E ^ E | E / E
E-> E + E
E-> (E) | id

4 Let G be the grammar


S→aB|bA

A→a|aS|bAA

B→b|aS|aBB for the string aaabbabbba find a

i)leftmost derivation ii)rightmost derivation iii) parse tree iv)Define Derivation Tree

5 Explain Closure properties of regular languages.

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

4 Covert CFG to CNF, S->ASB/ ϵ, A->aAS/a,B->SbS/A/bb


5 Elimination of Useless symbols S-> aS/A/B,A-> a,B-> aa,C-> aCb
6 Explain The Pumping Lemma for Context-Free Languages
7 ST a) L={a^n b^n c^n/n>=1} is not context Free.
b) L= {ap/P is prime number} is not context Free.
c) L= {ww/w ϵ {0,1}* is not context Free.

8 Explain closure properties of CFL with example.

9 Explain with example


a) Removing useless symbols b) Removing nullable production and c) Removing Unit production.

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

6 a) Explain with neat diagram different variants of TM.


b) Explain formal definition with tuples of TM
c) Explain Programming Techniques for Turing Machines.
7 Design a Turing Machine to accept string formed on {0,1} .Write transiEon diagram and ID for
w=10011.

8 a)Explain Language That Is Not Recursively Enumerable

b)Explain an Undecidable Problem That Is RE

You might also like