0% found this document useful (0 votes)
23 views13 pages

Aec Toc

Annapoorana Engineering College is an autonomous institution approved by AICTE and affiliated with Anna University, Chennai, with various accreditations including NAAC 'A' Grade. The document includes a series of questions and exercises related to automata theory, regular expressions, and context-free grammars, structured into units with parts A, B, and C. It covers topics such as finite automata, regular languages, and pushdown automata, aimed at assessing students' understanding of theoretical computer science concepts.

Uploaded by

aecsaranyadurai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views13 pages

Aec Toc

Annapoorana Engineering College is an autonomous institution approved by AICTE and affiliated with Anna University, Chennai, with various accreditations including NAAC 'A' Grade. The document includes a series of questions and exercises related to automata theory, regular expressions, and context-free grammars, structured into units with parts A, B, and C. It covers topics such as finite automata, regular languages, and pushdown automata, aimed at assessing students' understanding of theoretical computer science concepts.

Uploaded by

aecsaranyadurai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

ANNAPOORANA ENGINEERING COLLEGE

(An Autonomous Institution)


(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

UNIT I
AUTOMATA

Q.No. PART – A CO BTL

1. __________Numbers of states require to accept string ends with 10.


CO1
a) 3 b) 2 c) 1 d) can’t be represented

2. String X is accepted by finite automata if ______ CO1


a) δ*(q,x) E A b) δ(q,x) E A c) δ*(Q0,x) E A d) δ(Q0,x) E
3. Languages of a automata is_______ CO1
a) If it is accepted by automata b) If it halts
c) If automata touch final state in its life time d) All language are
4. Finite automata requires minimum _______ number of stacks. CO1
a) 1 b) 0 c) 2 d) None of the mentioned
5. How many DFA’s exits with two states over input alphabet {0,1} ? CO1
a) 64 b) 24 c) 32 d) None of the mentioned

6. NDFA Stands for____________________________ CO1


a) Non Determining Finite Automata b) None Deterministic Finite
Automata c) Non Deterministic First Automata d) Non Deterministic
Finite Automata
7. The basic limitation of finite automata is that it can’t remember CO1
arbitrary large amount of information.
a) False b) True c)can’t say d) None of the mentioned
8. Extended transition function is CO1
a) Q * Σ* -> Q b) Q * Σ -> Q c) Q* * Σ* -> Σ d) Q * Σ -

9. FSM with output capability can be used to add two given integer in CO1
binary representation.
a) False b) True c)can’t say d) None of the mentioned
10 There are ________ tuples in finite state machine. CO1
a) 4 b) 5 c) 6 d) unlimited
Q.No. PART – B

1. Illustrate the induction principle? CO1 K3

2. Describe an identifier with a transition diagram CO1 K2


ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

3. Define the term epsilon transition CO1 K2

4. State the difference between NFA&DFA. CO1 K2

5. Design FA which accepts odd number of 1’s and any number of 0’s CO1 K3

Q.No. PART – C

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


NFA if and only if L is accepted by some DFA.
ii)Consider the following ε–NFA. Compute the ε–closure of each
state and find it‟ s equivalent DFA.
1. K6
ε a b C
p ф {p} {q} {r}
q {p} {q} {r} ф
*r {q} {r} ф {p}
i)Construct the DFA to recognize odd number of 1’s and CO1
2. even number 0’s K1
ii)Construct the DFA over {a,b} which produces not more
than 3 a’s
3. (i) Poin tout the steps in conversion of NFA to DFA and for the CO1 K4
following convert NFA to a DFA

(ii) Infer the following to a regular expression.(6)

0 1
q q
q
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

0 0,1

Infer the DFA which is accepting the following language over the CO1
alphabet{0,1}.The set of all the strings beginning with a1 that
4. when interrupted as a binary integer , is multiple of 5, For example K4
strings 101,1010 and 1111 are in the language 0,100 and 111 are
not

Rewrite the basic approach to convert from NFA to regular CO1


5. K6
expression. Illustrate with an example
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

