17
VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK ODD SEMESTER Academic Year: 2016-17 Year & Semester : III / V Section : CSE - 1 & 2 Subject Code : CS6503 Subject Name : Theory of Computation Degree & Branch : B.E C.S.E. Staff in charge : Ms.Shanthi.S & Dr.A.Samydurai S.No QUESTIONS COMPETENCE LEVEL UNIT -1 PART - A 1. Differentiate between DFA and NFA. Understand BTL-2 2. List the operators of Regular Expressions Remember BTL-1 3. Define inductive proof. Remember BTL-1 4. What is a finite automata? Draw the Transitiondiagram and Transition Table. Remember BTL-1 5. Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i) L1=set of strings 0 and 1 ending in 00 (ii) L2=set of all strings 0 and 1 beginning with 0 and ending with 1 Analyze BTL-4 7. Describe what is non-deterministic finite automata and the applications of automata theory Remember BTL-1 8. Illustrate a regular expression for the set of strings over {0,1}that have at least one Apply BTL-3 9. Define Language and Grammar with an example Remember BTL-1 10. Describe an identifier with a transition diagram (automata) Understand BTL-2 11. Define ε-NFA. Remember BTL-1 12. Summarize minimization of DFA Evaluate BTL-5 13. Discuss the notation of DFA Understand BTL-2 14. Illustrate if L be a set accepted by an NFA then there exists a DFA that accepts L Apply BTL-3 15. Explain a finite automaton for the regular expression 0*1*. Evaluate BTL-5

VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603203

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK – ODD SEMESTER

Academic Year: 2016-17

Year & Semester : III / V

Section : CSE - 1 & 2

Subject Code : CS6503

Subject Name : Theory of Computation

Degree & Branch : B.E – C.S.E.

Staff in charge : Ms.Shanthi.S & Dr.A.Samydurai

S.No QUESTIONS COMPETENCE LEVEL

UNIT -1

PART - A

1. Differentiate between DFA and NFA. Understand BTL-2

2. List the operators of Regular Expressions Remember BTL-1

3. Define inductive proof. Remember BTL-1

4. What is a finite automata? Draw the Transitiondiagram and

Transition Table. Remember BTL-1

5. Differentiate between regular expression and regular language Analyze BTL-4

6. Tabulate the regular expression for the following

(i) L1=set of strings 0 and 1 ending in 00

(ii) L2=set of all strings 0 and 1 beginning with 0 and

ending with 1 Analyze BTL-4

7. Describe what is non-deterministic finite automata and the

applications of automata theory Remember BTL-1

8. Illustrate a regular expression for the set of strings over

{0,1}that have at least one Apply BTL-3

9. Define Language and Grammar with an example

Remember BTL-1

10. Describe an identifier with a transition diagram (automata)

Understand BTL-2

11. Define ε-NFA.

Remember BTL-1

12. Summarize minimization of DFA Evaluate BTL-5

13. Discuss the notation of DFA Understand BTL-2

14. Illustrate if L be a set accepted by an NFA then there exists a

DFA that accepts L Apply BTL-3

15. Explain a finite automaton for the regular expression 0*1*. Evaluate BTL-5

Page 2: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

16. Develop a pumping lemma for regular set and what are the

applications of pumping Lemma Create BTL-6

17. Explain L={0

n1

2n/n>=1}is not regular

Analyze BTL-4

19. Illustrate a regular expression for the set of all the strings

have odd number of 1‟s

R.E=1(0+11)* Apply BTL-3

20. Compose the difference between the + closure and * closure Create BTL-6

PART - B

1.

i) Explainif L is accepted by an NFA with ε-transition then

show that L is accepted by an NFA without ε-transition (8)

ii) Construct a DFA equivalent to the NFA.

M=({p,q,r},{0,1},δ,p,{q,s}) Where δ is defined in the

following table.(8)

0 1 p {q,s} {q} q {r} {q,r} r {s} {p} s - {p}

Evaluate BTL-5

2.

i) Demonstrate how thesetL= {abn/n>=1} is not a regular.

(6)

ii) Construct a DFA equivalent to the NFAgiven below:

(10)

0 1

p {p,q} P

q r R

r s -

s s S Apply

BTL-3

3.

(i) Examine whetherthe language=(0n1n/ n>=1)is regularor

not?Justifyyour answer. (6)

(ii) Let L be a set accepted by a NFA then show that there

