This action might not be possible to undo. Are you sure you want to continue?

Set No. 1

III B.Tech I Semester Supplimentary Examinations, November 2007 THEORY OF COMPUTATION ( Common to Computer Science & Engineering and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Let R={(1, 2), (2, 2), (2, 3)} be a relation on the set {1, 2, 3}, Find R*. (b) Develop a Deterministic Finite Automation accepting the language given over the alphabet {0, 1}. L = {the set of all strings such that every block of ﬁve consecutive contain at least two o’s} (c) Give mathematical deﬁnition of NFA and state main diﬀerences between NFA and DFA. [4+8+4] 2. (a) Construct DFA for the NFA-E Figure 2a shown below.

Figure 2a (b) Construct a Mealy machine equivalent to the Moore machine given by the following table. [8+8] a=0 a=1 Output qi +1 qi +1 q1 q2 1 q3 q2 0 q2 q1 1 q0 q3 1

q0 q1 q2 q3

3. (a) Construct FA equivalence to the following regular expression r = ((0 + 1(1 + 01)∗ 00)∗ (b) Give the regular expressions accepted by following FA. Figure 3 [8+8]

1 of 2

Code No: RR310504

Set No. 1

Figure 3 4. (a) Construct regular grammar G generating the regular set a∗ b(a + b)∗ . (b) Deﬁne CFG and give examples. What is CFL generated by the grammar S → abB, A → aaBb, B → bbAa, A → E [8+8] 5. Construct a context free grammar which accepts N(A) where A is ({q0 , q1 , q2 }, {a, b, c}, {a, b, z0 }, δ , q0 , z0 , q2 ) where δ is given by δ (q0 , a, z0 ) = (q0 , az 0 ) δ (q0 , b, z0 ) = (q0 , bz 0 ) δ (q0 , a, a) = (q0 , aa) δ (q0 , b, a) = (q0 , ba) δ (q0 , a, b) = (q0 , ab) δ (q0 , b, b) = (q0 , bb) δ (q0 , c, z0 ) = (q1 , z0 ) δ (q0 , c, a) = (q1 , a) δ (q0 , c, b) = (q1 , b) δ (q1 , a, a) = (q1 , ∈) δ (q1 , b, b) = (q1 , ∈) δ (q1,∈ , z0 ) = (q2 , z0 )

[16]

6. Construct Turing machine to accept following language and give its state transition table and diagram. Check the machine by tracing a suitable instance. L = { an bm : n≥ 1 and n = m}. [16] 7. Construct LR(0) items for the grammar given, ﬁnd its equivalent DFA. Check the parsing by taking a suitable derived string. S → E E → E + T |T [8+8] T → a | (E) 8. (a) Deﬁne P and NP problems, give some examples for these problems. (b) Explain why PCP with two lists x = (01,1,1) y = (0101,10,11) has no solution. What is modiﬁed PCP problem? [6+10] ⋆⋆⋆⋆⋆

2 of 2

Code No: RR310504

Set No. 2

III B.Tech I Semester Supplimentary Examinations, November 2007 THEORY OF COMPUTATION ( Common to Computer Science & Engineering and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. Deﬁne NFA mathematically. Explain its signiﬁcance and function. Convert the given Finite automaton into its Deterministic equivalence. Explain method used. Taking suitable example and prove both accept the same string. Figure 1 [16]

Figure 1 2. (a) Deﬁne NFA- ∈ transitions and write the diﬀerences between NFA- and ordinary NFA. (b) Find NFA without ∈ for the following Figure 2b

Figure 2b (c) Construct state transition table for the following Moore machine. Figure 2c [4+4+8]

1 of 3

Code No: RR310504

Set No. 2

Figure 2c 3. (a) Construct the NFA for the regular expression r = 0*1 ((0+1)0*1)* (∈+(0+1) (00)*)+0(00)* (b) Consider the FA and construct regular expressions that is accepted by it. Figure 3 [8+8]

Figure 3 4. (a) For the following ﬁnite state automata construct equivalent grammar. Figure 4a

Figure 4a (b) What is meant by ambiguous grammar? Test whether the grammar is ambiguous or not. S → ABA, A → aA/∧ , B → bB/∧ [8+8] 5. (a) Obtain a PDA to accept the language {L = an b2n / n ≥ 1}. (b) Convert the following grammar to GNF S → Ba/ab A → aAB/a B → ABb/b

[8+8]

6. (a) Explain how a “RAM computer” can be simulated using Turing Machine.

2 of 3

Code No: RR310504

Set No. 2

(b) Design a Turing machine to multiply two integers. Taking this as a block given the block diagram to ﬁnd factorial of an integer. [6+10] 7. (a) Deﬁne the ‘Handler’. For the derivation aabb ﬁnd the viable preﬁxes of the grammar shown below. S′ → S S → aS b|ab (b) When an item is said to be complete, ﬁnd the sets of LR(0) items. [8+8]

8. (a) Diﬀerentiate NP complete and NP hard problems. Explain NP complete and NP Hard problems with some examples. (b) What is undecidability? Explain PCP and modiﬁed PCP in detail. ⋆⋆⋆⋆⋆ [8+8]

3 of 3

Code No: RR310504

Set No. 3

III B.Tech I Semester Supplimentary Examinations, November 2007 THEORY OF COMPUTATION ( Common to Computer Science & Engineering and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. For the state transition table given ﬁnd the state transition diagram. Check whether the string 00101011 is accepted or not. Determine equivalent DFA and check for the same string and prove both are equivalent. q0 is the initial state and q2 is the ﬁnal state. [8+8] q/Σ 0 q0 {q0 , q1 } q1 {q1 , q2 } q2 φ q3 {q0 , q3 } 1 {q1 } {q2 } {q0 , q2 } {q3 }

2. For the NFA- ∈ given check whether the string aannanan is accepted or not, If accepted write the transition path. Find the equivalent NFA without epsilon transitions, explain the procedure used and check the string given on your new NFA. Figure 2 [16]

Figure 2 3. (a) Construct FA equivalence to the following regular expression r = 10+(0+11)0*1 (b) Describe a pumping lemma. What are its applications? (c) Consider the transitions system. What type of strings are accepted by it. Figure 3 [6+6+4]

Figure 3 1 of 2

Code No: RR310504

Set No. 3

4. (a) Construct a Finite automata recognizing the following regular grammar. S→ aS / bA / b A→ aA / bS / a (b) Generate CFG for the language L = {an bm : n = m} 5. (a) Construct PDA to accept the CFG and verify by a suitable example. S → aABC A → aB / C B → bA / b C→a (b) Convert the following grammar to GNF S → AA / a A → SS /b [8+8]

[8+8]

6. Construct Turing machine to accept following language and give its state transition table and diagram. Check the machine by tracing a suitable instance. L = { an bn an bn / n ≥ 1}. [16] 7. Construct LR(0) items for the grammar given, ﬁnd its equivalent DFA. Check the parsing by taking a suitable derived string. λ is null. E → T E′ E′ → + T E′ | λ T → F T′ [8+8] T′ → ∗F T′ |λ F → id 8. (a) Deﬁne P and NP problems, give some examples for these problems. (b) Explain why PCP with two lists x = (01,1,1) y = (0101,10,11) has no solution. What is modiﬁed PCP problem? [6+10] ⋆⋆⋆⋆⋆

2 of 2

Code No: RR310504

Set No. 4

III B.Tech I Semester Supplimentary Examinations, November 2007 THEORY OF COMPUTATION ( Common to Computer Science & Engineering and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) “If a Language L is accepted by an NFA then there will be a DFA which accepts same L”. Prove or explain with algorithm. (b) Determine the DFA equivalent to the following NFA and by taking suitable example prove that both will accept or reject the same set of strings. Figure 1 [8+8]

Figure 1 2. (a) Constance state Transition Table for the Moore machine given in Figure 2a below.

Figure 2a (b) Construct Moore machine for the Melay machine in Figure 2b

1 of 3

Code No: RR310504

Set No. 4

Figure 2b (c) Construct a minimum automation equivalent to a given automation. [4+6+6] α q0 q1 q2 q3 q4 A q1 q2 q3 q4 q0 b q2 q3 q4 q4 q0 Output 0 0 1 0 0

3. (a) Construct the NFA for the regular expression r = 0*1 ((0+1)0*1)* (∈+(0+1) (00)*)+0(00)* (b) Consider the FA and construct regular expressions that is accepted by it. Figure 3 [8+8]

Figure 3 4. (a) Construct regular grammar G generating the regular set a∗ b(a + b)∗ . (b) Deﬁne CFG and give examples. What is CFL generated by the grammar S → abB, A → aaBb, B → bbAa, A → E [8+8] 5. (a) Convert the following to GNF E → E + T/T

2 of 3

Code No: RR310504 T → T * F/F F → (E)/a

Set No. 4

[8+8]

(b) Construct PDA generating all odd palindromes over string {a, b, c}.

6. (a) What is delta of a Turing Machine, explain functions involved in a move of Turing Machines in detail. (b) Design Turing Machine to accept even palindromes derived from the input {a, b}. Give its Transition table and diagram also. [6+10] 7. Construct LR(0) items for the grammar given, ﬁnd its equivalent DFA. Check the parsing by taking a suitable derived string. S → E E → E + T |T [8+8] T → a | (E) 8. (a) Deﬁne P and NP problems, give some examples for these problems. (b) Explain why PCP with two lists x = (01,1,1) y = (0101,10,11) has no solution. What is modiﬁed PCP problem? [6+10] ⋆⋆⋆⋆⋆

3 of 3

- r05320403 Microwave Engineering
- r05320305 Design of Machine Members II
- r05320205 Switchgear and Protection
- Rr322305 Immunology
- r5 402 Mba Management of Technology Set1
- 42 Mca Nr Programming in Java
- 41 Mca or Software Engineering
- r6 42 Mca Advanced Java Programming Set1
- r5 401 Mba Strategic Management Set1
- 43-Mca-Or-Design and Analysis of Algorithm
- 41 Mca Nr Software Engineering
- r6 43 Mca Data Warehousing and Mining Set1
- r5 401 Mba Strategic Management Set1
- 43-Mca-Or-Design and Analysis of Algorithm
- 41 Mca Nr Software Engineering
- r6 43 Mca Data Warehousing and Mining Set1
- r5 305 Mba Retailing Management Set1
- Or 32 Mcacomputer Communication Networks
- Nr 302 Mba Cost and Management Accounting Set1
- Nr-35-Mca-Design and Analysis of Algorithm
- r6 34 Mca Management Information Systems Set1
- r5 304 Mba Enterprise Resource Planning
- Or 34 Mca Management Information Systems
- Nr 305 Mba Retailing Management Set1
- Nr 31 Mca Database Management Systems

Sign up to vote on this title

UsefulNot useful- Rr310504 Theory of Computation
- lec02-lexicalanalyzer
- Tutorial 1
- Menu_634822649264479612_CS5101 Formal Languages and Automata Theory Tutorial
- A 1803050106
- Minimization of Dfa
- mc0082 set2 killer assignment 2012
- 9A05407 Formal Languages and Automata Theory
- Jflap Manual and Exercises-
- Lect Slides
- Infocom-vsdfa
- Design & Analysis of Algorithm June 2012 NEW
- String Theory in R
- Regex
- Answer Chapter 3 Cfg Ed 4
- 9_cfl1
- Compiler-Report.docx
- chap07
- context free grammar
- Interview Questions
- DComp5
- Sedbook
- automata theory
- Doc en SystemMonitoring
- lp
- Packt Publishing - Modern Python Cookbook.pdf
- The CYK Algorithm
- System Software Jan 2010
- Chapter 8 Strings
- Writing Web Applications With Go
- Rr310504 Theory of Computation