0% found this document useful (0 votes)
4 views

automata pyq[1]

The document outlines various tasks related to automata theory and computation, including designing pushdown automata (PDA) for specific languages, constructing Turing machines for multiplication in unary notation, and proving properties of recursive languages. It also includes questions on the halting problem, NP-completeness, and grammar transformations. Additionally, it specifies exam instructions, including the structure of the examination and the allocation of marks.

Uploaded by

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

automata pyq[1]

The document outlines various tasks related to automata theory and computation, including designing pushdown automata (PDA) for specific languages, constructing Turing machines for multiplication in unary notation, and proving properties of recursive languages. It also includes questions on the halting problem, NP-completeness, and grammar transformations. Additionally, it specifies exam instructions, including the structure of the examination and the allocation of marks.

Uploaded by

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

30. a.

Design a PDA to accept the strings of language L = {aflbflcmd m In & m > O} and trace the
strings abbcd, aabbcccddd using instantaneous description.
I Reg. No. I I I I I I I I I I I I I I I I
(OR) B.Tech. DEGREE EXAMINATION, JANUARY 20'23
b. Construct a PDA for the language L ={ww R I WE {a, I}} using empty stack.
Fifth Semester

CSI013 -THEORY OF COMPUTATION


31. a. Constmct a TM that will do multiplication of two numbers M and N which are represented (For the candidates admitted during the academic year 2013 --- 2014 and 2014 - 2015)
in unary notation. Note:
(i) Part - A should be answered in ONm_ sheet within first 45 minutes and OMR sheet should be handed
(OR) over to hall invigilator at the end of 45 111 minute.
(ii) Part - B and Part - C should be answered i11 answer booklet.
b. Define universal Tllring machine Lu and prove that it is recursively enumerated but not
recursIve.
Time: Three Hours Max. Marks: 100
32. a. i. Prove that the union of two recursive language is recursive and union of two recursively
enumerable language is also recursive. (4 Marks)
~ART - A (20 x 1 = 20 Marks)
Answer ALL Questions
1. A grammar G = (V,T, P,S) is called regular i:f its production rules ofthc form
n. Explain
(A) A~ocwhereAEV,aE(VUT)* (B) A~BifA,BEV
(I) P-typc problem (4 Marks)
(C) A~aB, A~a (or) A~Ba; A~a (D) 2AB~yp
(2) NP-complete problem (4 Marks)

2. The transition [-u nction for the detel111inistic finite automata is


(OR)
b.i. Detine halting problem with example. (4 Marks)
(A) 0: Q x L. -> Q (8) 0: Q x L. ~ 2Q
(C) b' : Q --> Q x L. CD) /): 2Q --::; Q x L.
J 3
11. Does PCP with 2 lists x = (b,bab ,ba) and y = (b ,ba,a) have a selection? Justify.
(8 Marks) 3. Pumping lemma is based on
(A) Pigeon hole principle (B) Mathematical induction
***** (C) Counting principle (D) Contradiction method

4. Which one is true?


(A) (a+b)* =c/'+b* (B) (ab)" = c/'b'!'
(C) (ah)'" = (ha)" (D) (a*/' == a*

5. The language generated by the grammar G = { {S}, {a, b}, P : S ~ aSb lab, {S}}
(A) (abt (8) {allbll:n;?:O}

(C) {aI/btl: n;?: I} CD) {bna fl : 11;?: I}

6. Which symbol can be used to extent NF A by allowing transition on an empty input?


(A) <p (8) £
(C) s (D) I
7. In a CFG, 'G' if the production mles are of the form A~aocJ then it is known as (where,
A E V,a E T,a E V*)
(A) CNF (B) GNF
(C) PDA CD) TM

Page 4 of 4 04JF5CSI013 Page 10f4 04.JF5CSI013