exists a DFA that accepts L(0)

Remember BTL-1

4.

(i) Summarize a construction of NDFA accepting all string in

{a,b}with either two consecutive “a sort two consecutive

b‟s(8)

(ii) Give the DFA accepting the following language. Set of all

strings beginning with a 1 that when interpreted as a binary

integer is a Multiple of 5.(8)

Understand BTL-2

5. (i) Describethe following: Let L be a set accepted by an Understand BTL-2

Page 3: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

NFA. Then prove that there exists a deterministic finite

automaton that accepts L. Is the conversetrue?Justifyyour

answer.(6)

(ii) Construct DFA equivalent to the NFA given below: (8)

6.

(i) Compose that a language L is accepted by some ε–

NFA if and only if L is accepted by some DFA. (6) (ii) Consider the following ε–NFA. Compute the ε–closure of

each state and find it‟s equivalent DFA. (8)

ε A b C

p

{q {p

Ф

Ф

q

{r

ф

{q

Ф

*r Ф ф ф {r}

Create BTL-6

7.

i) Classify how a language L is accepted by some DFA if L is

accepted by some NFA (6)

(ii) Convert the following NFA to its equivalent DFA.(10)

0 1

p {p,q} {p}

q {r} {r}

r {s} ф

*s {s} {s}

Apply BTL-3

8.

(i) Describe that “A language L is accepted by some DFA if

and only if L is accepted by some NFA(8)

(ii) Construct Finite Automate equivalent to the regular

expression (ab+a)*(8)

Remember BTL-1

9

(i) Describe the construction of NFA with ε-transition from any given regular expression. (6) b) Let A= (Q,∑, δ,q0 ,{qf)be a DFA and suppose that for all a in ∑we have δ(q0,a)=δ(qf, a). Show that if xis a non-empty

Remember BTL-1

Page 4: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

string in L(A),then for all k>0,xkis also in L(A).(10)

10.

(i) Point out the steps in conversion of NFA to DFA and for

the following convert NFA to aDFA (8)

(ii)Discuss on the relation between DFA and minimal DFA(8)

Analyze BTL-4

11.

(i) Tabulate the difference between the NFA and DFA (6)

(ii) Convert the following ε-NFA to DFA(10)

states ε a b C

p Ф {p} {q} {r}

q {p} {q} {r} Ф

*r {q} {r} ф {p}

Remember BTL-1

12.

(i) Describe the extended transition function for NFA, DFA

and ε-NFA. Consider the following ε-NFA for an identifier.

Consider the ε-closure of each state and find it‟s equivalent

DFA(10)

(ii) State the pumping lemma for the regular languages. show

that the set L={0i2

|i>=1}not regular (6)

Understand BTL-2

13. (i) Analyze and Construct a minimized DFA from the regular

expression (x+y)x(x+y)*.Trace for string w=xxyx (8) Analyze BTL-4

1 2 3 4

5 6

8 9

7 1

0

Page 5: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

(ii) Using Pumping Lemma for the regular sets ,prove that the

language ]L={a m

bn|m>n} is not regular(8)

14.

(i) Analyze and Prove that if n is a positive integer such that n

mod 4 is 2 or 3 then n is not a perfect square. (8)

(ii) Construct a DFA that accept the following language

{x€{a,b}:|x|n =odd and :|x|b=even (8)

Analyze BTL-4

UNIT -1I

PART - A

1

Examine the string aaabbabbba for the Grammar G with

S- aB|bA

A a|aS|bAA

B b|bS|aBB Remember BTL-1

2 Defineambiguous grammar and CFG. Remember BTL-1

3 Inferthe set of strings over the alphabet {O} of the

form0nwhere n is not a prime is regular? Prove or disprove

Analyze BTL-4

4 GiveaCFG forthelanguageof palindromestringover {a,b}.Write theCFG forthe language,L=(anbn|≥n) Understand BTL-2

5 Examinethe context free Grammar representing the set of

Palindrome over (0+1)* Remember BTL-1

6 Define parse tree and derivation. Remember BTL-1

7 Demonstratethe grammar is ambiguous

S SS|(S)|S(S)S|E Apply BTL-3

8 Point outthe various types of grammar with example . Analyze BTL-4

9 DiscussL(G)whereG=({S},{0,1},{S->0S1,S->ε},S) Understand BTL-2

10 Describe that id+ id*id can begenerated bytwo distinct leftmost and right most derivation in the grammar E->E+E|E*E| (E)|id

Understand BTL-2

11 Differentiate null production and unitproduction Understand BTL-2

12 Concludethe procedure for converting CNF to GNF with an

example.

Evaluate BTL-5

13 Definethe two normalforms of CFG. Remember BTL-1

14 Compareno useless symbol and NULL production. Analyze BTL-4

15 Illustratesententialforms with an example. Apply BTL-3

16

Show the following grammar into an equivalent one with no

unit productions and no useless symbols

S ABA

A aAA|aBC|bB

B A|bB|Cb

C CC|cC Apply BTL-3

Page 6: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

17

Conclude CFG without null production from:

S a|Ab|aBa

A b|ε

B b|A Evaluate BTL-5

18 Convince your answer of acontext freeGrammar for

thegivenexpression (a+b) (a+b+0+1)* Create BTL-6

19 List the three ways to simplify a context free grammar? What

are the properties of the CFL generated by a CFG? Remember BTL-1

20 DefineGNF and CNF Create BTL-6

PART B

1

(i)Explain and draw the parse tree for the string 1+2*3 given the grammar G=(V, ,R,E)where V={E,D,1,2,3,4,5,6,7,9,0,+,-,*,/,9,)} ={1,2,3,4,5,6,7,8,9,0,+,-,*,/,(,)} where R contains the following rules : E D|(E)|E+E|E-E|E/E D 0|1|2|…9 (8) (ii)Let G=(V,T,P,S) be a Context Free Grammar then prove that if the recursive inference procedure calls tells us that terminal string W is in the language of variable A ,then there is a parse tree with a root A and yield w(8)

Evaluate BTL-5

2

(i)Define Leftmost derivation Let G be a CFG and let Aw .Design a left most derivation of w(8) (ii) Let G be the grammar s0B|1A, A0|0S|1AA, B1|1S|0BB .For the string 00110101, find its leftmost derivation and derivation tree. (8)

Remember BTL-1

3

(i)If G is grammar SSbS|a, expressthat G is ambiguous. (8) (ii)Show that the grammar Sa|abSb|aAb

AbS|aAAb is ambiguous. (8) Understand BTL-2

4

(i)Describe that the following grammars are ambiguous

S aSbS/bSaS/ ε

S AB/aaB,

A a/Aa,

B b (8) ii)If SaSb|aAb, AbSa Aba is the context free grammar. Give the context free

language. (8)

Remember BTL1

5

(i)By Considering the grammar

Remember

BTL1

Page 7: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

EE + E | E*E | (E) | I

I a+b Describe that the grammar is ambiguous and remove the ambiguity. (8) (ii) Discuss in detail about ambiguous grammar and removing

ambiguity from grammar(8)

6

i) Solve the following grammar

