Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
www.andhracolleges.com
1. Construct NFAs for the following languages
(a) The set of strings over alphabet {0,1,.........,9} such that the final digit has
appeared before.
(b) The set of strings over alphabet {0,1,........,9} such that the final digit has not
appeared before.
(c) The set of strings of 0’s and 1’s such that there are two 0’s separated by a
number of positions that is a multiple of 4. Note that 0 is an allowable multiple
of 4. [4+4+8]
2. For the following NFA with ∈ -moves convert it in to an NFA with out ∈ -moves
and show that NFA with ∈-moves accepts the same language as shown in figure 2.
[16]
www.andhracolleges.com
{0,1}*.
Figure 2
3. Find a Regular expression corresponding to each of the following subsets over
www.andhracolleges.com
(b) Prove that the following language is not context-free language
L = {www |w ∈ {a, b}∗ } is not context free. [8+8]
7. Define Turing machine formally; explain how Turing machine can be used to com-
pute integer functions. Design the Turing machine to compute following function,
Show its transition diagram also f(x,y)=xy where x and y are positive integers
represented in unary. [16]
8. Give LR(0) items for the grammar S→aAB, A→aAb/ab, B→aB/a. Find its equiv-
alent DFA. Check the parsing by taking a suitable string. [16]
⋆⋆⋆⋆⋆
www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List
www.andhracolleges.com
1. Construct NFAs for the following languages
(a) The set of strings over alphabet {0,1,.........,9} such that the final digit has
appeared before.
(b) The set of strings over alphabet {0,1,........,9} such that the final digit has not
appeared before.
(c) The set of strings of 0’s and 1’s such that there are two 0’s separated by a
number of positions that is a multiple of 4. Note that 0 is an allowable multiple
of 4. [4+4+8]
www.andhracolleges.com Figure 2
3. Construct a DFA accepting language represented by 0*1*2*.
4. (a) Obtain regular grammar for the following FA as shown in figure 4a.
[16]
Figure 4a
(b) What is the language accepted by above FA? [2×8]
6. (a) Find the PDA with only one state that accepts the language {am bn : n > m }
(b) Construct the PDA that recognizes the languages L={x=×R : x∈{a,b}+ }.
www.andhracolleges.com
[8+8]
7. Design a T.M for copying of information from one place to the other place. Assume
all the necessary. Assumptions. Give Example of the working of your T.M. [16]
⋆⋆⋆⋆⋆
www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List
www.andhracolleges.com
1. (a) Design a DFA that accepts the set{an }U {b/n ≥ 1}
(b) Draw the transition diagram for below FA.
M= { {A,B,C,D}, {0,1}, δ,C, {A,C} }
δ (A,0) = δ (A,1) = {A,B,C}
δ(B,0) = B, δ(B,1) = { A, C }
δ (C,0) = {B,C}, δ(C,1) ={ B, D }
δ (D,0) = { A, B, C, D }
δ(D,1) = {A}.
www.andhracolleges.com Figure 2a
Convert the above to its equivalent DFA?
(b) Describe the language accepted by automata as shown in figure 2b. [8+8]
Figure 2b
3. Find a Regular expression corresponding to each of the following subsets over
{0,1}*.
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List
www.andhracolleges.com
4. (a) Obtain a CFG to generate unequal number of a’s and b’s.
(b) Obtain a CFG to obtain balanced set of parentheses.(i.e every left parentheses
should match with the corresponding right parentheses). [2×8]
www.andhracolleges.com
A→aBB/a,
B→bBB/A
Construct the PDA that accepts the language generated by this grammar G.
(b) Define Deterministic pushdown automata. Explain with an example. [8+8]
8. What are NP-complete and NP-hard problems? Explain them with examples.[16]
⋆⋆⋆⋆⋆
www.andhracolleges.com
1. Construct DFA for the following:
(a) L={w/w has both an even number of 0’s and even number of 1’s }
(b) L= { w/w is in the form of ‘x01y’ for some strings x and y consisting of 0’s
and 1’s}.
2. (a) Design a Moore Machine to determine the residue mod 4 for each binary string
treated as integer.
(b) Design a Mealy machine that uses its state to remember the last symbol read
and emits output ‘y’ whenever current input matches to previous one, and
[2×8]
(a) Figure 3a
www.andhracolleges.com
(b) Figure 3b
Figure 3a
Figure 3b
4. (a) Obtain a regular grammar to obtain the set of all strings not containing three
consecutive 0’ s.
(b) Obtain a CFG to generate the set of all strings over alphabet {a ,b} with
exactly twice as many a’s as b’s. [2×8]
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List
www.andhracolleges.com
(c) State in English about the language corresponding to below given grammar
S→aB/bA, A→a/aS/bAA , B→b/bS/aBB. [8+5+3]
6. (a) Find the CFG corresponding to PDA whose transition mapping is as follows:
δ(S,a,×)=(s,A×)
δ(S,b,A)=(s,AA)
δ(S,a,A)=(s, ∧).
(b) Let G be a CFG that generates the set of palindromes given by
S→aSa/bSb/a/b
Find the PDA that accepts L(G). [8+8]
8. (a) Explain about Deterministic context free language and Deterministic PDA.
(b) Show that L={an bn cn : n >= 1} is a CSL. [8+8]
⋆⋆⋆⋆⋆
www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List