8. In CNF a string length 'n' will need ____ number of derivation steps PART - B (5 x 4 = 20 Marks)
(A) 2n -I (steps) (B) 2n + 1 Answer ANY FIVE Questions
(C) 2n (D) n
21.
9. An E NFA+ stack is known as
. 11·
Prove th e to . mat hematIca
OWIng USIng . 1·In ductlOn
. 12 + 2 2 + ....... + n-? = n(n + 1)(2n + 1) .
6
(A) Finite state machine (B) Context free grammar
(C) Turning machine (D) Push down automata 22. Construct a regular expression over L = {O, I} in which all words do not contain two
consecutive O's.
10. Which language does push down automata accepts?
(A) Regular language (B) Context-sensitive language 23. JustifY whether the given grammar is ambiguous or not.
(C) Context free language (D) Unrestricted grammar S -t aB IbA
A -> a I as I bAA
ll. Is non-deterministic push down automata is powerful than deterministic push down
automata? B -> bibS I aBB
(A) No (B) May be pat1ially true
(C) May be partially false (D) True 24. Give the language accepted by emptying the stack of PDA.

12. To accept L::;:: {anbnc n : n ~ 1} by a PDA, how many stacks are needed 25. Define a Turing machine and list the techniques for Turing machine construction.
(A) 1 (8) 2
(C) 3 (D) 4 26. Compare the relation between NP hard and NP complete.

13. Turing machine uses 27. State time and space complexity ofTming machines.
(A) UnalY (rotation) representation (8) Binary representation
(C) Ternruy representation (D) Normal number system PART - C (5 x 12 = 60 Marks)
Answer ALL Questions
14. Next move function (5 of a Turing machine M = (Q,2:, r,5,qo,B, F) .is mapping of
(A) 8:QxW - >Qxr (8) 8:Qxr-tQxrx{L,R} 28. <l. Let 2: = {O,l} construct a deterministic automata which will accept the following language
(C) 8:QXL->Qxf'x{L,R} (D) 8:Q x r-tQx2:x{L,R}
L = {vII E {O, I} * I w starts either with OJ or 10}.
15. Recursively enumerable languages are not closed under
(A) Unlon (B) lotersection (OR)
(C) Complement (D) Concatenation b. Let 'r' be a regular expression. Then prove that three exists an NDFA with E-transitioll that
accepts L(r).
16. Which of the following problem is not NP-Hard?
(A) Hamiltonian circuit problem (B) Oil Knapsack problem 29. a.i. Let G = (V,T, P,S) be in CFG. If there exists a derivation tree with yield '0(' then show
(C) Finding biconnected component of a (D) The graph colouring :;:

graph that S:;;;;;';>a . (8 Marks)

17. Which of the following problems is undecidable 11. Eliminate null productions, unit productions and usdess symbols from the grammar
(A) Membership problem for CFG's (B) Ambiguity problem for CFG S -t aA I aBB
(C) Finiteness problem for FSA's (D) Equivalence problem for FSA's A -> acull [;
(4 Marks)
18. Travelling sales person problem is B ->bB I bbC
(A) P-complete (B) NP-complete C->B
(C) NP-hard (D) PCP
(OR)
19. A is undecidable if A is reduced to 8 and B is
b. Convert the following grammar G into GNF.
(A) Undecidable (8) Decidable
S -t XA I BE
(C) Hard (D) Complete
B -t blAB
20. If P = NP then NP-complete problem is in
X -t b
(A) P (B) NP hard
(C) Complex (D) Reducibility A-ta

Page 2 of4 04JFSCSI013 Page 3 of4 04JFSCSIOl3


1. Construct a turing machine for case (i). 8 3
" "
Reg. No.
I I I I IJ I I I I I I I IT l
11. Constrnct a turing machine without using subroutine for the case (ii). 10 ) 4 4
B.Tech. DEGREE EXAMINATION, DECEMBER 2022
111. Turing machine is more powerful than: 4- 4 2 OPEN BOOK EXAMINATION
(A) Finite automata (B) Push down automata Fourth/ Fifth Semester
(C) 80th (A) and (B} (D) None of these
18CSC30] T - FORMAL LANGUAGE AND AUTOMATA
4 4 2 (For the candidates admitted/rom the academic year 2018-2019l0 2021-2022)
lV. Initially the tape head is pointing the
(A) Rightmost cell that holds the (8) Leftmost cell that holds the input
• Specific approved THREE text books (Printed or photocopy) recommended for the course
input
• Handwritten class notes (certified by the 1ilculty handling thc course / head of the department)
(C) Middle ceJl that holds the input (D) None of the above
Time: 3 Hours Max. Marks: 100
7. Adhitya and Arulmozhi wanted to playa game. One has to tell a binary
number, and the other one has to check whether that number is divisible by 2. Answer FIVE questions
Marl" nI . CO PO
If it is divisible by 2, it is assumed as success. (Q uestion: No 3 is compulsory)

1. Construct a turing machine for the above scenario. 4 3 .5 4 I. Abi has red and blue color balls and wanted to playa game. She puts all the
balls in a bag and she wanted to pick the balls in the specified order. If she
II. Convert the above turing machine into modified post correspondence 8 3 .5 4 picks the reu ball, bluf~ bait, and red ball in a sequence at least once, it is a
problem (MPCP). Show the 10 and MPCP solution for the input string success.
" ! 00".
I. Write a regular expression (RE) for the above scenario. 3 4

III. Write the code for the above turing machine.. 6 3 .5 4


4 3
II. Construct E-NFA for the RE using Thompson's construction method .
.5 2
IV. Which of the following statements are false? " 5 6
(A) Every recursive language is (8) Recursively enumerable language Ill. Convert this E- NF A into deterministic finite automata (DF A) using subset
recursively enumerable may not be recursive construetion method.
(C) Recursive languages may not (D) None of the mentioned
be recursively enumerable IV . .Minimize the OFA. 4 5

v. If LI problem has no algorithm to answer it, we call it 4 5 2 v. Which of the following are true 2
- --
(A) Decidable (B) Solved (A) A language accepted by a DFA (8) A Janguage accepted by a DFA is
(C) Recognizable (D) None of the mentioned is also accepted by some NF A also accepted by some NF A and
but not vice versa vice versa
(C) NFA is a 6 tuple (D) DFA is 5 tuple but not NFA .
***** 4 2
VI. A transition ii·om a state to another state without reading any input is allowed
111
(A) DFA (B) NFA
(C) E-NFA (D) RE

2. Babu has to travel from his office to his home every day. He can use four
routes, A, B, C and D. Each month he has to take route A and route D
equally, and route B and route C equally. He has to travel in all the routes at
least once. In each given duration be needs to take route A first for n number
of days followed by taking up route B for m number of days, followed by
route C and route D as per the given condition.

. Page 4 of4 06DA4/S/18CSC30 1T Page 1 of4 06DA4/S/18CSC30 IT