S aAa | bBb | BB

A C

B S | A

C S | ε for the string abaaba .Give

a) Left most derivation(4)

b)Right most derivation(4)

c)Derivation Tree(4) d) For the string abaabbba, find the right most derivation. (4) Apply BTL-3

7

(i)Let G=(V,T,P,S)be a context free grammar (CFG).Then Sαif and only if there is a derivation tree for G which yields α.Illustrate the relationship between Derivation and Derivation Trees(8) (ii)Consider the productions: SaB|bA AaS|bAA|a BbS|aBB|b For the string aaabbabbba ,find the leftmost derivation(8)

Apply BTL-3

8

(i)If SaSb|aAb, AbSa Aba is the context free grammar. Analyzethe context free language(8)

(ii)Consider the grammar

EE + E | E*E | (E) | I

I a+b Show that the grammar is ambiguous and remove the ambiguity (8) Analyze BTL-4

9

(i)Give the formal pushdown automata that accepts {wcwR|w

in (0+1)} (8) ii)Convert the following grammar into GNF (8) S XY1/0 x 00X/Y Y 1X1

Understand BTL-2

10

(i)Develop an equivalent grammar G in CNF for the grammar G1 where

G1=({S,A,B},{a,b},{S A SB| ε , A aAS|a,B SbS|A|bb},S)(8)

(i) What is an ambigous grammar ?Explain with an example. (8)

Create BTl-6

Page 8: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

11

Examine the grammar S 0A0/1B1/BB B C B S/A C S/ ε and Simplify using the safe order