UNIT 2
REGULAR EXPRESSIONS AND LANGUAGES

Q.No. PART – A CO BTL

1. In case of regular sets the question is ‘ L1 subset or equal to L2’?


CO2
a. Decidable b. Can’t say
c. Un decidable d. trivially decidable
2. Let r and s are regular expressions denoting the languages R and S. Then CO2
(rs)denote
a. R * b. R S c. R + d. R U S
3. L= {an bn an | n = 1 , 2 , 3, - - - - } is an example of a language that is CO2
a. not context free and complement is also not CF b. not context free
c. context free and whose complement is not CF d. context free
4. 1 + 01 =____________ CO2
a. ε + 0 b. ( ε + 0 ) 1 c. 1 01 d. 1 ( ε + 0 )
5. Pick the correct statement The logic of pumping lemma is a good example CO2
of
a. iteration b. divide and conquer
c. the pigeon hole principle d. recursion
6. The regular expression 0*(10*)* denotes the same set as CO2
a. 1*0)*1 b. 0+(0+10)* c. 0+1)*10(0+1)* d. None of the above
7. ---- Denotes all strings of 0,s and 1, s. CO2
a. 0 1 b. ( 0 + 1) * c. ( 0 + 1) d. 0 * 1
8. Let r, s, t are regular expression s. Φ * = CO2
a. { Φ } b. Φ c. ε d. { ε }
9. A grammar is a ___________device CO2
a. acceptor b. generative c. cognitive d. can’t say
10 The minimum number of states in the NFA accepting the language CO2
(ab+abc)* is ---------------
a. 9 b. R 3 c. R 2 d. 4
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

Q.No. PART – B

1. List the operators of Regular Expressions CO2 K1

2. What are the closure properties of regular languages? CO2 K2

3. Illustrate a regular expression for the set of all the strings have odd CO2
K3
number of 1’sR.E=1(0+11)*

4. Compose the difference between the +closure and * closure CO2 K4

5. Find out the language generated by the regular expression(0+1)*. CO2 K5

Q.No. PART – C

CO2

Construct N DFA for given RE using Thomson rule.


i)(a+b)*ab
1. K6
ii)(a.b)*
iii)(a+b)

2. Demonstrate how the set L={a n b^m | m,n>=1} is not a regular. CO2 K2

i)Deduce in to regular expression that denotes the language CO2


accepted by following DFA.(7)

1 0 0,1
1 2

3.
ii)Evaluate the equalities for the following RE and prove for the
same (
a. b+ab*+aa*b+aa*ab*
b. a*(b+ab*).
c. a(a+b)*+aa(a+b)*+aaa(a+b)*
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

4. CO2 K4
Point out about the regular expression and regular Language.
5. CO2 K6
Develop the procedure for minimizing DFA with example

UNIT 3
CONTEXT FREE GRAMMAR AND LANGUAGES

Q.No. PART – A CO BTL

1. A CFL for which every CFG is ambiguous is said to be an ambiguous-----


CO3
CFL.
a) inherently b) inequal c) implicitly d) Explicitly
2. The following CFG S-> aB |bA, A-> b| aS |bAA , B->b| bS |aBB CO3
Generates strings of terminals that have
a) equal number of a’s and b’s
b) even number of a’s and even number of b’s
c) odd number of a’s and even number of a’s
d) odd number of a’s and odd number of b’s

3. Context free languages are closed under ”union” is CO3


a) can’t say b) False c) True d) True or False
4. A regular set accepted by DFA with n states is accepted to final state by a CO3
DPDA with n states and at least ---------------- pushdown symbols
a) 1 b) 2 c) 4 d) 5
5. A PDA behaves like an FA when the number of auxiliary memory it has CO3
is
a) 1 or more b) 0 c) 3 or more d) 2 or more
6. A PDA behaves like as FA when the number of auxiliary memory it has CO3
is
a) 0 b) 1 c) 2 d) None
7. A grammar G is known to have GNF representation then CO3
a) G can’t be written left or right linear
b) G may be written as left linear or right linear
c) We can write G as left linear
d) We can write G as left linear or right linear
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