11. Defme L.MD and RMD. (2 Marks)
I Reg. No. I I I I I I I I I I I I I I I I
30. a. Convert the following PDA to CFG
(i) 5(qO,1,zO) = {(qO,xzO)} B.Tech. DEGREE EXAMINATION, NOVEMBER 2018
(ii) 5(qo,1,x) = {(qO,xx)} Fifth Semester
(iii) 5(qO,0,x) = {(q},x)}
(iv) 5(qO,E,ZO) = {(qO,E)} CSlO13 - THEORY OF COMPUTATION
(v) 5(ql>l,x) = {(qJ,E)} (For the candidates admitted during the academic year i013 - 2014 and 2014 - 2015)
Note:
(vi) 5(qI,0,zO) = {(qO,zO)} (i) Part - A should be answered in OMR sheet within first 45 minutes and OMR sheet should be handed
over to hall invigilator at the end of 45 th minute.
(OR) (ii) Part - B and Part - C should be answered in answer booklet.
b. Construct push down automata for the language Lover L = {a, b, c} where
L = {wcw" / WE (a,b)"'}. Time: Three Hours Max.Marks: 100

PART - A (20 x 1 = 20 Marks)


31. a. Construct Turing Machine for palindrome.
Answer ALL Questions
(OR) 1. ____ is a graph which shows the transition between states.
b.i. Give the language accepted by the Turing Machine. (2 Marks) (A) Table (B) Tuple
(C) Transition diagram (D) Arc
11. Construct Turing Machine for L = {On 1n / n ~ J} . (10 MFirks)
2. Which one of the following is a regular expression operator?
32. a. Prove that the language 1..11 is recursively enumerable but not recursive. (A) (B)
(C) ~ (D) 00

(OR)
b.i. Explain NP-type problem with an example. 3. __ is regular expression represents equal number of 'a' followed by 'b'
(A) a = b (B) ab
11. Explain NP-complete type problems with an example. (C) (ab)Il (D) allbIl

4. IdentifY from the list below the regular expression over the alphabet {O, I} that generates all
::~ =:: *** strings that end with 1.
(A) (0*+ 1*)* 1 (B) (0*+ 1*)+
(C) (0+ 1)* 10* (D) 1*0*1

5. Which of the following grammar defines the same language?


(A) Gl:S~aB,B~bS,B~a (B) Gl:S~abS,S~ab
G2:S ~aB,B~bS,B~ b G2:S ~aB,B ~ bS,B -> ab
(C) Gl:S~aB,B~bS,B~ab (D) G1:S~SS,S~ab
G2:S ~SS,S ~ab G2:S ~aB,B~ bS,S -> ab

6. Which is an expression that cannot be broken apart by any adjacent operator?


(A), Factors (B) Input
(C) Tenn (D) Expression

7. is the set ofterminal strings that have derivations from start symbol.
(A) Language (B) Tenninal
(C) Variable (D) Alphabet

8. The condition for chomoky normal fonn is


~, . (A) 2 NT (Non-Tenninal) (B) 2 Terminal
' (C) One Non-Telm i.l1a I (D) 2 Non-Terminal

Page 4 of4 IGNASCSI013 Page 1 of4 IGNASCSIOI3


9. PDA can be equated to ,----_ _ PART - B (5 x 4 = 20 Marks)
(A) NFA (B) E-NFA Answer ANY FIVE Questions
(C) CFG (D) DFA
21j. Give the formula for converting from finite automata to regular expression.
10. The notation of instantaneous description of PDA is
(A) r (B) ~ 11. Give the language accepted by NF A.
(C) ~r (D) cI>
22. Define sentential and string.
11. Give the triple notation for ID in PDA
(A) (q,w,y) (B) (q,w,oc) 23. Write about instantaneous description and pushdown automata.
(C) (zo,w,y) (D) (xo,w,y) 24. List the 7 tuple notation of a Turing machine.

12. The acceptance ofPDA by empty stack is given by 25. Define PCP with example.
(A) * (B) *
{w I (qo' w,zo)l-(q,E,E)} {w I (qo' w,zo)I-(Zo,E,E)} 26. What are the ways of modifying a Turing machine?
(C) * (D) *
{w I(zo' w;qo)l-(q,E,a)} {w I(x o' w,zo)l-(q,E,¢)} 27. What do you mean by useless symbol? Give example.

PART - C (5 x 12 = 60 Marks)
13. ofa turing machine is a fWlction of state of finite control and tape symbol scanned Answer ALL Questions
(A) Move (B) Input
(C) Sequence (D) Scan 28. a. Minimize the following DFA
I
14. The device that manipulate symbols
(A) PDA
OIl a stripe of tape according to a table of rules
(B) Turing machine
~ qo ql q5
ql q6 q2
°
(C) Finite automate (D) CFG
* q2 qo q2
q3 q2 q6
15. Proper subtraction is defined by _ _ _ q4 q7 q5
(A) m ..:..n= max(n - 111,1) (B) 111..:..n =min(m-n,O) q5 q2 q6
(C) m .kn =max(m-n,O) (D) n..:..m=max(n-m,O) q6 q6 q4
q7 q6 q2
16. The set of 1anguages accepted by Turing machine is (8 Marks)
(A) Recursive (D) Recursively enumerable 11. Convert the following i·egular expression to finite automata 01* + 1. (4 Marks)
(C) Enwnerable (D) Non-recursively enumerable
(OR)
17. A problem L is called ___ ifitis recursive language b. Convert the following finite automata to regular expression
(A) Recursive (B) Enumerable
(C) Undecidable (D) Decidable
1
18. is a machine which accepts the languages Lu = L(u).
(A) Universal Turing machine (B) Turing machine
(C) Push down automata (D) Context free grammar
29. a. Give the relationship between derivation and derivation tree.
19. Every non-trivial property ofRE language is (OR)
(A) Recursive (B) Undecidable bj. Convert the following into CNF
(C) Enwnerable (D) Decidable S ->ABI CA
B--+BCI AB
20. To reduce Lu to PCP the is used
(A) Lisp (B) PCP A->a
(C) MPCP (D) SAT solver C --+ aB I b
(10 Marks)

Page 2 of4 . 16NASCSI013 Page30f4 16NASCSI013


b. Convert the PDA P = ({p;q}, {O,l}, {x, zo}, c5,q,zO) to a CFO if <5 is given by
(i) .5(q,l,zO) = {(q,xzo)} Reg. No. I I I I I I I I I I I I I ~
(ii) 5(q,l,x) = {(q,xx)}
(iii) 5(q,0,x) = {(p,x)} B.Tech. DEGREE EXAMINATION, .DECEMBER 2018
(iv) c5(q,E,X) = {(q,E)} I st to 6th Semester
(v) 5(p,l,x) = {(p,E)}
(vi) 5(p,0,zO)= {(q,zO)} 15CS301- TIffiORY OF COMPUTATION
(For the candidates admitted during the academic year 2015-2016 to 2017-2018)
Note:
3] . a. Describe the Turing machine that will recognize the language L = {w / W E [a + b:l} * and (i) Part - A should be answered in OMR sheet within first 45 minutes and OMR sheet should be handed
input string starts with 'a'. over to hall invigilator at the end of 45 th minute.
(ii) Part - B and Part - C should be answered in answer booklet.
(OR)
rl'ime: Three Hours M.ax. .Marks: 100
b. Construct a Turing machine that will accept multiplication of two integers.

32. a. Explain the tollowing in detail PART - A (20 x 1 = 20 Marks)


(i) NP-hard problem Answer ALl,., Questions
(ii) NP-complete problem ]. Which of the following is not a part of 5-tllple finite automata?
(A) Input alphabet (B) Traosition function
(OR) (C) Initial state (D) Output alphabet
h. Explain about
(i) Recursively enumerable language (4 Marks) 2. When are 2-Jinite states equivalent?
(ii) Prove that universal Turing machine is recursively enumerable hut not recursive. (A) Same number of transitions (B) Same number of states
(8 Marks) (C) Same nwnber of states as well as (D) Both are final states
transitions
3. The maximum number of transition which can be performed over a state 111 a ' DFA?
* '" * * * ~= {a,b,c}
(A) 1 (B) 2
(C) 3 (D) 4

