FORMAL LANGUAGES AND AUTOMATA THEORY
|
|
|
- Noreen Horn
- 9 years ago
- Views:
Transcription
1 FORMAL LANGUAGES AND AUTOMATA THEORY COURSE OBJECTIVE The purpose of this course is to acquaint the student with an overview of the theoretical foundation of computer science from the perspective of formal languages To classify machines by their power to recognize languages Employ finite state machines to solve problems in computing. Explain deterministic and non-deterministic machines Comprehend the hierarchy of problems arising in the computer sciences. JNTU SYLLABUS UNIT-I Fundamentals: Strings, Alphabet, Language, Operations, Finite state machine, definitions, finite automaton model, acceptance of strings, and languages, deterministic finite automaton and non deterministic finite automaton, transition diagrams and language recognizers. UNIT-II Finite Automata: NFA with ε transitions - Significance, acceptance of languages. Conversions and Equivalence: Equivalence between NFA with and without ε transitions, NFA to DFA conversion, minimization of FSM, equivalence between two FSM s, Finite Automata with output -Moore and Melay machines. UNIT-III Regular Languages: Regular sets, regular expressions, identity rules, Constructing finite Automata for a given regular expressions, Conversion of Finite Automata to Regular Expressions, Pumping lemma of regular sets, closure properties of regular sets (proofs not required) UNIT-IV Grammar Formalism: Regular grammars - right linear and left linear grammars, equivalence between regular linear grammar and FA, inter conversion, Context free grammer, derivation trees, sent ential forms Rightmost and leftmost derivat ion of strings. UNIT-V Context Free Grammars: Ambiguity in context free grammars, Minimization of Context Free Grammars, Chomsky normal form, Greiback normal form, Pumping Lemma for Context Free Languages. Enumeration of Properties of CFL (proofs omitted).
2 UNIT - VI Push down automata: Push down automata, definition, model, acceptance of CFL, Acceptance by final state and acceptance by empty state and its eqivalence. Equivalence of CFL and PDA, interconvers ion. (Proofs not required), introduction to DCFL and DPDA. UNIT - VII Turing Machine: Turing Machine, definition, model, design of TM, Computable functions, recursively enumerable languages. Chruch s hypothesis, counter machine, types of Turing machines (Proofs not required). UNIT - VIII Computability Theory: Chomsky hierarchy of languages, linear bounded automata and context sensitive language,lr(0) grammar, decidability of problems, Universal Turing Machine, undecidability of posts Correspondence problem, Turing reducibility, Definition of P and NP problems, NP complete and NP hard problems. SUGGESTED BOOKS TEXT BOOKS : T1 : Hopcroft H.E. & Ullman J.D., Introduction to Automata Theory Languages and Computation - Pearson Education T2 : Thomson, Introduction to theory of computation,-sipser 2 nd edition REFERENCE BOOKS : R1 : Daniel I.A. Cohen, John Wiley, Introduction to languages and the Theory of Computation. R2 : John C Martin, Introduction to languages and the Theory of Computation - McGraw Hill. R3 : Lewis H.P. & Papadimition Elements of Theory of Computation - C.H. Pearson/PHI. R4 : Mishra and Chandrashekaran, Theory of computer science - Automata, Languages, and Computation, 2 nd edition, PHI SESSION PLAN : Topics in each unit as per JNTU syllabus Fundamentals Lecture No. 1 2 UNIT I Modules / Sub-modules for each topic Introduction to the Subject - FLAT Strings, Alphabet, Language, Null String, Operations Text Books / References Books T1: 1.5, R4: 1.3
3 Finite State Machine 3 Finite Automata 4 Finite State Machine, definitions with examples Finite Automaton Model, Acceptance of Strings and Languages Types of Finite Automata 5 Deterministic Finite Automaton and Non Deterministic Finite Automaton Applications of Finite Automata 6 Transition Diagrams, Language Recognizers 7 Tutorial 8 Revision UNIT I T1: 2.1, R4: 2.1 T1: 2.2, R4: 2.5 T1: 2.2, R4: 2.6 T1: 2.2, R4: 2.6 UNIT II NFA with -transitions Equivalence and Conversions NFA with -transitions - Definition with examples, Significance Acceptance of languages Equivalence and Conversions of NFA with -transitions and NFA without -transitions Equivalence and Conversions of NFA and DFA T1:2.5.1 T1:2.5.5 T1:2.3.5, R4: 2.7 Minimization of Finite State Machine 14 Minimization of FSM T1:4.4,R4:2.9 Equivalence of Finite State Machines 15 Equivalence between two FSMs T1:4.4,R4:2.9 Finite Automata with output Conversions 18 Finite Automata with output - Moore and Mealy Machines definitions with examples Conversion of Moore Machine to Mealy Machine R4: 2.8 R4: 2.8 Conversion of Mealy T1:4.4, R4: Machine to Moore Machine Designing Machines 20 Designing Machines T1:4.4, R4: Tutorial 22 Revision UNIT II
4 Regular Languages 23 Conversions Importance of Regular Sets Grammar Formalism 30 Equivalence and Conversions UNIT III Regular Sets, Regular Expressions Identity Rules Constructing Finite Automata for a given Regular Expression Conversion of Finite Automata to a Regular Expression Pumping lemma of Regular Sets Closure properties of Regular Sets 28 Tutorial 29 Revision UNIT III Context Free Grammar 34 Derivation Trees 35 UNIT IV T1:3.1, R4: 4.1 T1:3.2, R4: 4.2 T1:3.2, R4: 4.2 T1:4.1, R4: 4.3 T1:4.2, R4: 4.5 Regular Grammars - Right Linear and Left Linear Grammars - Definitions with R4: 4.6 examples Equivalence between regular linear grammar and FA R4: 4.6 Converting a Regular R4 :4.6 Grammar to a FA Converting a FA into a R4: 4.6 regular grammar Context Free Grammar Definition with examples Derivation Trees, Sentential Forms Right most and left most derivation of strings 36 Tutorial 37 Revision UNIT IV T1:4.9 R4: 4.7 T1:5.1 R4: 5.1 T1:5.1 R4: 5.1 Ambiguity and Minimization of Context Free Grammars 38 UNIT V Ambiguity in Context Free Grammars T1:5.4 R4: 5.2
5 Normal Forms Context Free Languages Minimization of Context T1: Free Grammars R4: 5.3 Chomsky Normal Form T1: R4: Greiback Normal Form 42 Pumping Lemma for Context Free Languages 43 Enumeration of properties of CFL 44 Tutorial 45 Revision UNIT V T1: R4: 5.4 T1:7.2 T1:7.3,7.4 UNIT VI Push Down Automata 46 Acceptance and Equivalence 47 Equivalence and Conversions 48 Push Down Automata Definition, Model, Acceptance of CFL Acceptance by final state, Acceptance by empty state and its equivalence Equivalence of CFL and PDA Converting CFL to PDA 49 Converting PDA to CFL Introduction to DCFL and DPDA 50 Deterministic CFL (DCFL) Deterministic PDA(DPDA) 51 Tutorial 52 Revision UNIT VI UNIT VII T1: 6.1, 6.2 R4: 6.1,6.2 T1: 6.1, 6.2 R4: 6.1,6.2 T1: 6.3, R4: 6.3 T1: 6.3, R4: 6.3 T1: 6.4 Turing Machine Design of Turing Machines Applications of Turing Machine Turing machine - Definition, Model Design of TM - complement Design of TM add, substract Design of TM multiply, divide Computable Functions, Recursively Enumerable Languages T1: 8.2, 8.3 R4: T1: 8.2, 8.3 R4: T1: 8.2, 8.3 R4: T1: 8.2, 8.3 R4: T1: 8.6, T1: 9.3
6 Church s Hypothesis T1: Types of Turing Machines 58 Counter Machine Types of Turing machine T1:8.4 T1: Tutorial 60 Revision UNIT VII Computability Theory 61 UNIT VIII Chomsky Hierarchy of Languages, Linear Bounded Automata Context SensitiveLanguage R4:7.6,8.1 LR Grammars 62 Extensibility of Turing Machine Posts Correspondence Problem 63 P and NP Problems LR(k) grammar, properties LR(0) grammar, decidability of problems Universal Turing Machine, Turing Reducibility Undecidability of posts Correspondence problem P and NP problems NP complete and NP hard problems R4:7.7 R4:7.7 T1:9.1,9.2 T1:9.3,9.4 T1:10.1, Tutorial 65 Revision UNIT VIII BOOKS REFERED BY FACULTY : T1 : Hopcroft H.E. & Ullman J.D., Introduction to Automata Theory Languages and Computation - Pearson Education R4 : Mishra and Chandrashekaran, Theory of computer science - Automata, Languages, and Computation, 2 nd edition, PHI WEBSITES :
7 JOURNALS : 1. IEEE transactions on Computer Science 2. IEEE transactions on Fuzzy Systems 3. IEEE transactions on Neural Networks 4. IEEE Computer magazine 5. IEEE transaction in softwar e engineering STUDENTS SEMINAR TOPICS 1. Languages of context free grammars, RAIRO infrimatique theoeique applications, Jurgen Dassow, Victor Mitrana, Page No Finite automata over free groups International Journal of Algebra and computation Jurgen Dassow, Victor Mitrana,Page No On the Regularity of languages generated by context free evolutionary grammars, Discrete applied mathematics Jurgen Dassow, Gheorghe paun Page No Computer studies of Turing machine problems, Journal of the Association for computing machinery, Lin s and Rado.T. Page No GUEST LECTURE TOPICS : 1. Church s Hypothesis 2. P and NP problems 3. NP complete and NP hard problems 4. Universal Turing machine 5. Counter machines ASSIGNMENT QUESTIONS : UNIT- I 1. Explain Finite State Machine? 2. Draw the block diagram of Finite State Machine? 3. Explain the different operations performed on sets? 4. Explain The terms String, Alphabet? 5. Explain the term Language? 6. Explain the Acceptance of strings And Languages? 7. Describe the Non deterministic finite automata? 8. Describe the Deterministic finite automata?
8 9. Write the procedure to convert NFA to DFA? 10. Explain Transition diagrams? 11 Describe language recognizers? 12. Construct an NFA that accepts all strings such that the fifth symbol from the left end is zero. Over the alphabet { 0,1} 13 Give a Deterministic Finite automata (DFA) accepting the set of all strings over the alphabet {a,b} having three cons ecutive a s 14. i. Differentiate NFA and DFA with respected to transition and acceptance. ii. Draw DFA which accepts even no a s over the alphabet {a, b} iii. Construct DFA equivalent to the following Finite state machine. 15. What is the generating function G (z) for the sequence of fibonacci numbers? 16. Construct a finite state machine with minimum no of states accepting all strings over (a, b), such that the no of a s is divisible by two and the no of b s is divisible by three. 17. Given that L is a language accepted by a finite state machine, show that Lp and LR are also accepted by some finite state machines, where Lp={s?ss? L some string.s } LR={s?s obtainable by reversing some string in L} 18. Which of the following set can be recognizing by a deterministic finite-state automaton? i. The numbers 1, 2, 4, 8, 2n, written in binary. ii. The numbers1, 2, 4,, 2n,..written in unary. iii. The set of binary string in which the number of zeros is the same as the number of ones. iv. The set {1, 101, 11011, , } 19. The string 1101 dose not belong to the set represented by i. 110*(0+1) ii. 1(0+1)*101 iii. (10)*(01)*(00+11)* iv. (00+(11)*0)* 20. What is the difference between kleen closure and positive closure?? UNIT-II 1. Construct an NFA for 110(0+1)*(10+01)* 2. (a) Constance state Transition Table for the Moore machine given in Figure below. 3. Construct a minimum automation equivalent to a given automation. A b Output q0 q1 q2 0 q1 q2 q3 0 q2 q3 q4 1
9 q3 q4 q4 0 q4 q0 q Give Mealy and Moore machines for input from (0+1+2)* that gives residue modulo 4 of the input treated as binary 5. Give Moore and Melay machines for input from (0+1+2)* that pri nts the residue modulo 5 of the input treated as ternary(base 3) 6. Prove: Let L be a set accepted by a non deterministic finite automata. Then there exists a DFA that accepts L 7. Construct state transition table for the following Moore machine 8. For the following NFA, compute the equivalent DFA. 9. Prove that for every NFA there will be equivalent DFA. 10. Give Mealy and moore machines for input from (0+1)* that gives residue modulo 4 of the input treated as binary 11. Explain the procedure for minimization of an Finite State machine, with the help of an example 12. A finite state machine with the following state table has a single input x and a single out z. 13. Let Nf and Np denote the classes of languages accept ed by non-deterministic finite automata and non-deterministic push - down automata, respectively. Let D1 and D2 denote the classes of languges accepted by deterministic finite automata and determininstic push - down automata respectively. which one of the following is TRUE. (Gate 05) a) Df Nf and Dp Np b) Df Nf and Dp =Np c) Df =Nf and Dp =Np d) Df =Nf and Dp Np 14. Explain moor e and mealy machines 15. Construct the Moore machine for given Mealy machine. 16. Minimize the Finite automation given below and show both given and reduced are equivalent. 17. Define NFA mathematically. Explain its significance and the functioning. Convert the given Finite automation into Deterministic equivalent. Explain a method used. Taking suitable example prove both accept the same strings. 18 Construct the Moose machine for given Melay machine. 19. Given below are the transactions diagrams from two finite state machines M1and M2 recognizing Languages L1and L2 respectively. i. Display the transition diagram for a machine to recognizes L1, L2, obtained from transition diagram for M1 and M2by adding only & transitions and no new states.
10 ii. Modify the transition diagram obtained in part (a) obtain a transition diagram for a machine that recognizes (L1 L2) by adding only? transitions and no new states. 20. The language recognized by M is. a) {W? {a,b} * every a in w is followed by exactly two b s} b) {W? {a,b} * every a in w is followed by at least two b s} c) {W? {a,b} * W contains the substring abb } d) {W? {a,b} * W does not contain aa as a substring} UNIT - III 1. List the closure properties of regular sets and explain any two of them. ( 2. State and explain Arden s theorem with a suitable example. 3. Construct FA for regular expression 0* Construct a FA accepting all strings over {a, b} ending in aba or aaba. 5. Show that L = is not regular. State and explain the theorem used. 6. State and explain pumping Lemma. 7. Prove L = {R/ (a/b)} is not regular. 8. Construct FA which accepts the regular expression 10+(0+11)0*1. 9. (a) Find the regular grammar for the following automata. 10. (a) Construct the NFA for the regular expression r =0* (b) Consider the FA and construct regular expressions that is accepted by it. 11. If L1 and L2 are recursive languages then show that L1?L2 and L1? L2 are also recursive. 12. Show that the language L = { 0n 1n/ n? 0} 13. Define and Explain the terms Regular sets, Regula r expressions and closure properties 14. Give the recursive definition for regular expression 15. With the help of recursive definition above definition, prove whether the following expression is regular or not. E = (0+1)* 111* 16. Explain Pumping Lemma with example 17. Give the word description for the following regular expression i * (0+1) ii. 11 ( iv. 110(0+1)* (10+01)* 18. For the following Regular expressions, give the corresponding FSA. (Eliminate E-Transitions, if any)
11 i. 11(0+1 (01)*) ii. 11 ( 19. Give the pumping Lemma : explain its applications, with an example 20. Prove the following identities (AB)*A = A(BA)* where A, B are regular expressions UNIT - IV 1. (a) Construct an DFA for the following regular grammar 2. Eliminate all unit and 2-productions from 2. (a) Define the Handler. For the derivation aabb find the viable prefixes of the grammar shown below. 3. When an item is said to be complete, find the sets of LR(0) items. 4. (a) Construct finite automata recognizing the following grammar., 5. Describe the language generated by the grammar 6. Give the rigorous definition for a derivation tree and gi ve an example. 7. Construct a regular grammar G generating the regular set represented by a*b(a+b)*. 8. Give the CFG to generating the following sets The set of all strings of balanced parenthesis 9. Consider the grammar G = (V, E, R S) where V = {a, b, s, A} E = {a, b} R = { S a A a, S bab S A A SS } Construct a derivation tree and left most derivation to yield the string baabbb in G 10. Let G be a grammar with productions S ab ba A a bs baa B b bs a bb Check whether aaabba is in L(G).
12 11. Construct the CFG that generates the language L = {WC W R / W Є {a, b}* } 12. Consider the CFG, G = (V, T, P, S) where V = {S, A}, T = {a, b}, P = {S?AA, A?AAA, A?a, A?bA, A?Ab}. Give leftmost and rightmost derivations for the string babbab. Specify whether the CFG is Ambiguous or Not 13. For the following Finite State Machine Construct an equivalent grammar 14. What are right linear and left linear grammars. Construct left -linear and rightlinear grammars for the language 110*(1(0+1))* 15. List the properties of Context Free Languages 16. Prove the following identity (0*01+10)*0* = ( )* 17. Construct right-linear and left linear grammars for the following regular expression 11(0+1)* 11 (1+0)* 18. Construct right-linear and left linear grammars for the following regular expression 101(0+1)* (10+01)* 19. Construct left linear and right linear grammars for the language 11(0+1)* 00 (0+1)* 20. Construct the NFA for the regular expression r = 0*1 ((0+1)0*1)* (2+(0+1) (00)*)+0(00)* UNIT-V 1. Design a PDA to accept the following CFG 2. Explain properties of C.F. languages. 3. Discuss the Chomsky Hierarchy of languages. 4. For the grammar shown below construct the sets of LR(0)items. 5. Construct PDA to accept the strings generated by following CFG S aabc A ab/c B ba/b C a. 6. Let G= ({S}, {a, b} R, S) be? context free grammar where the rule set R is S??S b? S S??
13 7. A grammar G is in Chomsky-normal form (CNF) if all its productions are of the form A BC or A a, where A, B and C are non-terminals and a is a terminal. Suppose G is a CFG in CNF and W is a string in L(G) of length, then how long is a derivation of W in G. 8. Give a CFG for the even palindrome over the alphabet (0,1) and design a pushdown automata for the same. 9. Convert the following Grammar to GNF S AA a, A SS b 10. Construct a PDA equivalent to the following grammar: S aaa, A as bs a 11. Find a Greibach normal-form grammar equivalent to the following CFG. S AA 0 A SS Write short notes on Ambiguous Grammar 13. Consider the following statements about the context free grammar. I. G is ambiguous II. G produces all strings with equal number of a s and b s III.G. can be accepted by a deterministic PDA Which combination below expresses all the true statements abou t G? 14. Find a Greibach normal-form grammar equivalent to the following CFG. S AA a A SS b 15. Write short notes on CFL proparties? 16. What is meant by Ambiguous Grammar? 17. Show that the grammar S a absb aab A bs a Aab is ambiguous 18. Reduce the following Grammars to the Chomsky normal form S 1A 0B A 1AA 0S 0 B 0BB 1S Show that the grammar is ambiguous. S ab ab A a AB a B AB b 20. Define and Explain the terms, Chomsky s normal form, Greibach normal-form
14 UNIT - VI 1. (a) Construct Push Down Automata equivalent to the grammar and verify the result for aabaaa., 2. Prove or explain that if L is a Context Free Language then there exists an equivalent Push Down Automata. 3.. (a) Construct PDA for the grammar S-> aa A->aABC/bB/a B-> b C-> c 4. Convert the following to CNF S-> 0S0/1S1/A A-> 2B3 B-> 2B3/ 5. Prove that the grammar is ambiguous S-> asb/ss/ 6. Prove that the grammar is ambiguous S-> ab/aab, A-> a/aa, B-> b 7. (a) Convert the following grammar to CNF S-> AB A->a B->C/b C->a 8. Design a PDAto accept the language. L={anbmcman/m,n,1} 9. Explain LBA? 10. Give the CNF of the following grammar. S AB CA B BC AB A a C ab b 11. Every context free language is not a context sensitive. Why? Discuss withthehelp of productions. 12. What do you mean byprefix property of DCFL. 13. Discuss theconcept the conceptofviableprefix witha suitable example. 14. Every context free language is not a context sensitive. Why? Discuss with the help of productions. 15. What do you mean by prefix property of DCFL.
15 16. Discuss the concept of viable prefix with a suitable example. 17. Write short notes on DCFL and DPDA 18. Obtain a PDA to accept the language {L = an b2n / n? 1}. 19. Convert the following grammar to GNF S Ba/ab A aab/a B ABb/b 20. Convert the following grammar to CNF S AB1/0 A 00A/0 UNIT-VII 1 Construct Turing machine to accept following language and give its state transition table and diagram. Check the machine by tracing a suitable instance. L={an bm an+m;n 0, m 1}. 2. Explain the Turing reducibility in detail. 3. Construct Turing machine to accept following language and give its state transition table and diagram. Check the machine by tracing a suitable instance. L = { an bn an bn / n 1}. 4. Give formal definition of Turing Machine and explain the concept behind saying Turing Machine is more powerful than the digital compu ter. 5. Design Turing Machine To compliment a given binary number. 6. Design Turing Machine To compute f(x,y) = x+y for x and y positive integers represented in Unary. 7. Discuss different languages and their corresponding machines. 8. Explain how a RAM computer can be simulated using Turing Machine. 9. Design a Turing machine to multiply two integers. 10. Write short notes on Modifications of Turing Machines. 11. Design a Turing Machine to recognize the language. L = { an bn cn / n 1}. 12. Write short notes on Halting problem of Turing Machine. 13. What do you mean by reduction? Explain the Turing reducability. 14. What is LBA? Explain its model 15. Explain the halting problem of Turing machine; discuss why this problem is undecidable
16 16. Let M=({q0,q1},{0,1},{z0,X},?,q0,z0,?) be a pushdown automaton where? is given by?(q0, 1, z0) = {(q0, x z0)}?(q0,? z0) = {(q0,?)}?(q0, 1, X) = {(q0, XX)}?(q1, 1, X) = {(q1,?)}?(q0, 0, X) = {(q1, X)}?(q1, 0, z0) = {(q0, z0)} i. What is the language accepted by this PDA by empty store? ii. Describes informally the working of the PDA. 17. Design a Turing machine to recognize the language { 1n 2n 3n 18. Design T.M Design a T. M for the following function:- F(x,y) = MAX (x, y) 19. Define Turing Machine formally; explain how Turing Machine can be used to compute integer functions. Design the Turing Machine to compute following function, show its transition diagram also f(x, y) = xy where x and y are positive integers represented in unary. 20. Design a Turing machine to recognize the language {1n 2n 3n n? 1 }. UNIT VIII 1. Construct LR(0) items for the grammar given, find its equivalent DFA. Check the parsing by taking a suitable derived string.» is null. 2. Explain NP hard problems? 3. Write short notes on Reducability? 4. Explain PCP? 5. Describe UTM.? 6. Is concept of universal gates like Nor and Nand and the universal Turing machine same. Explain the UTM in detail 7. What is modifiedversion PCP? Show or explain that if the PCP is decidable then modified PCP is also decidable. 8. (a) Discuss different languages and their corresponding machines. (b) Writethe design procedureofshift reduce parserby takingasuitableexample. 9. Explain the terms: NP complete and NP hard problems with exampls. 10. Design a Turing Machine to enumerate: {0n 1n n? 1} 11. What is decidability? Explain any two undecidable problems.
17 12. Show that the following post correspondence problem has a solutio n and give the solution. List A List B i wi xi Discuss different languages and their corresponding machines. 14. Write the desing procedure of shift reduce passer by taking a suitable example. 15. Write short notes. LR(0) grammar. 16. Describe Context sensitive Languages. 17. Discuss Church s hypothesis. 18. Chomsky hierarchy of Languages. 19. Construct LR(0) itemsfor the grammar given, find its equivalent DFA. Check the parsing by taking a suitable derived string. is null. 20. Explain Rice s theorem for undecidable problems. QUESTION BANK: UNIT - I 1. (a) Find NFA which accepts the set of all strings over f0; 1g in which the number of occurrences of 0 is divisible by 3 and the number of occurrences of 1 is divisible by 2. (b) Draw the transition diagram for a NFA which accepts all strings with either two consecutive 0's or two consecutive 1's. (c) Differentiate NFA and DFA. (Nov 09,Reg) 2. (a) Define String, Alphabet and Language. (b) Prove that if δ(q,x) = δ(q,y), then δ(q,xz) = δ(q,yz) for all strings z in +. (c) Construct DFA and NFA accepting the set of all strings with three consecutive 0's. 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. (Nov 09,Reg) 4. (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
18 in which both the number of 0's and 1's are even. (c) Define NFA with an example 5. Construct NFAs for the following languages (a) The set of strings over alphabet {0,1,...,9} such that the final digit has appeared before. (b) The set of strings over alphabet {0,1,...,9} such that the final digit has not appeared before. (c) The set of strings of 0's and 1's such that there are two 0's separated by a number of positions that is a multiple of 4. Note that 0 is an allowable multiple of 4. (Nov 09, sup) 6. Design DFA for the following languages shown below: ={a, b } (a) L={w w does not contains the sub strings ab}. (b) L={w w contains neither the sub strings ab nor ba} (c) L={w w is any string that doesn't contain exactly two a's } (d) L={w w is any string except a and b} (Nov 09, sup) 7. Design DFA for the following over {0,1} (a) All string containing not more than three 0's (b) All strings that has at least two occurrences of 1 between any two occurrences of 0. (Nov 09, sup) 8. (a) Design a NFA for the language L ={aba n n>=1}. (b) Design a DFA, M that accepts the language. L(M) ={w w {a,b}* and w does not contain 2 consecutive b's. (Nov 09, sup) 9. (a) Design a DFA for the following language. L = {0m1n/m _ 0 and n _ 1} (Nov 08) (b) Represent all five tuples for below transition (diagram 1b) and decide whether it is DFA or NFA 10. (a) Design a DFA that accepts the set {an}u{b/n _ 1} (Nov 08,Nov 07) (b) Draw the transition diagram for below FA. M= { {A,B,C,D}, {0,1},,C, {A,C} } (A,0) = (A,1) = {A,B,C} (B,0) = B, (B,1) = { A, C } (C,0) = {B,C}, (C,1) ={ B, D } (D,0) = { A, B, C, D } (D,1) = {A}. 11. Construct DFA for the following: (Feb 08) (a) L={w/w has both an even number of 0 s and even number of 1 s } (b) L= { w/w is in the form of x01y for some strings x and y consisting of 0 sand 1 s}. 12. (a) Explain the differences between NFA and DFA (Feb 08) (b) Design a DFA which accepts all strings which are ending with 101 over an Alphabet {0,1}.
19 13. Construct NFAs for the following languages (Nov 07) (a) The set of strings over alphabet {0,1,...,9} such that the final digit has appeared before. (b) The set of strings over alphabet {0,1,...,9} such that the final digit has not appeared before. (c) The set of strings of 0 s and 1 s such that there are two 0 s separated by a number of positions that is a multiple of 4. Note that 0 is an allowable multiple of Construct DFA for the following: (Nov 07) (a) L={w/w has both an even number of 0 s and even number of 1 s } (b) L= { w/w is in the form of x01y for some strings x and y consisting of 0 s and 1 s}. UNIT II 1. (a) Write the steps in construction of minimum automaton. (b) Write the applications of Finite Automata. (c) Define NFA with Є-moves. (Nov 09,Reg) 2. (a) Write the steps in minimization of FA. (b) Construct a Moore machine to determine the residue mod 3 for each binary string treated as a binary integer. (Nov 09,Reg) 3. (a) Define NFA with Є-moves. (b) Differentiate Moore and Mealy machines. (c) Write the steps in minimization of FA. (Nov 09,Reg) 4. (a) Write the steps in construction of minimum automaton. (b) Discuss about Finite Automata with outputs in detail. 5. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (b) Design a Mealy machine that uses its state to remember the last symbol read and emits output `y' whenever current input matches to previous one, and emits n otherwise. (Nov 09, sup) 6. For the following NFA with 2 -moves convert it in to an NFA with out 2 -moves and show that NFA with 2-moves accepts the same language as shown in _gure (Nov 09, sup)
20 7. Minimize the following DFA. _ 0 1 q0 q1 q3 q1 q2 q4 q2 q1 q4 q3 q4 q2 q4 q4 q4 09, sup) (Nov 8. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (Feb 08) (b) Des ign a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. 9. For the following NFA with 2 -moves convert it in to an NFA with out 2 moves and show that NFA with 2-moves accepts the same language as shown in figure (Feb 08) 10. (a) Design a Moore machine to determine the residue mod 5 for each ternary string (base 3 ) treated as ternary integer. (Feb 08) (b) Convert the following Mealy machine into equivalent Moore machine as shown in figure 11. Construct DFA for given (figure 2) NFA with 2-moves. (Feb 08) 12. For the following NFA with 2 -moves convert it in to an NFA with out 2 movesand show that NFA with 2-moves accepts the same language as shown in figure (Feb 08) 13. Construct DFA for given (figure 2) NFA with 2-moves. (Feb 08) 14. (a) Shown in figure 2a (Feb 08) Con (b) Describe the language accepted by automata as shown in figure 15. (a) Design a Moore Machine to determine the residue mod 4 for each binary string treated as integer. (b) Design a Mealy machine that uses its state to remember the last symbol read and emits output y whenever current input matches to previous one, and emits n otherwise. 16. Define NFA mathematically. Explain its significance and function. Convert thegiven Finite automaton into its Deterministic equivalence. Explain method used.taking suitable example and prove both accept the same string. (Feb 07) 17. (a) Construct the Moore machine for Figure 2 Melay machine. (Feb 07) Figure 2: (b) Minimise the Finite automation given Figure 3 below and show both given and reduced are equivalent. (Feb 07)
21 UNIT III 1. Describe, in the English language, the sets represented by the following regular expressions: (a) a(a+b)*ab (b) a*b + b*a 2. (a) Prove the following identity: (a*ab + ba)* a* = (a + ab + ba)* (b) Construct transition systems equivalent to the regular expression (ab + a)* (aa +b) 3. (a) Show that L = fww j w " fa, bg*g is not regular. (b) Is L = fa2n j n>= 1g regular? (Nov 09,Reg) 4. For the following NFA with 2 -moves convert it in to an NFA with out 2 moves and show that NFA with 2-moves accepts the same language as shown in figure (Nov 09, sup) 5. Find a Regular expression corresponding to each of the following subsets over {0,1}*. (Feb 08) (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 Construct NFA for the following regular expressions (Feb 08) (a) 0+10* +01*0 (b) (0+1)*(01+110). 7. Give the English description and NFA for the following regular expressions. (Feb 08) (a) r=( )*(+0+00) (b) r=[00+11+(01+10)(00+11)*(01+10)]* 8. Give a regular expression for the set of all strings over {a, b} accepting all strings(feb 08) which have number of a s divisible by 6 and number of b s divisible by Find a Regular expression corresponding to each of the following subsets over {0,1}*. (Feb 08) (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 Construct a DFA accepting language represented by 0*1*2*. (Feb 08)
22 11. Find a Regular expression corresponding to each of the following subsets over {0,1}* (Feb 08) (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. [4 4] 12. Find Regular Expression for the following NFA s. (a) Figure 3a (b) Figure 3b 13. (a) List the closure properties of regular sets and explain any two of them. (Feb 07) (b) State and explain Arden s theorem with a suitable example. (c) Construct FA for regular expression 0* UNIT IV 1. (a) If G=({S}, {0, 1}, {S 0S1, S Є},S), find L(G). (b) Construct a G so that L(G) = {a n ba m m,n >= 1} 2. (a) Construct a G so that L(G) = {a n ba m m,n >= 1} (b) If G is S as a, then show that L(G) = {a} + 3. (a) Construct a grammar G generating {xx x Є {a, b}*} (b) Construct a grammar generating L = {wcw r w Є {a, b}*} 4. (a) Obtain a CFG to generate unequal number of a s and b s. (Feb 08,Nov 07) (b) Obtain a CFG to obtain balanced set of parentheses.(i.e every left parentheses should match with the corresponding right parentheses). 5. (a) Obtain a regular grammar to obtain the set of all strings not containing three consecutive 0 s. (b) Obtain a CFG to generate the set of all strings over alphabet {a,b} with exactly twice as many a s as b s. 6. (a) Obtain a Right Linear Grammar for the language (Feb 08) L = {anbm n >= 2,m >= 3 } (b) Obtain a Left Linear Grammar for the DFA as shown in figure 7. (a) Obtain regular grammar for the following FA as shown in figure (Nov 07) (b) What is the language accepted by above FA? (Nov 07)
23 8. (a) Obtain a regular grammar to obtain the set of all strings not containing three consecutive 0 s. (b) Obtain a CFG to generate the set of all strings over alphabet {a,b} with exactly twice as many a s as b s. 9. (a) Construct an DFA for the following regular grammar (Feb 07) (b) Eliminate all unit and 2-productions from 10. (a) Define the Handler. For the derivation aabb find the viable prefixes of the grammar shown below. (Feb 07) (b) When an item is said to be complete, find the sets of LR(0) items. UNIT V 1. (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 2. What is Chomsky Normal Form? Convert the following Context Free Grammar to Chomsky Normal Form. S AaB aab A Є B bba Є 3. (a) What do you mean by ambiguity? Show that the grammar S às/s, S à a is ambiguous. (b) Show that the grammar G with production Sa/aAb/abSb AaAAb/bS is ambiguous. (Feb 08) 4. (a) Show that L = {aibj/j = i2} is not context free language. (Feb 08) (b) List the properties of CFLs. (c) Find if the given grammar is finite or infinite. SAB, ABC/a, BCC/b, Ca. 5. (a) Simplify the grammar= { {S,A, B, C, E }, {a,b,c}, P, S } (Feb 08,Nov 07)) Where, P is S AB A a B b B C E c/^ (b) Prove that the following language is not context-free language L = {www w 2 {a, b} } is not context free.
24 6. (a) Reduce the Grammar G given by SàaAa (Nov 07) ASb/bcc/DaA Cabb/DD Eac DaDA into an equivalent grammar by removing useless symbols and useless productions from it. (b) Convert the following grammar into CNF. SaAD AaB/bAB Bb Dd. 7. (a) What do you mean by Greibach Normal Form (GNF). (Nov 07) (b) When is a CFG said to be in GNF? (c) Convert the following grammar into GNF : SAB ABS/b BSA/a. 8. (a) Reduce the Grammar G given by (Nov 07) SaAa ASb/bcc/DaA Cabb/DD Eac DaDA into an equivalent grammar by removing useless symbols and useless productions from it. (b) Convert the following grammar into CNF. SaAD AaB/bAB Bb Dd. 9. (a) Define the context free grammars in the 4 tuple form. (V, T, P, S) for the given languages on _ (a, b). (Nov 07) i. All strings having atleast two a s. ii. All possible strings not containing triple b s. (b) Find the context free grammar with no useless symbols equivalent to SAB/Ca, BBC/AB, Aa, CaB/b. (c) State in English about the language corresponding to below given grammar SaB/bA, Aa/aS/bAA, Bb/bS/aBB. 10. (a) Design a PDA to accept the following CFG (Feb 07) (b) Explain properties of C.F. languages. UNIT VI 1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata
25 (b) Convert the following Context Free Grammar to Push Down Automata S aaa A as bs a 2. (a) Convert the following Context Free Grammar to Push Down Automata S aa bb A ab a B b (b) Verify the string aab is accepted by equivalent Push Down Automata 3. Design Push Down Automata for the language L= {ww r w (0+1)* } 4. (a) Explain the terms: Push Down Automata and context free language. (Feb 08) (b) Let G be a CFG with the following productions. S a B c A a b c B a A b C A B C c Construct a PDA M such that the language generated by M and G are equivalent. 5. (a) Construct the PDA for the following grammar. (Feb 08) SAA/a ASA/b (b) Design a PDA for the following grammar. S-0A A0AB/1 B1. 6. Show that the languages (Feb 08) (a) L1={0n1m/n = m and n_ 1} (b) L2={0n1m / n=2m and n_ 1} Are deterministic context free languages? 7. (a) Let G be the grammar given by (Feb 08) SaABB/aAA, AaBB/a, BbBB/A Construct the PDA that accepts the language generated by this grammar G. (b) Define Deterministic pushdown automata. Explain with an example. 8. (a) Construct the PDA for the following grammar. (Nov 07) SAA/a ASA/b (b) Design a PDA for the following grammar. S0A A0AB/1 B1. 9. (a) Find the PDA with only one state that accepts the language {ambn : n > m } (Nov 07) (b) Construct the PDA that recognizes the languages L={x= R: x2{a,b}+}. 10. (a) Let G be the grammar given by (Nov 07) SaABB/aAA, AaBB/a, BbBB/A
26 Construct the PDA that accepts the language generated by this grammar G. (b) Define Deterministic pushdown automata. Explain with an example. 11. (a) Find the CFG corresponding to PDA whose transition mapping is as follows (Nov 07) ä(s,a, )=(s,a ) ä(s,b,a)=(s,aa) ä(s,a,a)=(s, ^). (b) Let G be a CFG that generates the set of palindromes given by SaSa/bSb/a/b Find the PDA that accepts L(G). UNIT - VII 1. Design Turing Machine for L = {0 n 1 n 0 n n >= 1} 2. Design Turing Machine which will recognize strings containing equal number of 0's and 1's 3. Design Turing Machine to find out GCD of two given numbers. 4. Design Turing Machine for L = {a n b n c n n >=1} 5. Give a Turing machine for the following: (Feb 08, Nov 07) (a) That computes ones complement of a binary number (b) That shifts the input string, over the alphabet (0,1) by one position right by inserting #2 as the first character. 6. (a) Design a Turing Machine that accepts the set of all even palindromes over { 0,1}. (Feb 08) (b) Given _ = {0,1}, design a Turing machine that accepts the language denoted by the regular expressions 00_. 7. Define Turing machine formally; explain how Turing machine can be used to compute integer functions. Design the Turing machine to compute following function, Show its transition diagram also f(x,y)=xy where x and y are positive integers represented in unary. (Nov 07) 8 Design a T.M for copying of information from one place to the other place. Assume all the necessary. Assumptions. Give Example of the working of your T.M. (Nov 07) 9. (a) What are the types of T.M s explain in brief; (Nov 07) (b) Explain the importance of Turing machine concept. 10. ConstructTuring machine to accept following language and give it state transition table and diagram. Check the machine by tracing a suitable instance. L={a n b m a n +m ;n 0, m 1}. (Feb 07) UNIT - VIII 1. Construct LR(0) items for the grammar given and it s equivalent DFA. S1 S S AS a A aa b 2. Write about the following
27 (a) Linear-Bounded Automata (b) Context-Sensitive Language (c) Decidability of PCP. 3. Construct LR(0) items for the following grammar S SA A A asb ab 4. Construct LR(0) items for the following grammar E E + T T T T * F F F (E) id 5. (a) What is decidability? Explain any two undecidable problems. (Feb 08) (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 proble P={(10,101),(011,11),(101,011)} has a match. Give the solution. (Feb 08,Nov07) (b) Explain Turing reducibility machines. (c) Show that if L and L? are recursively enumerable, and then L is recursive. 7 (a) Explain about Deterministic context free language and D PDA. (Feb 08,Nov07) (b) Show that L={anbncn : n >= 1} is a CSL. 8. Give LR(0) items for the grammar SàaAB, AàaAb/ab, BàaB/a. Find its equivalent DFA. Check the parsing by taking a suitable string. (Nov 07) 9. What are NP-complete and NP-hard problems? Explain them with examples. (Nov 07)
Automata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile
Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along
SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN
Course Code : CS0355 SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Title : THEORY OF COMPUTATION Semester : VI Course : June
C H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
Model 2.4 Faculty member + student
Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
Automata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology
Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information
ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 15 april 2003. Master Edition
ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK 5 april 23 Master Edition CONTEXT FREE LANGUAGES & PUSH-DOWN AUTOMATA CONTEXT-FREE GRAMMARS, CFG Problems Sudkamp Problem. (3.2.) Which language generates the grammar
Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.
Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008 Course Syllabus Course Title: Theory of Computation Course Level: 3 Lecture Time: Course
3515ICT Theory of Computation Turing Machines
Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation
2110711 THEORY of COMPUTATION
2110711 THEORY of COMPUTATION ATHASIT SURARERKS ELITE Athasit Surarerks ELITE Engineering Laboratory in Theoretical Enumerable System Computer Engineering, Faculty of Engineering Chulalongkorn University
Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh [email protected].
Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh [email protected] 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free
Regular Languages and Finite State Machines
Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection
The Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
Overview of E0222: Automata and Computability
Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study
CS103B Handout 17 Winter 2007 February 26, 2007 Languages and Regular Expressions
CS103B Handout 17 Winter 2007 February 26, 2007 Languages and Regular Expressions Theory of Formal Languages In the English language, we distinguish between three different identities: letter, word, sentence.
Introduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)
CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013
CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages
Turing Machines: An Introduction
CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,
Course Manual Automata & Complexity 2015
Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:
Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain
Pushdown Automata transparencies made for a course at the International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Hendrik Jan Hoogeboom, Leiden http://www.liacs.nl/
Finite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
Formal Grammars and Languages
Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,
Theory of Computation Class Notes 1
Theory of Computation Class Notes 1 1 based on the books by Sudkamp and by Hopcroft, Motwani and Ullman ii Contents 1 Introduction 1 1.1 Sets.............................................. 1 1.2 Functions
Scanner. tokens scanner parser IR. source code. errors
Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme
Increasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course [Extended Abstract] Susan H. Rodger [email protected] Jinghui Lim Stephen Reading ABSTRACT The introduction of educational
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
Informatique Fondamentale IMA S8
Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ [email protected] Université Lille 1 - Polytech Lille
Finite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automata Informally, a state machine that comprehensively captures all possible states and transitions that a machine can take while responding to a stream (or
Introduction to Theory of Computation
Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: [email protected] Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th
Reading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
Computer Architecture Syllabus of Qualifying Examination
Computer Architecture Syllabus of Qualifying Examination PhD in Engineering with a focus in Computer Science Reference course: CS 5200 Computer Architecture, College of EAS, UCCS Created by Prof. Xiaobo
Turing Machines, Part I
Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context
CAs and Turing Machines. The Basis for Universal Computation
CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.
Computability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.
Compiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
On String Languages Generated by Spiking Neural P Systems
On String Languages Generated by Spiking Neural P Systems Haiming Chen 1, Rudolf Freund 2, Mihai Ionescu 3, Gheorghe Păun 4,5, Mario J. Pérez-Jiménez 5 1 Computer Science Laboratory, Institute of Software
Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP
International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation
Increasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course Susan H. Rodger Duke University ITiCSE 2007 June 25, 2007 Supported by NSF Grant DUE 0442513. Outline Overview of JFLAP
Genetic programming with regular expressions
Genetic programming with regular expressions Børge Svingen Chief Technology Officer, Open AdExchange [email protected] 2009-03-23 Pattern discovery Pattern discovery: Recognizing patterns that characterize
Lecture 18 Regular Expressions
Lecture 18 Regular Expressions Many of today s web applications require matching patterns in a text document to look for specific information. A good example is parsing a html file to extract tags
Theory of Computation Chapter 2: Turing Machines
Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),
Introduction to Turing Machines
Automata Theory, Languages and Computation - Mírian Halfeld-Ferrari p. 1/2 Introduction to Turing Machines SITE : http://www.sir.blois.univ-tours.fr/ mirian/ Automata Theory, Languages and Computation
Chapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.
CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write
Deterministic Finite Automata
1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function
Fast nondeterministic recognition of context-free languages using two queues
Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log
Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi
Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the
Regular Expressions and Automata using Haskell
Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions
CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions
CSC45 AUTOMATA 2. Finite Automata: Examples and Definitions Finite Automata: Examples and Definitions A finite automaton is a simple type of computer. Itsoutputislimitedto yes to or no. It has very primitive
Automata on Infinite Words and Trees
Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:
CSE 135: Introduction to Theory of Computation Decidability and Recognizability
CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing
Fundamentele Informatica II
Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear
CS5236 Advanced Automata Theory
CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then
Lecture summary for Theory of Computation
Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:[email protected] Contents 1 The
Two-dimensional Languages
Charles University Faculty of Mathematics and Physics Mgr. Daniel Průša Two-dimensional Languages Doctoral Thesis Supervisor: Martin Plátek, CSc. Prague, 2004 Acknowledgements The results presented in
CS 301 Course Information
CS 301: Languages and Automata January 9, 2009 CS 301 Course Information Prof. Robert H. Sloan Handout 1 Lecture: Tuesday Thursday, 2:00 3:15, LC A5 Weekly Problem Session: Wednesday, 4:00 4:50 p.m., LC
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety
Computational Models Lecture 8, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance
HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!
Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following
CHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
MACM 101 Discrete Mathematics I
MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.
CS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
Lecture 2: Universality
CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal
Push-down Automata and Context-free Grammars
14 Push-down Automata and Context-free Grammars This chapter details the design of push-down automata (PDA) for various languages, the conversion of CFGs to PDAs, and vice versa. In particular, after formally
1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
How To Compare A Markov Algorithm To A Turing Machine
Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also
Grammars with Regulated Rewriting
Grammars with Regulated Rewriting Jürgen Dassow Otto-von-Guericke-Universität Magdeburg Fakultät für Informatik Lecture in the 5 th PhD Program Formal Languages and Applications PhD Program Formal Languages
CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015
CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015 Course Info Instructor: Prof. Marvin K. Nakayama Office: GITC 4312 Phone: 973-596-3398 E-mail: [email protected] (Be sure
Syllabus of. BCA III (Bachelor of Computer Application) Semester-V
Syllabus of BCA III (Bachelor of Computer Application) Semester-V Designed by Dr. S.B. Kishor GONDWANA UNIVERSITY, GADCHIROLI SESSION 2014-2015 SEM V BCA III Paper 1 Paper 2 Theory of Computational Analyzer
FINITE STATE AND TURING MACHINES
FINITE STATE AND TURING MACHINES FSM With Output Without Output (also called Finite State Automata) Mealy Machine Moore Machine FINITE STATE MACHINES... 2 INTRODUCTION TO FSM S... 2 STATE TRANSITION DIAGRAMS
Universal Turing Machine: A Model for all Computational Problems
Universal Turing Machine: A Model for all Computational Problems Edward E. Ogheneovo Lecturer I, Dept of Computer Science, University of Port Harcourt, Port Harcourt Nigeria. ABSTRACT: Turing machines
Mathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
I. GROUPS: BASIC DEFINITIONS AND EXAMPLES
I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called
The Optimum One-Pass Strategy for Juliet
Master s Thesis One-Pass Strategies for Context-Free Games Christian Cöster August 2015 Examiners: Prof. Dr. Thomas Schwentick Prof. Dr. Christoph Buchheim Technische Universität Dortmund Fakultät für
Computer Science Theory. From the course description:
Computer Science Theory Goals of Course From the course description: Introduction to the theory of computation covering regular, context-free and computable (recursive) languages with finite state machines,
CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing
CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing Handout written by Maggie Johnson and revised by Julie Zelenski. Bottom-up parsing As the name suggests, bottom-up parsing works in the opposite
Local periods and binary partial words: An algorithm
Local periods and binary partial words: An algorithm F. Blanchet-Sadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA E-mail:
T-79.186 Reactive Systems: Introduction and Finite State Automata
T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software
24 Uses of Turing Machines
Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss
Compiler I: Syntax Analysis Human Thought
Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly
a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.
Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that
Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全
Prime Numbers Difficulties in Factoring a Number: from the Perspective of Computation 電 腦 安 全 海 洋 大 學 資 訊 工 程 系 丁 培 毅 Prime number: an integer p> that is divisible only by and itself, ex., 3, 5, 7,, 3,
Regular Languages and Finite Automata
Regular Languages and Finite Automata A C Norman, Lent Term 1996 Part IA 1 Introduction This course is short, but it is present in Part 1A because of the way it introduces links between many different
ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605
ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605 (1) (a) (0 + 1) 010 (finite automata below). (b) First observe that the following regular expression generates the binary strings with an even
On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples
On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples Brian Hilley Boston College MT695 Honors Seminar March 3, 2006 1 Introduction 1.1 Mazur s Theorem Let C be a
26 Integers: Multiplication, Division, and Order
26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue
6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008
MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Notes on Complexity Theory Last updated: August, 2011. Lecture 1
Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look
4.6 The Primitive Recursive Functions
4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1
How To Understand The Theory Of Computer Science
Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked
Finite Automata and Formal Languages
Finite Automata and Formal Languages TMV026/DIT321 LP4 2011 Ana Bove Lecture 1 March 21st 2011 Course Organisation Overview of the Course Overview of today s lecture: Course Organisation Level: This course
Boolean Algebra Part 1
Boolean Algebra Part 1 Page 1 Boolean Algebra Objectives Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems
