Académique Documents
Professionnel Documents
Culture Documents
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
Figure 1:
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]
www.andhracolleges.com
1 a aaa
2 abaaa ab
3 ab b
⋆⋆⋆⋆⋆
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 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]
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]
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
⋆⋆⋆⋆⋆
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
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]
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
(a) G2 is unrestricted
(b) G2 is context free
(c) G2 is regular. [6+6+4]
⋆⋆⋆⋆⋆
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]
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 Figure 2:
Figure 3:
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]
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]
⋆⋆⋆⋆⋆