Sie sind auf Seite 1von 9

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 1


III B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. For the following state transition table draw the state transition diagram. Find its
equivalent machine. For the string abbaaab test whether both give same result or
not. q0 is the initial state and q3 is the final state.
q/Σ 0 1
q0 q1 q2
q1 q1 q1 q3 [16]
q2 φ φ
q3 q0 q3 q3
2. (a) Construct the Moore machine for given Melay machine.
State / I a B Output
q0 q1 Q2 1
q1 q1 Q1 0
q2 q1 q0 1
(b) Minimise the Finite automation given below and show both the given and the
reduced one are equivalent.
State / Σ a b

www.andhracolleges.com
q0 q0 q3
q1 q2 q5
q2 q3 q4
q3 q0 q5
q4 q0 q6
q5 q1 q4
q6 q1 q3
[6+10]
3. (a) Construct Finite automaton to accept the regular expression (0 + 1)∗ (00+11)
(0 + 1)∗ .
(b) Find the regular expression accepted by following deterministic Finite automa-
ton. Figure 1 [8+8]
4. (a) Construct regular grammar G generating the regular set a∗ b(a + b)∗ .
(b) Define 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 grammar to Chomsky Normal form
S → ∼ S /[S ⊃S] /p/q
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 1

www.andhracolleges.com
Figure 1:

(b) Obtain the PDA to accept the language


L={w/w∈ (a,b)* and na (w)>nb (w)<nb (w)} [8+8]

6. (a) Give tuple definition of Turing Machine and explain the significance of move-
ment of R/W head.
(b) Design Turing Machine to recognize the language L= { an bn / n ≥ 1}. [6+10]

7. (a) ‘Every context free language is not a context sensitive.’ Why? Discuss with
the help of productions.
(b) What do you mean by prefix property of DCFL.
(c) Discuss the concept of viable prefix with a suitable example. [6+6+4]

8. (a) What do you mean by “ reduction”? Explain the Turing reducability.


(b) Find the solution for PCP problem given below. [8+8]
List A List B
i Wi Xi

www.andhracolleges.com
1 a aaa
2 abaaa ab
3 ab b

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 2


III B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. Define NFA mathematically. Explain its significance and function. Convert the
given Finite automaton into Deterministic. Explain the method used. Taking
suitable example prove both accept the same string. Figure 1

Figure 1:

[16]
2. (a) Construct DFA for the NFA-E Figure 2 shown below.

www.andhracolleges.com Figure 2:

(b) Construct a Mealy machine equivalent to the Moore machine given by the
following table.
a=0 a=1 Output
qi +1 qi +1
q0 q1 q2 1
[8+8]
q1 q3 q2 0
q2 q2 q1 1
q3 q0 q3 1
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
3 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 2


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]

www.andhracolleges.com Figure 3:

4. (a) Obtain the regular grammar to accept the strings containing even number of
zeroes.
(b) Give the CFG to generating the following sets
The set of palindromes over alphabet {a, b} [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

www.andhracolleges.com
δ (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. (a) Why the Languages accepted by Turing machine are called “recursively enu-
merable languages”. Explain atleast two properties of r.e. languages.
(b) Design Turing machine to find square of a given integer. [6+10]

7. Write short notes on:

(a) DCFL and DPDA


Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
3 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 2


(b) LR(k) grammar
(c) C.S. languages. [6+6+4]

8. (a) Show or explain that PCP is decidable for words over a one symbol alphabet.
(b) Explain the Halting problem of Turing machine, Discuss why this problem is
undecidable. [8+8]

www.andhracolleges.com
⋆⋆⋆⋆⋆

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
3 ofUSA-UK-Australia-Germany-France-NewZealand
3 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 3


III B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) Define a NDFA and explain how an equivalent DFA is obtained from NDFA.
(b) Construct an equivalent DFA for a NDFA M=({q1 , q2 , q3 , }, δ, q1 , {q3 }) where
δ is given by
δ(q1 ,0) = {q2 , q3 }, δ(q1 ,1) = {q1 }
δ(q2 ,0) = {q1 , q2 ), δ(q2 ,1) = φ
δ(q3 ,0) = {q2 }, δ(q3 ,1) = {q1 , q2 }. [8+8]

2. (a) Explain the procedure to convert NFA- ∈ to ordinary NFA, and apply the
same for the following figure 1.

www.andhracolleges.com
(0 + 1)∗ .
Figure 1:

(b) Design Moore and Mealy machines which converts a ternary number into
Residue Modulo 5. [8+8]

3. (a) Construct Finite automaton to accept the regular expression (0 + 1)∗ (00+11)

(b) Find the regular expression accepted by following deterministic Finite automa-
ton. Figure 2 [8+8]

4. (a) Find the regular grammar that represents the following DFA. Figure 3
(b) Find and also derive the
i. Leftmost derivation
ii. Rightmost derivation
iii. Derivation tree for the grammar G string abababa. Without using left
most or rightmost derivation, which is in L(G), where G is S → SbS/a
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 3

www.andhracolleges.com
Figure 2:

Figure 3:

[8+8]
P
5. (a) Construct a PDA to accept the language L = { w/w (a, b)∗ , na (w) = 2nb
(w)}
(b) Enumerate the properties of CFL. Explain any two of them. [8+8]

6. (a) Explain the procedure involved in the design of Turing Machine.


(b) Design Turing Machine to recognize the following.
i. To find out proper substraction of two integers.

www.andhracolleges.com
ii. To recognize L = L(0* 1). [4+12]

7. Construct LR(0) items for the grammar given, find 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. Let G1 and G2 be grammars with G1 is regular. Is the problem L(G1 ) = L(G2 )


decidable when

(a) G2 is unrestricted
(b) G2 is context free
(c) G2 is regular. [6+6+4]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 4


III B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) Prove or explain with the help of algorithm that “Every NFA will have an
equivalent DFA.
(b) Find DFA equal to NFA described by following state transition table, initial
state= p, F={q, s}
Initial State = P, F = {q, s}
0 1
p q,s q
q r q,r
r s p
s - p
[8+8]

2. (a) Explain the procedure to convert NFA- ∈ to ordinary NFA, and apply the
same for the following figure 1.

www.andhracolleges.com Figure 1:

(b) Design Moore and Mealy machines which converts a ternary number into
Residue Modulo 5. [8+8]

3. (a) Construct FA equivalence to the following regular expression


r = 01[((10)∗ + 111)∗ +0]*1
(b) Construct the regular expression accepted by following finite automaton. Fig-
ure 2 [8+8]

4. (a) For the following Finite State automata construct an equivalent grammar.
Figure 3
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR310504 Set No. 4

www.andhracolleges.com Figure 2:

Figure 3:

(b) Generate CFG for the language


L = {an bm : n < m} [8+8]

5. (a) Obtain a PDA to accept strings of balanced parenthesis and verify by a suitable
example.
(b) Convert the following grammar to CNF
S → bA / aB

www.andhracolleges.com
A → bAA / aS /a
B → aBB / bS / b [8+8]

6. (a) Explain the types of Turing Machines.


(b) Design a Turing Machine to accept L = {ww R / w ∈ (0+1)*}. [6+10]

7. (a) ‘Every context free language is not a context sensitive.’ Why? Discuss with
the help of productions.
(b) What do you mean by prefix property of DCFL.
(c) Discuss the concept of viable prefix with a suitable example. [6+6+4]

8. (a) Is concept of universal gates like Nor and Nand and the universal Turing
machine same. Explain the UTM in detail.
(b) What is modified version PCP? Show or explain that if the PCP is decidable
then modified PCP is also decidable. [8+8]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information

Das könnte Ihnen auch gefallen