(1) Eliminate ε- productions (4) (2) Eliminate unit production(4) (3) Eliminate useless symbols(4) (4) Put ( resultant) the grammar in Chomsky normal

form(4)

Remember BTL-1

12

(i)Give the Chomsky normal form equivalent to the grammar SAB|aB, AbAA|aSa|a BaBB|bS|b(8) (ii) Convert the grammar SAB ABS|b BSA|a into GNF(8)

Understand BTL 2

13

(i)Analyze that For every CFG; there is an equivalent grammar in CNF. (8) (ii)Find a Grammar in CNF equivalent to (8) SaAbB AaA|a BbB| ε

Analyze BTL-4

14.

(i)Define GNF. Compare GNF and CNF. (8)

(ii)Every CGL L can be generated by a CFG G in GNF

Construct a grammar in GNf equivalent to

P={SaSa, S bSb, S aa, S bb}(8)

Analyze BTL-4

UNIT - III

PART A

1. What are the different ways of languages accepted by PDA and

define them? BTL 2 Understa

nd

2.

Summarize PDA .Convert the following CFG to PDA

S aAA , A aS|bS|a.

BTL 2 Understa

nd

3. Define the pumping Lemma for CFLs BTL 1 Rememb

er

4. List the main application of pumping Lemma in CFL’s BTL 1 Rememb

er

Page 9: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

5. Draw an example for PDA BTL 2 Understa

nd

6.

Compare Deterministic and Non deterministic PDA. Is it true that non deterministic PDA is more powerful than that of deterministic PDA? Justify your answer

BTL 2 Understa

nd

7. What is pushdown automaton? BTL 1 Rememb

er

8.

Use the CFL pumping lemma to show how each of these languages not to be context-free

{aibjck| i<j<k}

BTL 5 Evaluate

9. Describe the acceptance of a PDA with empty stack BTL 1 Rememb

er

10. Design equivalence of PDA and CFG BTL 6 Create

11.

Point out the languages generated by a PDA using final state of

the PDA and empty stack of that PDA

BTL 4 Analyze

12. Illustrate the rule for construction of CFG from given PDA BTL 3 Apply

13. Design a PDA for accepting a language{ L=anbn|n>=1} BTL 5 Evaluate

14. What is Instantaneous Descriptions ( ID )? BTL 1 Rememb

er

15.

Construct the languages generated by a PDA using final state

of the PDA and empty stack of that PDA.

BTL 3 Apply

16.

What is the language generated by a PDA using the two

methods of accepting a language?

BTL 4 Analyze

17.

What is additional feature PDA has when compared with NFA?

Is PDA superior over NFA in the sense of language acceptance?

Justify your answer.

BTL 1 Rememb

er

18.

Illustrate what actions take place in the PDA by the transitions

(moves)

δ(q,a,Z)={(p1,γ1),(p2, γ2),…..(pm, γm)} and

δ(q, ε,Z)={(p1,γ1),(p2, γ2),…..(pm,γm)}.

BTL 3 Apply

Page 10: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

What are the different ways in which a PDA accepts the

language?

19. Point out the additional features a PDA has when compared with

NFA

BTL 4 Analyze

20. Formulate the acceptance by final state and by empty stack in PDA

BTL6 Create

PART - B

1.

(i)Discuss about PDA and CFL Prove the equivalence of PDA

and CFL.(8)

(ii)If L is Context free language then prove that there exists

PDA M such that L=N(M). .(8)

BTL 2 Understa

nd

2.

(i)Describe the different types of acceptance of a PDA. Are they

equivalent in sense of language acceptance? Justify your

answer.(8)

(ii)Design a PDA to accept {0n1

n|n>1} Draw the transition

diagram for the PDA. Show by instantaneous description that

the PDA accepts the string „0011‟.(8)

BTL 1

Rememb

er

3.

(i)Define deterministic PDA‟s? Give example for Non –

deterministic and Deterministic PDA.(8)

(ii)Construct a PDA accepting {an b

m a

n / m, n>=1} by empty

stack. Also construct the corresponding context-free grammar

accepting the same set.(8)

BTL 1 Rememb

er

4.

(i)State the Pumping Lemma for CFL and Develop the

language L={ an b

n c

n / n>=1}(8)

(ii)Prove that L is L(M2 ) for some PDA M2 if and only if L is N(M1) for some PDA M(8)

BTL 6