4. A regular language over an alphabet 'a' is one that can be obtained form
(A) Union (B) Intersection
(C) Segmentation (D) Partition

5. Regular expression q)' is equivalent to


(A) E (B) <P
(C) (D) I
°
6. A push down automaton employs data structure
(A) Queue (B) Linked list
(C) Hash table (D) Stack

7. Push down automata accepts language


(A) Type 3 (B) Type 2
(C) Type 1 (D) Type °
8. A string is accepted by a PDA when
(A) Stack is empty (B) Acceptance state
(C) Both (A) and (B) (D) Rejected state

Page 4 of4 OSDAl-6/1SCS301 Page 1 of4 OSDAI·6/1SCS301


9. Given grammar: S4A, A4Aa, A 4 e, B4bA which among the following productions are PART - B (5 x 4 = 20 Marl{s)
useless productions? Answcr ANY FIVE Questions
(A) S~A (8) A4aA
(C) A4C (D) B4bA 21. Design an automata for the language over the alphabet :L = {a,b} which contains set of all
string that not ends with "aba".
10. Give grammar: A4aSIA, A~a, B4aa fmd the number of variables reaching from the starting
variable 22. Explain context free grammar (CFO) with examplc and explain ambiguity with that
(A) 0 (B) 1 grammar.
(C) 2 (D) 3
23. Dcsign a PDA for accepting a language {L = an b2n In> I} .
11. Which of the following strings is not generated by the given grammar: S4SaSbSle?
W ~b ~ ~~
(C) abaabb (D) baaa 24. Show that the language {Onln2n} is not a context free language.

12. Which of the following does not have left: recursions? 25. Define multitape Turing machine and multiple track Turing "machines.
(A) Chomsky normal form (B) Greibach normal form
(C) Backus naur form (D) Regular normal. form 26. Is it possible that a Turing machine could be considered as a computer of functions from
integer to integer? If yes justify.
13. The context free languages are closed Ullder
(A) Intersection (B) Complement 27. When a problem is said to be decidable and give an example of undecidable problem.
(C) Kleene (D) Segment
PART - C (5 x 12 = 60 Marl{s)
14. A tllring machine that is able to simulate other turing machines?· Answer ALL Questions
(A) Nested. hIring machines (B) Universal turing machine
(C) Counter machine (D) Mutlitape turing machine 28. a. Describe purpping lemma and prove that the language L = an bn is not regular when 11 ~ 1?
15. While applying pumpjng lemma over a language we consider a. string 'W' that belong to 'L' (OR)
and fragment it into parts?
(A) 2 b. Convert regular expression to E-NF A and from E-NFA to DFA for the expression (a I b)* abo
(B) 5
(C) 3 (D) 6
29" a. Convert the grammar
16. A grammar with more than one parse tree is called? S--ABBIBa
(A) Unambiguous (B) Ambiguous A->BaIElca
(C) Regular (D) Irregular B--BblbiA
C->CaqCa
17. Recursive languages are also known as D->Dala
(A) Decidable (B) Undecidable into Chomsky normal form.
(C) Sometimes decidable (D) Sometimes undecidable
(OR)
18. The language accepted by a Turing machine is called b. Convert the grammar
(A) Rccursive enumerable (B) Recursive S~AB

(C) Non recursive (D) Both (A) and (B) A4BSIa


B4SAIb
19. A problem is called _ _ _ if it has an efficient algorithm for itself. into Griebach normal form.
(A) Tractable (8) Intractable
(C) Computational (D) Complex 30. a. Construct push down automata for L = {anb n I 11 ~ I}. Acceptance by emptying the stack.
20. Which of the following problem is not NP-hard? (OR)
(A) Hamiltonian circuit . (B) Oil knapsack problem
(C) Finding bi-cOlmected component of (D) Graph coloring
graph
Pagc20f4 OS])AJ-6/1SCS301 Page 3 of4 OSDAl-6/1SCS301
b.i. Construct DFA for o*l*i' .
Reg. No. I I I I I I I I I I I I I I I J
11. Construct E-NFA for
(1) 0(0+1)*(01)'" B.Tech. DEGREE EXAMINATION, MAY 2018
1sl to 6 th Semester
(2) 01(0+1)*01+(01)*'
15CS30] - THEORY OF COMPUTATION
29. a.i. Prove that S ~ as I aSbS IE is ambiguous. (8 Marks) (For the candidates admitted during the academic year 2015 - 2016 onwards)
Note:
II. Find LMD and RMD for the string aab and the corresponding parse tree. (4 Marks) (i) Part - A should be answered in OMR sheet within first 45 minutes andOMR sheet should be handed
over to hall invigilator at the end of 45 th minute.
(OR) (ii) Part - B and Part - C should be answered in answer booklet.
b. Convert the following to Chomsky normal fonn
S~ASBIE Time: Three Hours Max. Marks: 100
A ~aASla
PART - A (20 x 1 = 20 Marks)
B~SbSIAlbb Answer ALL Qu estions
1. The basic limitation of FSM is
30. a. Construct PDA for the Jaoguage L = {ww" : w E {a ,b}} and illustrate with the string abbbba.
(A) It can't remember arbitrary large amollnt of information
(B) Sometimes fails to recogni ze regular grammar
(OR) (C) Sometimes it recogruzes non regular languages
b. Construct CFG for the following PDA P =({p,q},{0,1},{x,zO},5,q,zO) where 0 is defined (D) It is accepting CFL
by
(i) 5(q,1,zO) = {(q,xzO)} 2. The regular expression over {O, I} in which words ending in 01 is
(ii) b'(q,l,x) ={(q,xx)} (A) 01 (B) 01(0/1)*
(iij) 5(q,0,x) = {(p,x)} (C) 0(0 /l) ~ l (D) (011)*01
(iv) O(q,E,X) = {(q,E)}
(v) b'(p,l,x) = {(p,E)} 3. IfNFA has n states then DFA will have
(vi) 5(p,0,zO) = {(q,zO)} (A) 211 states (B) 2n states
(C) n2 states (D) n+2 states
3]. a.i. Construct a TM which accepts palindrome over L = {a,b}. (8 Marks)
4. Pumping lemma is based on
II. What is ll1ultitape TM? Explain with an example. (4 Marks) (A) Pigeon hole principle (B) Mathematical induction
(C) Set inClusion principle (D) Regular language
(OR)
b.i. Construct a TM that \\Iill perform monks subtraction. (8 Marks) 5. The transition of a PDA additionally depend upon
(A) Input tape (B) Terminals
11. Prove that the W1ion of two recursive languages is also recursive. (4 Marks) (C) Non terminals (D) Stack

