0% found this document useful (0 votes)
1K views7 pages

Automata Past Papers

BS IT 5th semester

Uploaded by

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

Automata Past Papers

BS IT 5th semester

Uploaded by

kainat Mushtaq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
p™ime: 2 Hrs. 45 8 UNIVERSITY OF THE Py B.S. 4 Years Program : Fifth Se NIAB Paper: Theory of Automata (m7) Course Code: ray 22 ime: 2 HFS 45 Min. ATTEMPT THIS (SUBJECTIVE) ON THE gp TE answer SHEET PROVIDED Q.2. Give short answers Of the following: (5x4=20) a) wi ) Write a note on different Kinds/Classes of Grammars with examples. b) Mak © clear the difference between STG, TG, NFAand FA with suitable examples. ©) Construct a 1, ring Machine for the language abc" where n > -1. 9) Give th it Definition of Cg for the language a" ¢"d" b" where m,n>-1. e) Defi ine Keene's Clouser and Positive Clouser, aio describe relation between both Q.3. Solve the following, (3x10=30) a) Construct an NPDA for the Language PALINDROME b) Prove that following Two FAs are equal. FAy, b A a a vs gxpression and an FA for the “en opp, EVEN, c) Give a RS Scanned with CamScanner UNIVERSITY of THE PUNJAB Fifth (5th) Semester 2020 Examination: B.S.4 Years Program Paper: Theory of Automata Time allowed: 2Hrs&30 min Course Code: IT 301 Max Marks: 50 Attempt this paper on separate Answer Sheet provided. Subjective Type Question#2 (4*5 MARKS) Answer the following Short Questions: a) What are valid and invalid alphabets? Explain with example. b) Build an FA for the language L of strings, define over 3 {a, b}, of odd length. c) Make clear difference between CFG and CNF. d) Define Generalizated Transition Graphs with example. e) Give recursive defin b) n of Defining the language PALINDROME, define over 3=(a, Question#3 (10*3 MARKS) 2) Consider the language L of strings, defined over 5 (a, b}having double a's or double b's. Give the regular expression, recursive definition and draw the automaton for the following language. b) Construct an NFA for b (a+b)* bb and convert “subset construction algorithm’, 4 = into equivalent DFA by using ) Convert the CFG into PDA Sm S+S|S*S|4 Scanned with CamScanner UNIVERSITY OF THE PUNJAB ! Fifth Semester — 2019 ¢ Examination: B.S. 4 Years Program PAPER: Theory of Automata (IT) MAX. TIME: 2 Hrs, 45 Min. Course Code: IT-301 Part-I MAX, MARKS: 50 ATTEMPT THIS (SUBJECTIVE) ON THE SEPARATE ANSWER SHEET PROVIDED Q.3. a) b) qd) f) Questions with short answers. (5x4= 20) a) Give Recursive definition of Regular Expressions. b) Give the definition of CNE and also describe its advantages. ©} Define ambiguity, give an ambiguous gramrnar and also prove it 4) Give comparison among the power of FA, NFA, PDA, NPDA, and Turing Machine. ¢) Discuss the difference between the input tépes of Turing Machine and Post Machine, Questions with long answers. (6x5 = 30) Construct a Turing Machine which will double every ‘b’ in all inputted string over = {a,b} Construct PDA for the language PALINDROME over {c, d}. Construct MOORE machine (an FA with output) which can subtract any two inputted binary strings. Give the Regular Expression and FA for the language ODD-EVEN. Write the CFG for the Language a°b"d"c"; m,n >o Write the Context Sensitive Grammar for language c"a"b"; n >0. Scanned with CamScanner UNIVERSITY OF THE PUNJAB 2018 Exam : B.S. 4 Years Programme }: 2 hrs. & 30 mins. PAPER: Theory of Automata (IT) ‘TIME ALLOWED: Course Code: IT-301 MAX. MARKS: 50. Attempt this Paper on Separate Answer Sheet provided, SUBJECTIVE TYPE Question # 02 nae 2). Give Recursive definition of Regular Expressions 1) Give the definition of CWF and aso describe its advantages. Define ambiguity, give an ambiguous grammar and also prove I. 4) Give comparison among the power of FA, NFA, PDA, NPDA, and Turing Machine. €) Discuss the diference between the input tapes of Turing Machine and Post Machine Question # 03 5°68) 8) Construct a Turing Machine which will double every’ Inall inputted string over {c,d} 4) Construct a PDA forthe language PALINDROME over (c,d }- ©) Construct MOORE machine (an FA with output) which can subtract any two inputted binary strings 4) Give the Regular Expression and FA for the janguage EVEN EVEN. ) Write the CFG for the Language EQUAL 4] Write the Context Sensitive Grammar for language a" bc"; n20. Scanned with CamScanner UNIVERSITY OF THE PUNJAB : Fifth Semester 2017 Examination: B.S. 4 Years Programme 3 Roll No. PAPER: Theory of Automata (IT) TIME ALLOWED: 2 hrs, & 30 mins. “. Course Code: IT-301 MAX. MARKS: 50 Attempt this Paper on Separate Answer Sheet provided. SUBJECTIVE TYPE Question #2 (4* 5 MARKS) Answer the following short questions: 8) Define Ambiguity. Give an example of Ambiguous gremmar and prove it. ') Make clear difference between Determinism and Non-Determinism using suitable examples. ©), Make clear the difference between CFG and CNF. 4) Explain the different between the Unrestricted and Context Sensitive grammars. ©) Give two the smallest possible sets whose Kleene’s Clouser will be same, finite and prove it, Question #3 (S* 6 MARKS) ) Construct a Turing Machine which will delete letter from third cell of input tape, over = (a, b,c} OR > Construct Post Machine for the language c* ba" ; n > 0, b) Convert the Following CFG into CNF: S-alYbYjaZYZa Y-ZZ|aY ZabIY|A 9 the FA for the language ODD-ODD over = {m,n} 4@) Give an FA with OUTPUT (MOORE Machine) which can ADD any two inputted binary strings. For example; if 0000 and 1111 are inputted it will output 1111 . ©) Give the Context Free grammar for the Language EQUAL over 5.= (b, a}. ) Construct a PDA for the Language PALINDROME over (a, b}. Scanned with CamScanner UNIVERSITY @SrF HRStUBARER Fifth Semester 2016 Examination: B.S. 4 Years Programme PAPER: Theory of Automata (IT) TIME ALLOWED: 2 hrs. & 30 mins, Course Code: IT-301 MAX. MARKS: 50 Attempt this Paper on Separate Answer Sheet provided. SUBJECTIVE TYPE exaceedececFececccecece Short Questions [20 Finials Sn oe QUESTION #2 D a) Give the Recursive definition of Regular Expressions, © b) Define the CNF and its advant ¢) Make clear the difference between Determinism S@Pen-Determinism with examples d) What are differences in use/working of i fo used by PDA, Post Machine and ‘Turing Machine’? xe Q yy ence eae Brief Questions [30 Marks] >>>>>>>>>>>>>55995>> 9595 QUEST, g 3 2 struct NPDA for the language PALINDROME. @ Construct a Turin g Machine which can delete the second letter from inputted string. For example if input is axbe the output will be abe. ©) Construct an NFA ford (2 + b)*a D and then convert it imo equivaent DFA by using “subset construction algorithm”, a . www. PuPapersBook.com Scanned with CamScanner TIME ALLOWED: 2h : $30 mins. MAX. MARKS: 50_. 2 we Answer Sheet provided.” * SUBJECTIVE TYPE Shik, . Question #2Answer the ee (495 Marks} ‘ayn the statement of Keene's Theorem, Give the Recursive definitionofthe Reguiar Expressions. VE isKiive the definition of CNF and describe the advantage ofthis grammatical format, _ Va) Give an example of the Context Sencitive Language. CGB) Giiesne comparison of the powers of FA, DPDA, NPDA and Turing Machines. "=. “Question #3 Answér'the téllowing questions brichy: [6 * 5 Marks} es Gonver the following’ CFG iis. Sa arergath Sepa, Pp A=Bia _ e Be ee, bx _ A represents the Null String-here:) ——~ w ive the Regular: iti care and FA for Multiple Line Comments as supported by Q Dag CIC +Hava. jistruct FA, = (FA) 3 (show the pogseeswel) Saf oS Scanned with CamScanner

You might also like