Create

5.

(i)Define Non Deterministic Push Down Automata. Is it true that DPDA and NDPDA are equivalent in the sense of language acceptance is concern? Justify Your answer.(8) (ii)Convert PDA to CFG.PDA is given by P=({p,q},{0,1},{X,Y},δ,q,Z}, δ is defined by δ(p,1,z)={(p,XZ)}, δ(p,ε,Z)={p, ε)}, δ(p,1,X)={(p,XX)}, δ(q,1,X)={(q, ε)}, δ(p,0,X)={(q,X0}

BTL 1 Rememb

er

Page 11: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

δ(q,0,Z)={(p,Z)} (8)

6.

(i)Define PDA. Give an Example for a language accepted

byPDA by empty stack. (8)

(ii)Convert the grammar

S 0S1|A

A 1A0|S| εinto PDA that accepts the same language by the

empty stack .Check whether 0101 belongs to N(M) (8)

BTL 2 Understa

nd

7.

(i)Analyze the theorem: If L is Context free language then prove

that there exists PDA M such that L=N (M). (8) (ii) Prove that if there is PDA that accepts by the final state then there exists an equivalent PDA that accepts by Null State.(8)

BTL 4 Analyze

8.

(i)Recommend. Explain different types of acceptance of a PDA.

Are they equivalent in sense of languageacceptance? Justify

your answer (8) (ii)Show that the language is not context free{0i1j|j=i2} (8)

BTL 5 Evaluatin

g

9.

(i)Examine Construct the grammar for the following PDAM.

M=({q0, q1},{0,1},{X,z0},δ,q0,Z0,Φ) and where δis given by

δ(q0,0,z0)={(q0,XZ0)},δ(q0,0,X)={(q0,XX)},δ(q0,1,X)={(q1,

ε)},δ(q1,1,X)={(q1, ε)},δ(q1, ε,X)={(q1, ε)},

δ(q1, ε, Z0 )={(q1, ε)}. (8)

(ii)Prove that if L is N(M1) for some PDA M1 then L is L(M2 )

for some PDA M2. (8)

BTL 3 Applying

10.

(i)Analyze a PDA that recognizes the language

{ai b

j c

k | i,j,k>0 and i=j or i=k}. (8)

(ii)Discuss about PDA acceptance

1) From empty Stack to final state. 2)From Final state to

Empty Stack

BTL 4

Analyze

11.

Examine and construct a CFG G which accepts N(M), where

M=({q0, q1},{a,b},{z0,z},δ,q0,z0,Φ) and where δis given by

δ(q0,b,z0)={(q0,zz0)}

δ(q0, ε,z0)={(q0, ε)}

δ(q0,b,z)={(q0,zz)}

δ(q0,a,z)={(q1,z)}