32. a. Prove that M PCP is undecidable. 6. The language generated by the following CFG is S ~ aSa I bSb IE
(A) Even palindrome (B) Odd palindrome
(OR) (C) a bl1
l1 (D) bl1 a l1
b. Explain the following with suitable examples
(i) NP type problem 7. An ambiguous grammar is one which has
(ii) NP complete type problem (A) One LMD (B) OneRMD
(iii) NP hard type problem (C) One LMD and one RMD (D) More than one LMD or RMD

8. If the productions are of the from A ~ aa where A E V,a E T,a E V* is known as


***** (A) Context free grammar (B) Chomsky nonnal fonn
(C) Griebach nonnal fonn (D) Linear grammar
Page 4 of 4 21MAl-6/1SCS301 Page 1 of4 21MAl-6/1SCS301
9. A detenninistic PDA is a PDA in which PART - B (5 X 4 = 20 Marks)
(A) No state ofPDA has 2 outgoing transitions with same input Answer ANY FIVE Questions
(B) More than one state can have two or more outgoing transitions
(C) Atleast one state has more than one transitions 21. . • . . ~ 2 n(n+l)(2n+l)
(D) Two states can have same transition Apply mathematlcalmductlon to prove L) = .
i=l 6
10. lfthe PDA accepting stop on accepting state and the stack is not empty then the string is
(A) Rejected . (B) Accepted 22. Prove that {(OOr : n;:;:} is regular. .
(C) Goes into loop forever (D) May not go to infinite loop

11. PDA is powerful than 23. Construct a context free grammar which negates the language L(G) = {a l1 b2f1 c 17 : n;:;: I}.
(A) TM (B) FSA
(C) Both (D) Moore machine 24. Construct PDA for the language L( G) = {an b2n c 1'1 : n ;:;: l} .

12. The symbol Zo in PDA definition is denoting 25. Design a TM that will compute 4 n for given any integer 11 in binary form.
(A) Initial state (B) Stack content
(C) Variable (D) Initial stack alphabet 26. State 4 examples of undecidable problem.

13. TM accepts which type of grammar in Chomsky hierarchy 27. Deftne post correspondence problem. Explain with a suitable example.
(A) Type 0 (B) Type 1
(C) Type 2 (D) Type 3 PART - C (5 x 12 = 60 Marks)
Answer ALL Questions
14. Which of the following is the restricted model of TM
(A) TM with semi-infinite tape (B) Multi stack machine 28. aj. Find DFA for the following
(C) Offline TM (D) Both (A) and (B) E
, ~I c
~p ¢ {r}
1.5. IfTJ and T2 are two macruJleS the composite can be represented by
I (
(A) TI T2 (B) TI x T2
(C) TI U T2 (D) TI - T2
q {p} ell
(r
16. NDTM is one which has
(A) No transition (B) Multiple transitions for the same input
*r { q} ( {p}
(C) One transition (D) Empty transition
r

17. If a language L is recursive then


(A) We can construct a TM (B) We can't construct a TM
(C) We can construct a TM that always halts (D) It never halts
11. Minimize the following DFA
18. PCP problem is
(A) Decidable (B) Semi decidable
(C) Undecidable (D) Partial solution can be got

19. A language L is decidable if L is


(A) Regular language (B) CFL
b
(C) CSL (D) Recursive language

20. The language L = {011111211 : n ;:;: O} is accepted by


(A) FSA (B) PDA a
(C) TM (D) NFA
(OR)

Page 20f4 21lV1Al-6/1SCS301 Page 3 of4 21MAl-6/15CS301

You might also like