Skyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.
|
|
- Ambrose Matthews
- 5 years ago
- Views:
Transcription
1 Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions. PART-A 1) a) Define the terms alphabet, string, prefix, suffix, language give examples to each. b) Give DFA & NFA which accept the language { (10)n : n 0 } c) Define a linear grammar d) Define a ambiguous CFG e) Construct a CFG for the set of all strings over the alphabet {a,b} with exactly twice 10 as many a s and b s. f) Distinguish between DPDA and NPDA g) Explain the operations of a NPDA with diagram? h) Define unrestricted grammar. i) What is the modified version of PCP PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table. R 13 3) Construct the corresponding Mealy machine to the Moore machine described by the transition table given. 4) a) Construct an equivalent unambiguous grammar on the below production rules. b) Construct an unambiguous grammar for all arithmetic expressions with no redundant parenthesis. A set of parenthesis is redundant if its removal does not change the expressions. E E + E / E * E / E / id 5) Explain left & right derivations and left & right derivation trees with examples? 6) State and prove pumping lemma for CFG? 7) Explain CNF with example? 8) Design Turing Machine to increment the value of any binary number by one. The output should also be a binary number with value one more the number given.
2 9) Explain LBA with example? 10) a) Design Turing Machine over b) Draw the transition diagram for above language. 11) a) Explain un decidability of posts with example? b) Explain universal Turing machine?
3 Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) PART-A 1) a) What are Universal Turing Machines b) Define computations of a TM? c) Define CFG and What are its advantages d) Define unit production. e) Find all strings in L ((a+b)*b(a+ab)*) of length less than four f) Compare NFA & DFA g) Write a note on applications of formal languages and automata. h) Define regular expression,give a regular expression for L={anbm : n 4, m 3} i) Prove or disprove the following for regular expressions r,s,and t (rs+r)r=r(sr+r)* PART-B 2) a) Construct DFA and NFA accepting the set of all strings containing 10 as a substring. b) Draw the transition diagram of a FA which accepts all strings of a's and b's in which both the number of b's and a's are even. c) Define NFA with epsilon with an example. 3) a) Construct a DFA with reduced states equivalent to the regular expression 10 + (0 + 11)0* 1. b) Prove (a + b)* = a*(ba*)* 4) prove pumping lemma of regular sets? 5) Explain left & right derivations and left & right derivation trees with examples? R 13 6) Convert the following Push down Automata to Context Free Grammar 7) Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3}, {a,b},p,s) Where P consists of the following 8) Design Turing Machine to increment the value of any binary number by one. The output should also be a binary number with value one more the number given. 9) Explain counter machine 10) What are the various variations of TM? How to achieve complex tasks using TM 11) a) Explain correspondence problem? b) Explain P and NP problems?
4 Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions. PART-A 1) a) Give a description about FA with empty moves b) Define regular grammar with example. c) Give the set and explain in English the sets denoted by following regular expressions. i) (11+0) (00+1) ii) ( )(0+00) iii) (0+1)00(0+1) iv) v) d) Explain dependency graph & its applications in CFG. e) Prove the substitution rule of context free grammar? R 13 f) Give a CFG generating the following set that is the set of palindromes over alphabet{a,b} g) Let G be the grammar S->aS asbs epsilon. prove that L(G)={x each prefix of x has atleast as many a s and b s} PART-B 2) Design a Moore machine to determine the residue mod 5 for each binary string treated as integer. 3) Draw the transition table, transition diagram, transition function of DFA a) Which accepts strings which have odd number of a s and b s over the alphabet {a,b} b) Which accepts string which have even number of a s and b s over the alphabet {a,b} c) Which accepts all strings ending in 00 over alphabet {0, 1} d) Which accepts all strings having 3 consecutive zeros? e) Which accepts all strings having 5 consecutive ones? f) Which accepts all strings having even number of symbols? 4) Convert the following finite automata to regular expressions: 5) Find a Regular expression corresponding to each of the following subsets over {0,1}*. a) The set of all strings containing no three consecutive 0 s. b) The set of all strings where the 10th symbol from right end is a 1. c) The set of all strings over {0,1} having even number of 0 s & odd number of 1 s. d) The set of all strings over {0,1} in which the number of occurrences of is divisible by 3 6) Convert the following grammar into CNF. S->aAD A->aB->bAB B->b
5 D->d 7) Prove that the following language is not context-free language L={www w {a,b}*} is not context free. 8) a) Describe the TM that accepts the language L = {w a{a,b,c}_ w contains equal number of a s, b s, and c s}. b) Explain in detail Church s hypothesis. 9) a) Design a Turing Machine that accepts the set of all even palindromes over {0,1}. b) Given _ = {0,1}, design a Turing machine that accepts the language denoted by the regular expressions 00* 10) a) What is decidability? Explain any two undecidable problems. b) Show that the following post correspondence problem has a solution and give the solution. I List A List B ) a) Find whether the post correspondence problem P={(10,101),(011,11),(101,011)} has a match. Give the solution. b) Explain Turing reducibility machines. c) Show that if L and L? Are recursively enumerable, and then L is recursive.
6 Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions. PART-A 1) a) Find the DFA that recognizes the set of all string on Σ={a,b} starting with the prefix ab b) Construct a DFA & NFA to accept all string in {a,b} such that every a has one b immediately 8 to its right? c) Find all strings in L ((a+b)*b(a+ab)*) of length less than four d) Prove the following identities for regular expression r,s and t here r=s means 6 L(r)=L(s) r+s=s+r, (rs)t=r(st),(r+s)t=rt+st e) Find the NFA that accepts the language L{ab*aa+bba*ab) f) What are CFG s Give CFG for the language L= {an b2n n>0} g) Define context free grammars formally. Give some examples. h) Why FAs are less powerful than the PDA s R 13 PART-B 2) a) Construct DFA and NFA accepting the set of all strings not containing 101 as a substring. b) Draw the transition diagram of a FA which accepts all strings of 1's and 0's in which both the number of 0's and 1's are even. c) Define NFA with an example. 3) a) Draw the transition diagram of a FA which accepts all strings of 1's and 0's in which both the number of 0's and 1's are even. b) Construct NFA which accepts the set of all strings over f0; 1g in which there are at least two occurrences of 1 between any two occurrences of 0. Construct DFA for the same set. 4) Represent the following sets by regular expressions 5) Discuss about a) Context Free Grammar b) Left most derivation c) Right most derivation d) Derivation tree. 6) Which of the following are CFL's? Explain
7 7) a) Eliminate epsilon productions from the grammar `G' given as b) Convert the following grammar to Greibach Normal Form 8) Write a note on Turing Thesis. Define algorithm in terms of TM. 9) Write short notes on: a) Halting Problem of Turing Machine b) Application of CFG c) Multi Tape Turing Machine d) Post-Correspondence Problem 10) a) Find whether the post correspondence problem P={(10,101),(011,11),(101,011)} has a match. Give the solution. b) Explain Turing reducibility machines. c) Show that if L and L? Are recursively enumerable, and then L is recursive. 11) Write brief about the following a) Decidability of problems b) RICE Theorem c) Undecidability of post correspondence problem.
8 Code No: R R09 Set No. 2 II B.Tech II Semester Examinations,December-January, Computer Science And Engineering Answer any FIVE Questions All Questions carry equal marks 1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata. (b) Convert the following Context Free Grammar to Push Down Automata S aaa A as bs a. [7+8] 2. Describe, in the English language, the sets represented by the following regular expressions: (a) a(a+b)*ab (b) a*b + b*a [15] 3. (a) What is unit production? Explain the procedure to eliminate unit production with example. (b) What is ε-production? (c) What is the use of Chomsky Normal Form or Greibach Normal Form?[6+5+4] 4. The grammar E E + E E * E (E) id. Generate the set of arithmetic expressions with +, *, paranthesis and id. The grammar is ambiguous since id + id * id can be generated by two distinct left most derivations. (a) Construct an equivalent unambiguous grammar. (b) Construct an unambiguous grammar for all arithmetic expressions with no redundant paranthesis. A set of paranthesis is redundant if its removal does not change the expressions. [7+8] 5. (a) Construct a Mealy machine which is equivalent to the Moore machine given in table. Present State Next State Output a=0 a=1 q 0 q 3 q 1 0 q 1 q 1 q 2 1 q 2 q 2 q 3 0 q 3 q 3 q 0 0 (b) Construct the corresponding Mealy machine to the Moore machine described by the transition table given. 1
9 Code No: R R09 Set No. 2 Present State Next State Output a=0 a=1 q 1 q 1 q 2 0 q 2 q 1 q 3 0 q 3 q 1 q 3 1 [7+8] 6. Design Turing Machine for recognition of binary palindromes. [15] 7. (a) Consider the Finite State Machine whose Transition function δ is given in the form of a transition table (figure 1). Here, Q = {q 0,q 1,q 2,q 3 }, Σ ={0,1},F={q 0 }. Give the entire sequence of states for the inputstring Transition Table: Figure 1: (b) Let M = (Q,Σ,δ, q0, F) be a finite automaton. Let R be a relation in Q defined by q 1 R q 2 if δ (q 1,a)=δ(q 2,a) for some a Σ. Is R an equivalence relation? [8+7] 8. Construct LR(0) items for the grammar given find it s equivalent DFA S AB aab A a Aa B b [15] 2
10 Code No: R R09 Set No. 4 II B.Tech II Semester Examinations,December-January, Computer Science And Engineering Answer any FIVE Questions All Questions carry equal marks 1. Represent the following sets by regular expressions (a) {0,1,2} (b) {1 2n+1 n>0} (c) {w ε{a, b}* w has only one a } (d) The set of all strings over {0,1}, which has at most two zeros [15] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3}, {a,b},p,a) Where P consists of the following A1 A2 A3 A2 A3 A1 b A3 A1 A2 a [15] 3. Construct (a) A context-free but not regular grammar. (b) A regular grammar to generate {a n n>=1}. [15] 4. (a) Design a Turing Machine to perform following computations q 0 w q f ww, w ε {0}* (b) Turing Machine not only used for recognizing language but also computes. Explain. [9+6] 5. (a) Draw the transition diagram of a FA which accepts all strings of 1 s and 0 s in which both the number of 0 s and 1 s are even. (b) Construct NFA which accepts the set of all strings over {0, 1} in which there are at least two occurrences of 1 between any two occurrences of 0. Construct DFA for the same set. [7+8] 6. (a) Construct a NFA accepting {ab,ba} and use it to find a DFA accepting the same set. (b) Write the steps in construction of minimum automaton. [8+7] 7. Construct LR(0) items for the grammar given find it s equivalent DFA. S ( S ) a [15] 8. Which of the following are CFL s? explain 3
11 Code No: R R09 Set No. 4 (a) {a i b j i j and i 2j} (b) {a i b j i 1 and j 1} (c) {(a+b)*- {a n b n n 1}} (d) {a n b n c m n m 2n }. [15] 4
12 Code No: R R09 Set No. 1 II B.Tech II Semester Examinations,December-January, Computer Science And Engineering Answer any FIVE Questions All Questions carry equal marks 1. (a) Write the steps in construction of minimum automaton. (b) Draw NFA without ε-moves transition with diagram and table equivalent to NFA whose transition table is given. [7+8] 2. Discuss about (a) Composite Turing Machine (b) Universal Turing Machine (UTM). [7+8] 3. (a) Explain the procedure to convert Push Down Automata to Context Free Grammar. (b) Convert the following Context Free Grammar to Push Down Automata S ( S ) S ε. [7+8] 4. (a) Define DFA. (b) Give DFA accepting the set of all strings such that every block of 5 consecutive symbols contains at least two 0 s over an alphabet {0, 1}. (c) Construct the NFA accepting the set of all strings with an equal number of 1 s and 0 s such that no prefix has two more 0 s than 1 s nor two more 1 s than 0 s over an alphabet {0, 1}. Give one example string which is accepted by this NFA and write the sequence of steps. [2+6+7] 5. (a) What is context sensitive grammar? Give examples. (b) Let Σ = { 0, 1 } and A,B be the list of 3 strings each. Verify below PCP has a solution or not? List A List B I W i X i [7+8] 6. Construct a transition system corresponding to the regular expressions (a) (ab + a)* (aa +b) (b) a*b + b*a [15] 7. Construct context-free grammars to generate the following 5
13 Code No: R R09 Set No. 1 (a) {o m 1 n m n, m, n >= 1}. (b) {a l b m c n one of l, m, n equals 1 and the remaining two are equal}. [7+8] 8. (a) Eliminate ε - productions from the grammar G given as A abb bba B ab bb ε. (b) Convert the following grammar to Greibach Normal Form S ABA AB BA AA B A aa a B bb b. [7+8] 6
14 Code No: R R09 Set No. 3 II B.Tech II Semester Examinations,December-January, Computer Science And Engineering Answer any FIVE Questions All Questions carry equal marks 1. (a) If G=({S}, {0, 1}, {S 0S1, S ε}, S), find L(G). (b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [7+8] 2. (a) Construct DFA and NFA accepting the set of all strings not containing 101 as a substring. (b) Draw the transition diagram of a FA which accepts all strings of 1 s and 0 s in which both the number of 0 s and 1 s are even. (c) Define NFA with an example. [6+5+4] 3. (a) Write the applications of Finite Automata. (b) Define NFA with ε-moves. (c) Draw NFA with ε -moves transition diagram and table which accepts the language consisting of any number (including zero) of 0 s followed by any number (including zero) of 1 s followed by any number (including zero) of 2 s. [6+2+7] 4. (a) Consider the fallowing grammar G = ({S,A},{a,b},P,S) Where P consists of S aas / a A SbA / SS / ba For the string aabbaa show i. Left Most Derivation ii. Right Most Derivation iii. Parse Tree (b) Find the Context Free Language generated by the following grammar G=({S},{a,b},P,S) where P: S asb ab [7+8] 5. Design Push Down Automata for L = {a 2n b n n 1}. [15] 6. Write briefly about the following (a) Decidability of problems (b) RICE Theorem (c) Undecidability of post correspondence problem. [5+5+5] 7. Design Turing Machine which will recognize strings containing equal number of 0 s and 1 s. [15] 7
15 Code No: R R09 Set No (a) construct a finite automaton accepting all strings over {0, 1} ending in 010 or (b) Show that the set L= {a pow(i,2) >= 1} is not regular. [pow(i,2) = i 2 ] [7+8] 8
R10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?
R1 SET - 1 1. a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA? 2. a) Design a DFA that accepts the language over = {, 1} of all strings that
More information(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar
Code No: R05310501 Set No. 1 III B.Tech I Semester Regular Examinations, November 2008 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science & Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE
More informationJNTUWORLD. Code No: R
Code No: R09220504 R09 SET-1 B.Tech II Year - II Semester Examinations, April-May, 2012 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering) Time: 3 hours Max. Marks: 75 Answer any five
More informationUNIT I PART A PART B
OXFORD ENGINEERING COLLEGE (NAAC ACCREDITED WITH B GRADE) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS YEAR/SEM: III/V STAFF NAME: Dr. Sangeetha Senthilkumar SUB.CODE: CS6503 SUB.NAME:
More informationAUTOMATA THEORY AND COMPUTABILITY
AUTOMATA THEORY AND COMPUTABILITY QUESTION BANK Module 1 : Introduction to theory of computation and FSM Objective: Upon the completion of this chapter you will be able to Define Finite automata, Basic
More informationMultiple Choice Questions
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM
More informationVALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III Year, V Semester Section : CSE - 1 & 2 Subject Code : CS6503 Subject
More informationQUESTION BANK. Unit 1. Introduction to Finite Automata
QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )(Jun-Jul 10) 2. Obtain a DFA to accept strings of a s and b s having even
More informationQUESTION BANK. Formal Languages and Automata Theory(10CS56)
QUESTION BANK Formal Languages and Automata Theory(10CS56) Chapter 1 1. Define the following terms & explain with examples. i) Grammar ii) Language 2. Mention the difference between DFA, NFA and εnfa.
More informationCT32 COMPUTER NETWORKS DEC 2015
Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10
More information1. Which of the following regular expressions over {0, 1} denotes the set of all strings not containing 100 as a sub-string?
Multiple choice type questions. Which of the following regular expressions over {, } denotes the set of all strings not containing as a sub-string? 2. DFA has a) *(*)* b) ** c) ** d) *(+)* a) single final
More informationT.E. (Computer Engineering) (Semester I) Examination, 2013 THEORY OF COMPUTATION (2008 Course)
*4459255* [4459] 255 Seat No. T.E. (Computer Engineering) (Semester I) Examination, 2013 THEY OF COMPUTATION (2008 Course) Time : 3 Hours Max. Marks : 100 Instructions : 1) Answers to the two Sections
More informationAnswer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10.
Code No: 134BD Set No. 1 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name:
More informationCS402 Theory of Automata Solved Subjective From Midterm Papers. MIDTERM SPRING 2012 CS402 Theory of Automata
Solved Subjective From Midterm Papers Dec 07,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 MIDTERM SPRING 2012 Q. Point of Kleen Theory. Answer:- (Page 25) 1. If a language can be accepted
More informationAutomata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81%
Automata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81% 1. (2 pts) See text. You can t be sloppy defining terms like this. You must show a bijection between the natural numbers
More informationCS 44 Exam #2 February 14, 2001
CS 44 Exam #2 February 14, 2001 Name Time Started: Time Finished: Each question is equally weighted. You may omit two questions, but you must answer #8, and you can only omit one of #6 or #7. Circle the
More informationAUBER (Models of Computation, Languages and Automata) EXERCISES
AUBER (Models of Computation, Languages and Automata) EXERCISES Xavier Vera, 2002 Languages and alphabets 1.1 Let be an alphabet, and λ the empty string over. (i) Is λ in? (ii) Is it true that λλλ=λ? Is
More informationCompiler Construction
Compiler Construction Exercises 1 Review of some Topics in Formal Languages 1. (a) Prove that two words x, y commute (i.e., satisfy xy = yx) if and only if there exists a word w such that x = w m, y =
More informationUniversity of Nevada, Las Vegas Computer Science 456/656 Fall 2016
University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen
More informationDHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR-621113 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Third Year CSE( Sem:V) CS2303- THEORY OF COMPUTATION PART B-16
More informationDerivations of a CFG. MACM 300 Formal Languages and Automata. Context-free Grammars. Derivations and parse trees
Derivations of a CFG MACM 300 Formal Languages and Automata Anoop Sarkar http://www.cs.sfu.ca/~anoop strings grow on trees strings grow on Noun strings grow Object strings Verb Object Noun Verb Object
More informationJAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.
R 13 Code No: 114CS JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B. Tech II Year II Semester Examinations, May -2016 DESIGN AND ANALYSIS OF ALGITHMS (Computer Science Engineering) Time: 3 hours
More informationThe Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems
The Turing Machine Unsolvable Problems Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical machine
More informationQUESTION BANK B.TECH II YEAR II SEM (R17) ( ) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
QUESTION BANK B.TECH II YEAR II SEM (R17) (2018-19) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Autonomous Institution UGC, Govt. of India) Recognized
More informationDecidable Problems. We examine the problems for which there is an algorithm.
Decidable Problems We examine the problems for which there is an algorithm. Decidable Problems A problem asks a yes/no question about some input. The problem is decidable if there is a program that always
More informationR10 SET a) Explain the Architecture of 8085 Microprocessor? b) Explain instruction set Architecture Design?
Code No: R22054 COMPUTER ORGANIZATION (Com. to CSE, ECC) 1. a) Explain the Architecture of 8085 Microprocessor? b) Explain instruction set Architecture Design? 2. Explain Memory Subsystem Organization
More information1. [5 points each] True or False. If the question is currently open, write O or Open.
University of Nevada, Las Vegas Computer Science 456/656 Spring 2018 Practice for the Final on May 9, 2018 The entire examination is 775 points. The real final will be much shorter. Name: No books, notes,
More informationCpSc 421 Final Solutions
CpSc 421 Final Solutions Do any eight of the ten problems below. If you attempt more than eight problems, please indicate which ones to grade (otherwise we will make a random choice). This allows you to
More informationTheory Bridge Exam Example Questions Version of June 6, 2008
Theory Bridge Exam Example Questions Version of June 6, 2008 This is a collection of sample theory bridge exam questions. This is just to get some idea of the format of the bridge exam and the level of
More informationDecision Properties for Context-free Languages
Previously: Decision Properties for Context-free Languages CMPU 240 Language Theory and Computation Fall 2018 Context-free languages Pumping Lemma for CFLs Closure properties for CFLs Today: Assignment
More informationROEVER COLLEGE OF ENGINEERING AND TECHNOLOGY Elambalur, Perambalur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-I AUTOMATA
ROEVER COLLEGE OF ENGINEERING AND TECHNOLOGY Elambalur, Perambalur 621 220 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III / V Subject Code : CS6503 Subject Name : Theory of Computation
More informationRegular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.
Regular Languages (14 points) Problem 1 (6 points) inimize the following automaton Show that the resulting DFA is minimal. Solution: We apply the State Reduction by Set Partitioning algorithm (särskiljandealgoritmen)
More informationCS402 - Theory of Automata FAQs By
CS402 - Theory of Automata FAQs By Define the main formula of Regular expressions? Define the back ground of regular expression? Regular expressions are a notation that you can think of similar to a programming
More informationFormal Languages and Automata
Mobile Computing and Software Engineering p. 1/3 Formal Languages and Automata Chapter 3 Regular languages and Regular Grammars Chuan-Ming Liu cmliu@csie.ntut.edu.tw Department of Computer Science and
More informationModels of Computation II: Grammars and Pushdown Automata
Models of Computation II: Grammars and Pushdown Automata COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Catch Up / Drop in Lab Session 1 Monday 1100-1200 at Room 2.41
More informationCS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG) Objectives Introduce Pushdown Automaton (PDA) Show that PDA = CFG In terms of descriptive power Pushdown Automaton (PDA) Roughly
More informationTheory of Computation
Theory of Computation For Computer Science & Information Technology By www.thegateacademy.com Syllabus Syllabus for Theory of Computation Regular Expressions and Finite Automata, Context-Free Grammar s
More informationFormal Grammars and Abstract Machines. Sahar Al Seesi
Formal Grammars and Abstract Machines Sahar Al Seesi What are Formal Languages Describing the sentence structure of a language in a formal way Used in Natural Language Processing Applications (translators,
More informationCS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I
CS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I 1) Is it true that the language accepted by any NDFA is different from the regular language? Justify your answer. 2) Describe the following sets
More informationFinite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur
Finite Automata Dr. Nadeem Akhtar Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur PhD Laboratory IRISA-UBS University of South Brittany European University
More informationFinal Course Review. Reading: Chapters 1-9
Final Course Review Reading: Chapters 1-9 1 Objectives Introduce concepts in automata theory and theory of computation Identify different formal language classes and their relationships Design grammars
More informationQUESTION BANK CS2303 THEORY OF COMPUTATION
QUESTION BANK CS2303 THEORY OF COMPUTATION UNIT-I AUTOMATA PART-A(2-MARKS) 1 What is Computation? and Write short notes on TOC. 2 Define Automaton 3 Define Inductive and Deductive proof 4 Define hypothesis.
More informationPDA s. and Formal Languages. Automata Theory CS 573. Outline of equivalence of PDA s and CFG s. (see Theorem 5.3)
CS 573 Automata Theory and Formal Languages Professor Leslie Lander Lecture # 20 November 13, 2000 Greibach Normal Form (GNF) Sheila Greibach s normal form (GNF) for a CFG is one where EVERY production
More informationCSCI 340: Computational Models. Turing Machines. Department of Computer Science
CSCI 340: Computational Models Turing Machines Chapter 19 Department of Computer Science The Turing Machine Regular Expressions Acceptor: FA, TG Nondeterminism equal? Yes Closed Under: L 1 + L 2 L 1 L
More informationLearn Smart and Grow with world
Learn Smart and Grow with world All Department Smart Study Materials Available Smartkalvi.com TABLE OF CONTENTS S.No DATE TOPIC PAGE NO. UNIT-I FINITE AUTOMATA 1 Introduction 1 2 Basic Mathematical Notation
More informationCS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/ ItIauIafIaAblll~AladUnrtel1ity
CS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/2015-16 ItIauIafIaAblll~AladUnrtel1ity ~ t; ~~ ) MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL Paper Code: CS-402 FORMAL LANGUAGE AND AUTOMATA THEORY
More informationTOPIC PAGE NO. UNIT-I FINITE AUTOMATA
TABLE OF CONTENTS SNo DATE TOPIC PAGE NO UNIT-I FINITE AUTOMATA 1 Introduction 1 2 Basic Mathematical Notation Techniques 3 3 Finite State systems 4 4 Basic Definitions 6 5 Finite Automaton 7 6 DFA NDFA
More informationAutomata Theory CS S-FR Final Review
Automata Theory CS411-2015S-FR Final Review David Galles Department of Computer Science University of San Francisco FR-0: Sets & Functions Sets Membership: a?{a,b,c} a?{b,c} a?{b,{a,b,c},d} {a,b,c}?{b,{a,b,c},d}
More informationOutline. Language Hierarchy
Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Language Hierarchy Regular: finite memory CFG/PDA: infinite memory but in stack space TM: infinite
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down
More informationTAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function
TAFL 1 (ECS-403) Unit- V 5.1 Turing Machine 5.2 TM as computer of Integer Function 5.2.1 Simulating Turing Machine by Computer 5.2.2 Simulating Computer by Turing Machine 5.3 Universal Turing Machine 5.4
More informationUNIT 1 SNS COLLEGE OF ENGINEERING
1 SNS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING THEORY OF COMPUTATION TWO MARKS WITH ANSWERS UNIT 1 1. Define set. A set is a collection of objects. E.g.: The collection of
More informationTuring Machine Languages
Turing Machine Languages Based on Chapters 23-24-25 of (Cohen 1997) Introduction A language L over alphabet is called recursively enumerable (r.e.) if there is a Turing Machine T that accepts every word
More informationAmbiguous Grammars and Compactification
Ambiguous Grammars and Compactification Mridul Aanjaneya Stanford University July 17, 2012 Mridul Aanjaneya Automata Theory 1/ 44 Midterm Review Mathematical Induction and Pigeonhole Principle Finite Automata
More information1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:
P R O B L E M S Finite Autom ata. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: a) Are a multiple of three in length. b) End with the string
More informationUniversal Turing Machine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Theorem Decidability Continued
CD5080 AUBER odels of Computation, anguages and Automata ecture 14 älardalen University Content Universal Turing achine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Decidability
More informationFormal Languages and Compilers Lecture VI: Lexical Analysis
Formal Languages and Compilers Lecture VI: Lexical Analysis Free University of Bozen-Bolzano Faculty of Computer Science POS Building, Room: 2.03 artale@inf.unibz.it http://www.inf.unibz.it/ artale/ Formal
More informationKHALID PERVEZ (MBA+MCS) CHICHAWATNI
FAQ's about Lectures 1 to 5 QNo1.What is the difference between the strings and the words of a language? A string is any combination of the letters of an alphabet where as the words of a language are the
More informationI have read and understand all of the instructions below, and I will obey the Academic Honor Code.
Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2014, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all
More informationComputation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer
Computation Engineering Applied Automata Theory and Logic Ganesh Gopalakrishnan University of Utah ^J Springer Foreword Preface XXV XXVII 1 Introduction 1 Computation Science and Computation Engineering
More information3 rd Year - Computer Science and Engineering,
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING 3 rd Year - Computer Science and Engineering, 5th Semester Theory of Computation QUESTION BANK 2 Marks Question and Answer 1. Define set. A set is a collection
More informationTheory of Computation Dr. Weiss Extra Practice Exam Solutions
Name: of 7 Theory of Computation Dr. Weiss Extra Practice Exam Solutions Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try to be
More informationCS154 Midterm Examination. May 4, 2010, 2:15-3:30PM
CS154 Midterm Examination May 4, 2010, 2:15-3:30PM Directions: Answer all 7 questions on this paper. The exam is open book and open notes. Any materials may be used. Name: I acknowledge and accept the
More information1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}.
1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}. (a) 0(010) 1 Examples: 01, 00101, 00100101, 00100100100101 (b) (21 10) 0012
More informationRegular Languages. MACM 300 Formal Languages and Automata. Formal Languages: Recap. Regular Languages
Regular Languages MACM 3 Formal Languages and Automata Anoop Sarkar http://www.cs.sfu.ca/~anoop The set of regular languages: each element is a regular language Each regular language is an example of a
More informationTheory of Computation, Homework 3 Sample Solution
Theory of Computation, Homework 3 Sample Solution 3.8 b.) The following machine M will do: M = "On input string : 1. Scan the tape and mark the first 1 which has not been marked. If no unmarked 1 is found,
More informationPushdown Automata. A PDA is an FA together with a stack.
Pushdown Automata A PDA is an FA together with a stack. Stacks A stack stores information on the last-in firstout principle. Items are added on top by pushing; items are removed from the top by popping.
More informationCOMP 330 Autumn 2018 McGill University
COMP 330 Autumn 2018 McGill University Assignment 4 Solutions and Grading Guide Remarks for the graders appear in sans serif font. Question 1[25 points] A sequence of parentheses is a sequence of ( and
More informationLanguages and Compilers
Principles of Software Engineering and Operational Systems Languages and Compilers SDAGE: Level I 2012-13 3. Formal Languages, Grammars and Automata Dr Valery Adzhiev vadzhiev@bournemouth.ac.uk Office:
More informationFront End: Lexical Analysis. The Structure of a Compiler
Front End: Lexical Analysis The Structure of a Compiler Constructing a Lexical Analyser By hand: Identify lexemes in input and return tokens Automatically: Lexical-Analyser generator We will learn about
More informationLECTURE NOTES THEORY OF COMPUTATION
LECTURE NOTES ON THEORY OF COMPUTATION P Anjaiah Assistant Professor Ms. B Ramyasree Assistant Professor Ms. E Umashankari Assistant Professor Ms. A Jayanthi Assistant Professor INSTITUTE OF AERONAUTICAL
More informationCS402 - Theory of Automata Glossary By
CS402 - Theory of Automata Glossary By Acyclic Graph : A directed graph is said to be acyclic if it contains no cycles. Algorithm : A detailed and unambiguous sequence of instructions that describes how
More informationLast lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions
Last lecture CMSC330 Finite Automata Languages Sets of strings Operations on languages Regular expressions Constants Operators Precedence 1 2 Finite automata States Transitions Examples Types This lecture
More informationChapter 14: Pushdown Automata
Chapter 14: Pushdown Automata Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu The corresponding textbook chapter should
More informationCS525 Winter 2012 \ Class Assignment #2 Preparation
1 CS525 Winter 2012 \ Class Assignment #2 Preparation Ariel Stolerman 2.26) Let be a CFG in Chomsky Normal Form. Following is a proof that for any ( ) of length exactly steps are required for any derivation
More informationLECTURE NOTES THEORY OF COMPUTATION
LECTURE NOTES ON THEORY OF COMPUTATION Dr. K Rajendra Prasad Professor Ms. N Mamtha Assistant Professor Ms. S Swarajya Lakshmi Assistant Professor Mr. D Abdulla Assistant Professor INSTITUTE OF AERONAUTICAL
More informationGlynda, the good witch of the North
Strings and Languages It is always best to start at the beginning -- Glynda, the good witch of the North What is a Language? A language is a set of strings made of of symbols from a given alphabet. An
More informationDefinition 2.8: A CFG is in Chomsky normal form if every rule. only appear on the left-hand side, we allow the rule S ǫ.
CS533 Class 02b: 1 c P. Heeman, 2017 CNF Pushdown Automata Definition Equivalence Overview CS533 Class 02b: 2 c P. Heeman, 2017 Chomsky Normal Form Definition 2.8: A CFG is in Chomsky normal form if every
More informationComputer Sciences Department
1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 D E C I D A B I L I T Y 4 Objectives 5 Objectives investigate the power of algorithms to solve problems.
More informationWe can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.
Other Automata We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. From all of this information we decide what state
More informationDepartment of Computer Science and Engineering
SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (AN ISO 9001:2008 Certified Institution) SIRUGANOOR, TRICHY 621 105 Department of Computer Science and Engineering QUESTION BANK Subject Code /Title:
More informationAssignment No.4 solution. Pumping Lemma Version I and II. Where m = n! (n-factorial) and n = 1, 2, 3
Assignment No.4 solution Question No.1 a. Suppose we have a language defined below, Pumping Lemma Version I and II a n b m Where m = n! (n-factorial) and n = 1, 2, 3 Some strings belonging to this language
More informationContext-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5
Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 1 Not all languages are regular So what happens to the languages which are not regular? Can we still come up with a language recognizer?
More informationHKN CS 374 Midterm 1 Review. Tim Klem Noah Mathes Mahir Morshed
HKN CS 374 Midterm 1 Review Tim Klem Noah Mathes Mahir Morshed Midterm topics It s all about recognizing sets of strings! 1. String Induction 2. Regular languages a. DFA b. NFA c. Regular expressions 3.
More informationMidterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama
Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all of
More informationQUESTION BANK ADVANCED DATA STRUCTURES Class II B.Tech (CSE-A&B) II Sem Name of the Faculty- K. Nuka Raju
DADI INSTITUTE OF ENGINEERING & TECHNOLOGY (Approved by A.I.C.T.E., New Delhi& Affiliated to JNTUK, Kakinada) NAAC Accredited Institute An ISO 9001:2008, 14001:2004 & OHSAS 18001:2007 Certified Institute
More information1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}
CSE 5 Homework 2 Due: Monday October 6, 27 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in
More informationPS3 - Comments. Describe precisely the language accepted by this nondeterministic PDA.
University of Virginia - cs3102: Theory of Computation Spring 2010 PS3 - Comments Average: 46.6 (full credit for each question is 55 points) Problem 1: Mystery Language. (Average 8.5 / 10) In Class 7,
More informationActually talking about Turing machines this time
Actually talking about Turing machines this time 10/25/17 (Using slides adapted from the book) Administrivia HW due now (Pumping lemma for context-free languages) HW due Friday (Building TMs) Exam 2 out
More information2. Lexical Analysis! Prof. O. Nierstrasz!
2. Lexical Analysis! Prof. O. Nierstrasz! Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes.! http://www.cs.ucla.edu/~palsberg/! http://www.cs.purdue.edu/homes/hosking/!
More informationDVA337 HT17 - LECTURE 4. Languages and regular expressions
DVA337 HT17 - LECTURE 4 Languages and regular expressions 1 SO FAR 2 TODAY Formal definition of languages in terms of strings Operations on strings and languages Definition of regular expressions Meaning
More informationSpecifying Syntax COMP360
Specifying Syntax COMP360 The most important thing in the programming language is the name. A language will not succeed without a good name. I have recently invented a very good name and now I am looking
More informationIntroduction to Syntax Analysis
Compiler Design 1 Introduction to Syntax Analysis Compiler Design 2 Syntax Analysis The syntactic or the structural correctness of a program is checked during the syntax analysis phase of compilation.
More informationRegular Languages and Regular Expressions
Regular Languages and Regular Expressions According to our definition, a language is regular if there exists a finite state automaton that accepts it. Therefore every regular language can be described
More informationMIT Specifying Languages with Regular Expressions and Context-Free Grammars
MIT 6.035 Specifying Languages with Regular essions and Context-Free Grammars Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Language Definition Problem How to precisely
More informationCMPT 755 Compilers. Anoop Sarkar.
CMPT 755 Compilers Anoop Sarkar http://www.cs.sfu.ca/~anoop Parsing source program Lexical Analyzer token next() Parser parse tree Later Stages Lexical Errors Syntax Errors Context-free Grammars Set of
More informationAutomating Construction of Lexers
Automating Construction of Lexers Regular Expression to Programs Not all regular expressions are simple. How can we write a lexer for (a*b aaa)? Tokenizing aaaab Vs aaaaaa Regular Expression Finite state
More informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6503 / THEORY OF COMPUTATION III YEAR / V SEM QUESTION BANK UNIT I AUTOMATA
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6503 / THEORY OF COMPUTATION III YEAR / V SEM QUESTION BANK UNIT I AUTOMATA 1. Why are switching circuits called as finite state systems? A switching circuit
More informationFrom Theorem 8.5, page 223, we have that the intersection of a context-free language with a regular language is context-free. Therefore, the language
CSCI 2400 Models of Computation, Section 3 Solutions to Practice Final Exam Here are solutions to the practice final exam. For some problems some details are missing for brevity. You should write complete
More informationClosure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.
Closure Properties of CFLs; Introducing TMs CS154 Chris Pollett Apr 9, 2007. Outline Closure Properties of Context Free Languages Algorithms for CFLs Introducing Turing Machines Closure Properties of CFL
More information