δ(q1,b,z)={(q1,ε)

δ(q1,a,z0)={(q0,z0)} Show that anbncn is not context free language i.e. show that the set

of strings of a’ s and b’s and c’s with an equal number of each is

not context free (16)

BTL-1 Rememb

er

Page 12: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

12.

(i)Give PDA to accept the language

L= {a n b n|n>=1}by empty stack and by final stack.

(ii)Construct PDA accepting L={anb3n|n>=1}by empty store

BTL-2 Understa

nd

13.

(i)Show the PDA accepting the language {(ab)n |n>1} by empty

stack (8)

(ii)Construct a Transition table for PDA which accepts the

language L={a2nbn|n>+1}(8)

BTL-3 Apply

14. (i)Explain and Prove Pumping Lemma for CFL(8)

(ii)If L=N(PN)for some PDA PN =(Q,∑,┌,δ,N,qo,Zo) then there is

aPDA PF such that L=L(pF)[From empty stack to final stack](8)

BTL-4 Analyze

UNIT- IV

PART A

1. What is multitape Turing machine? Explain in one move. What

are the actions take place in TM?

BTL 2 Understa

nd

2. What is the Basic Turing Machine model and explain in one

move? What are the actions take place in TM?

BTL 3 Apply

3.

Canyou describe the non-deterministic Turing Machine model.

Is it true the non-deterministic Turing Machine models are more

powerful than the basic Turing Machines? (In thesense of

language Acceptance

BTL 1 Rememb

er

4. List out the hierarchy summarized in the Chomsky hierarchy BTL 4 Analyze

5. What is meant by a Turing Machine with two way infinite tape? BTL1 Rememb

er

6. Define Turing Machine. BTL1 Rememb

er

7. What are the applications of Turing machine? BTL 2 Understa

nd

8. Define LBA. BTL 1 Rememb

er

9. What is the class of language for which the TM has both

accepting and rejecting configuration? Can this be called a

Context free Language.

BTL 2 Understa

nd

10.

Show a TM that accepts the language of odd integers written in

binary.

BTL 3 Apply

11. What are the special features of TM?Define universal Tm .Define Instantaneous description of TM

BTL 5 Evaluate

Page 13: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

12. Define two way infinite Tape TM. BTL 1 Rememb

er

13. Prepare the difference between multi head and multi tape Turing

machine BTL 6 Create

14. Explain what is the class of language for which the TM has both

accepting and rejecting configuration? Can this be called a

Context free Language

BTL 5 Evaluate

15. Draw a transition diagram for a Turing machine to compute n mod 2.

BTL 1 Rememb

er

16. What are the techniques for TM construction? BTL 2 Understa

nd

17. Design how a Turing Machine can be regarded as a computing

device to compute integer functions

BTL 6 Create

18. Differentiate TM and PDA BTL 4 Analyze

19. What is the role of checking off symbols in a Turing Machine? BTL 4 Analyze

20. What Halting Problem? BTL 3 Apply

PART - B

1.

(i)State and describe the Halting Problem for Turing machine(8)

(ii)Design a Turing Machine to accept the language

L={0n

1n /n>=1} Draw the transition diagram (also specify the

instantaneous description to trace the string 0011(8)

BTL 1 Remember

2.

(i)Describe the Chomsky hierarchy of languages (8)

(ii)Explain the programming techniques for the TM construction.(8)

BTL 2 Understand

3.

(i)Discuss TM to accept the language LE={1n 2

n 3

n | n >= 1 }

(8)

(ii)Explain in detail about programming techniques of the TM(8)

BTL 2 Understand

4.

(i)Illustrate the Turing machine for computing f(m, n)=m-n

(proper subtraction). (8)

(ii)Design a Turing Machine to compute f(m+n)=m+n, V

m,n>=0 and simulate their action on the input 0100. (8)

BTL 3 Apply

5. (i)Examine is the role of checking off symbols in a Turing

Machine (8)

BTL 1 Remember

Page 14: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

(ii)Design a Turing Machine M to implement the function

“multiplication” using the subroutine copy (8)

6.

(i)Demonstrate in in detail about Multitape TM with an example (8)

(ii)Prove that if a language is accepted by a multitape Turing machine ,it is accepted by a single-tape TM (8)

BTL 3 Apply

7.

(i)Summarize in detail about Multihead and multitape TM with an

example.(8)

(ii)Construct a Turing Machine that recognizes the language

{wcw / w € {a, b} + } (8)

BTL 5 Evaluate

8. (i)Explain the TM as computer of integer function with an

example (8)

(ii)Design a TM to implement the function f(x)= x+1. (8)

BTL 4 Analyze

9.

(i)Design a TM to accept the set of all strings {0,1} with 010 as substring.(8)

(ii)Write shot notes on Two –way infinite tape TM.(8)

BTL 6 Create

10.

(i)Describe computing a partial function with a TM (8)

(ii)Design a TM to accept the language LE={an bn cn | n > 1 }

(8)

BTL 1

Remember

11.

(i)Define Turing machine for computing f(m, n)=m*n,n€N(8)

(ii)Write notes on Partial solvability .(8)

BTL -1 Remember

12.

(i)Discuss in detail about Multiple tracks TM (8)

(ii)Design a Tm which reverses the given string {abb}.(8)

BTL 2 Understand

13.

(i)Analyze and Construct a TM to compute a function f(w) =W

R where W€{a,b} (8)

(ii)Design a TM to accept the set of all strings {0,1} with 010 as substring (8)

BTL 4 Analyze

14.

(i)Explain in detail about Chomsky hierarchy of languages (8)

(ii)Design a TM with no more than three states that accepts the language. a(a+b) *.Assume €={a,b} (8)

BTL 4 Analyze

UNIT - V

Page 15: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

PART –A

1. Distinguish between PCP and MPCP? What are the concepts used

in UTMs?

BTL 2 Understand

2. Define the language NSA and SA. BTL 1 Remember

3. When a recursively enumerable language is said to be recursive? BTL 2 Understand

4. Compare and contrast recursive and recursively enumerable languages.

BTL 4 Analyze

5. State when a problem is said to be decidable and give an example of an undecidable problem.

BTL 1 Remember

6. Whatis auniversal language Lu? BTL 1 Remember

7.

Is it true that the language accepted by a non-deterministic

Turing Machine is different from recursively enumerable

language?

BTL 5 Evaluate

8. Give two properties of recursively enumerable sets which are undecidable

BTL 6 Create

9. When we say a problem is decidable? Give an example of undecidable problem.

BTL 4 Analyze

10. What are (a) recursively enumerable languages (b) recursive sets? BTL 6 Create

11. Define the classes of P and NP. BTL 1 Remember

12. Is it true that complement of a recursive language is recursive? Justify your answer

BTL 2 Understan

d

13. Give an example for an undecidable problem BTL 1 Remember

14. Compare the three ways to improve MTTF. BTL 4 Analyze

15. Define Primitive Recursive Function BTL 3 Apply

16. Write the Properties of Recursive Languages. BTL 3 Apply

17. When a language is said to be recursively enumerable? BTL 5 Evaluate

18.

Prove that “If P1 and P2 are primitive recursive n-place predicates ,then so are the predicates p1 or p2 ,p1 and p2 ,and not p1

BTL 2 Understan

d

19. Define Time and space complexity of TM. BTL 3 Apply

Page 16: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

20.

Distinguish between PCP and MPCP. What are the concepts used

in UTMs?

BTL 2 Understan

d

PART - B

1.

(i)Describe about the tractable and intractable problems.(8)

(ii)Prove that “MPCP reduce to PCP”(8)

BTL 1 Remember

2.

(i)Describe about Recursive and Recursive Enumerable languages

with example.(8)

(ii)State and explain RICE theorem.(8)

BTL 1 Remember

3.

(i)Summarize diagonalization language.(8)

(ii) Show that the language Ld is not recursive enumerable

language(8)

BTL 2 Understan

d

4.

(i)Discuss post correspondence problem .Let ∑={0,1}.Let A and B be the lists of three strings each ,defined as

Does the PCP have a solution?(10) (ii)Prove that the universal language is recursively enumerable.(6)

List A List B

i wi xi

1 1 111

2 10111 10

3 10 0

BTL 2 Understan

d

5. (i)Explain computable functions with suitable example.(8)

(ii)Explain in detail notes on Unsolvable Problems(8)

BTL 4 Apply

6. (i)Describe in detail notes on universal Turing machines with

example(8)

(ii)Write short notes NP-complete problems(8)

BTL 1 Remember

7. Show that the language L and its complement L‟ are both recursively enumerable then L is recursive (16)

BTL 3 Apply

8.

(i)Conclude problem p2 cannot be solved in polynomial time can be proved by the reduction of a problem p1, which is under class p1

to p2.(8)

(ii)Write short notes on PCP(8)

BTL 5 Evaluate

9. Explain Universal Turing machine and shoe that the universal

language is recursively enumerable but not recursive.(16)

BTL 6 Create

10.

(i)Prepare the recursively Enumerable Language with example.

(ii)Show that the following problem is undecidable. Giventwo

CFGs G1 and G2 is L(G1) L(G2) =∅ (8+8)

BTL 4 Analyze

Page 17: VALLIAMMAI ENGINEERING COLLEGE DEPARTMENT OF …Differentiate between regular expression and regular language Analyze BTL-4 6. Tabulate the regular expression for the following (i)

11.

(i)Show that the characteristic function of the set of all even

numbers is recursive (8)

(ii)Explain in detail notes on primitive recursive functions with

examples(8)

BTL-3 Apply

12. (i)Point out the Measuring and Classifying Complexity(8)

(ii)Does PCP with two lists x=(b,b ab3,ba) and y=(b

3,ba,a) have

a solution(8)

BTL-4

13.

(i)Describe in detail Time and Space Computing of a Turing

Machine(8)

(ii)Show that it is undecidable for arbitrary CFG „S G1 and G2

whether L (G1) L(G2) is aCFL.(8)

BTL-2 Understan

d

14.

(i)Explain in detail Polynomial Time reduction and NP-

completeness.(8)

(ii)Write short notes on NP-Hard Problems.(8)

BTL 1 Remembe

r