8. CFL‟s are closed under CO3


a) Union and complementation b) concatenation & intersection
c) Substitution & homomorphism d) inverse homomorphism &
complementation
9. Deterministic push down automaton : CO3
a) CFL b) DCFL c) Recursively enumerable language d) RL
10 Which of the following is accepted by an NPDA and not DPDA CO3
a) All strings in which a given symbol is present at least twice
b) String ending with a particular alphabet
c) Even palindromes
d) All strings in which a given symbol is present at least thrice

Q.No. PART – B

1. Summarize PDA. Convert the following CFG to PDA S aAA , CO3 K2


A aS|bS|a.
2. Define ambiguous grammar and CFG CO3 K1

3. Examine the context free Grammar representing the set of Palindrome CO3
K2
over (0+1)*

4. Define Chomskian hierarchy of language. CO3 K1

5. Define GNF. CO3 K1

Q.No. PART – C

CO3
i)Illustrate a PDA for the language{WCWR/W€{0,1}}.
1. K3
ii)Illustrate a CFG for the constructed PDA.

i)Let P be a PDA with empty stack language L=N(P) and CO3


suppose that ε is not in L. Design how you would modify P so
2. that it accepts L U { ε} by empty stack.. K6

(ii) Design a PDA for even length palindrome.

3. i)Convert the following CFG to PDA and analyze the answer CO3 K4
(a+b) and a++. (8)
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

I->a|b|Ia|Ib|I0|I1

E->I|E+E|E*E|(E)

ii) Convert the following CFG to PDA by empty stack.

S ->0S1/A;

A->1A0/S/εInferwhether0101belongsto N(M).

Construct a equivalent grammar G in CNF for the grammar G1 CO3


4. where G1=({S,A,B},{a,b},

{S->ASB/£,A->aAS/a,B->SbS/A/bb},S).

Convert the following grammar G into Greibach Normal Form CO3


5. S->XA\BB B->b\SB

X->b, A->a

UNIT 4
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

TURING MACHINES AND PUSHDOWN AUTOMATA

Q.No. PART – A CO BTL

1. The class of TM is equivalent to the class of CO4


a) Type 0 b) Type 3 c) Type 1 d) Type 2
2. The LBA is a variant of CO4
a) PDA b) FA c) TM d) NFA
3. Turing machine that halts CO4
a. recursive language b. CFL
c. Recursively enumerable language d.CSL
4. A Turing machine computes by going from one configuration to another. CO4
We say that configuration C1 yields configuration C2 if the Turing
machine can legally move from C1 to C2 in
a) two steps b) a finite number of steps
c) an infinite number of steps d) a single step
5. Any TM with m symbols and n states can be simulated by another TM CO4
with just 2 symbols and less than
a. 8mn states b. 4mn + 8 states c. 8mn +4 states d. mn states

6. Which automata is associated with context sensitive language ? CO4


a. turing machine b. finite automata c. PDA d. LBA

7. LBA is _ _ _ _ CO4
a. unrestricted TM b. restricted TM from one side
c. restricted TM fromboth sides d. can't say
8. Set of all Turing machines is CO4
a. uncountable b. countable but infinite c. finite d. void 1

9. If there exits a language L for which there exits a TM, T that accepts every CO4
word in L and either rejects or loops for every word that is not in L is said
to be
a. recursive b. recursively enumerable
c. NP-HARD d. NPCOMPLETE
10 Which of the following is true : Read Write head can move CO4
a. to the left of left end marker in LBA
b. to the right of left end marker in LBA
c. to the right of right end marker in LBA d. it can't move 1
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

Q.No. PART – B

1. Design equivalence of PDA and CFG. CO4 K6

2. Point out the languages generated by a PDA using final state of the PDA CO4 K4
and empty stack of that PDA
3. Discuss the applications of Turing machine. CO4 K2

4. Express the techniques for TM construction. CO4 K2

5. Differentiate TM and PDA. CO4 K4

Q.No. PART – C

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


equivalent in sense of language acceptance? Justify your
answer.
1. K1
ii)Design a PDA to accept {0n1n|n>1}.Draw the transition
diagram for the PDA and identify the instantaneous
description(ID)of the PDA which accepts the string‘0011.

(i)Define Non Deterministic Push Down Automata. Is it true CO4


that D PDA and N DPD A are equivalent in the sense of
language acceptance is concern? Justify Your answer.
(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)},
2. K1
δ(p,ε,Z)={p,ε)},

δ(p,1,X)={(p,XX)},

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

δ(p,0,X)={(q,X0}

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

3. (i)Design a TM to accept the set of all strings {0,1} with 010 CO4 K6
as substring.
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

(ii)Write shot notes on Two–way in finite tape TM.

(i)Describe computing a partial function with a TM. CO4


4. K1
(ii)Design a TM to accept the language L E={anbncn|n>1}.(7)

(i) Design and explain a TM to compute f(m,n) = m*n , for all CO4
m,n€ N.
5. K4
(ii) Explain how a multi track in a TM can be used for testing
given positive integer is a prime or not.

UNIT 5
UNDECIDABILITY

Q.No. PART – A CO BTL

1. What version of a problem is used to determine if it is NP hard


CO5
a. worst case solution b. decision problem
c. optimal solution problem d. optimal value problem
2. The class of unrestricted language corresponds to CO5
a. PDA b. TM c. LBA d. FA
3. Recursive enumerable languages are also known as languages. CO5
a. type 0 b. type 1 c. type 3 d. type 2
4. Which of the following is not primitive recursive? CO5
a. Addition b. LCM c. division d. Ackerman‟s function
5. Find the odd man out CO5
a. State entry problem b. Blank tape halting problem
c. Post correspondence problem d. The hating problem of TM
6. ‟MPCP is un decidable problem ‟is----------- CO5
a. True b. true or false c. False d. can‟t say
7. If NP!= coNP then CO5
a. NP!= P b. P=coNP c. P!= coNP d. NP=P
8. Let B be a LBA .Then grammar corresponding to L(B) is CO5
a. CFL b. CSL
c. regular grammar d. Unrestricted grammar

9. MPCP stands for CO5


a. many posts correspondence problem
b. many posts correspondence problem
c. modified posts correspondence problem
ANNAPOORANA ENGINEERING COLLEGE
(An Autonomous Institution)
(Approved by AICTE, New Delhi and Affiliated to Anna University, Chennai)
Accredited by NAAC with 'A' Grade & Accredited by NBA (Civil, CSE & EEE)
2(f) & 12(B) Status as per UGC Act 1956
ISO 9001:2015 Certified Institution
NH-47, Sankari Main Road, Periyaseeragapadi, Salem-636308, Tamil Nadu.
www.aecsalem.edu.in

d. merged posts correspondence problem

10 The complement of recursive is______________


CO5
a. recursive b. neither recursive nor non recursive
c. non recursive d. recursive or non
Q.No. PART – B

1. Distinguish between PCP and MPCP? What are the concepts used in CO5 K2
UTMs?
2. Define NP hard and NP completeness problem. CO5 K1

3. Describe an example of an undecidable problem CO5 K1

4. Point out the properties of recursive and recursive enumerable CO5 K4


Language.
5. Explain about tractable problem. CO5

Q.No. PART – C

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

1.
example. K1
(ii)Collect and write the short notes on NP-complete
problems.

Explain about the recursively Enumerable Language with CO5


2.
example. K4
Point out that the following problem is un decidable. Given

two CFGs G1 and G2 is L(G1)L(G2) =∅.
Describe in detail Polynomial Time reduction and NP- CO5
3. completeness. K1
List out the short notes on NP-Hard Problems.

4. Prove that the universal language is recursively enumerable CO5 K6


but not recursive. Generalize your answer.
Plan and explain on decidable and un-decidable problems CO5
5.
with an example K6
Design and prove that for two recursive languagesL1and L2
their union and intersection is recursive

You might also like