This lecture covers Chapter 8 of HMU: Properties of CFLs

Size: px
Start display at page:

Download "This lecture covers Chapter 8 of HMU: Properties of CFLs"

Transcription

1 This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU.

2 Turing Mchine: Informl Definition B B B B c b b b B B An tpe extending infinitely in both sides A reding hed tht cn edit tpe, move right or left. A finite control. A string is ccepted if finite control reches finl/ccepting stte 2 / 22

3 Turing Mchine: Forml Definition A Turing mchine M = (Q, Σ, Γ, δ, q 0, B, F ) such tht: Q: finite set of sttes Σ: finite set of input symbols Γ: finite set of tpe symbols such tht Σ Γ δ: trnsition function. δ is prtil function over Q Γ, where the first component is viewed s the present stte, nd the second is viewed s the tpe symbol red. If δ(q, X ) is defined, then Tpe symbol Next Stte Reding hed direction to move next Present stte (q;x) =(q 0 ;Y;D) The symbol replcing X B Γ \ Σ is the blnk symbol. All but finite number of tpe symbols re Bs. q 0: the initil stte of the TM. F : the set of finl/ccepting sttes fo the TM. Hed lwys moves to the left or right. Being sttionry is not n option. The Turing Mchine is deterministic. 3 / 22

4 Describing TMs Turing mchines cn be defined by describing δ using trnsition tble. They cn lso be defined using trnsition digrms (with lbels ppropritely ltered) A TM tht ccepts ny binry string tht does not contin 111 0=0! 0=0! 1=1! q 1 q 0 B=B! 1=1! B=B! 0=0! B=B! q f q 3 1=1! q 2 4 / 22

5 Instntneous Descriptions of TMs An instntneous description (or configurtion) of TM is complete description of the system tht enbles one to determine the trjectory of the TM s it opertes. The instntneous description or configurtion or ID of TM contins 3 prts: () The (finite, non-trivil) portion of tpe to the left of the reding hed; (b) the stte tht the TM is presently in; nd (c) the (finite, non-trivil) portion of the tpe to the right of the reding hed. Stte, Tpe contents, Reding hed loction 1 pple i pple q B B X 1 X 2 X 3 X i X B B ID segment to the strict left stte segment from the hed onwrds z } { z} { z } { X 1 X i 1 q X i X hed i Blnks z } { q B B X 1 X 2 X 3 X B B segment to the strict left z } { stte X 1 X B i 1 z} { q hed z i Blnks } { q B B X 1 X 2 X 3 X B B hed stte z} { q segment from the hed onwrds z } { B i X 1 X 5 / 22

6 Moves of TM Just s in the cse of PDA, we use to indicte single move of TM M, nd M M to indicte zero or finite number of moves of TM. Present ID Trnsition Next ID X 1 X i 1 qx i X (1 <i< ) X 1 X B i 1 q qb i X 1 :::X (q;x i )=(q 0 ;Y;R) (q;x i )=(q 0 ;Y;L) (q;b) =(q 0 ;Y;R) (q;b) =(q 0 ;Y;L) (q;b) =(q 0 ;Y;R) (q;b) =(q 0 ;Y;L) X 1 X i 1 Yq 0 X i+1 X X 1 X i 2 q 0 X i 1 YX i+1 X { X1 { { X 1 X B i 1 Yq 0 X 1 X 1 q 0 X Y i =1 X B i 2 q 0 BY i > 1 Yq 0 X 2 X i =0 Yq 0 B i 1 X 1 X i>0 q 0 BY X 2 X i =0 q 0 BY B i 1 X 1 X i>0 6 / 22

7 Lnguge ccepted by TM A string w is in the lnguge ccepted by TM M iff q 0w αpβ for some p F. M Another notion of cceptnce tht is common is to require TM to hlt (i.e., no further trnsitions re possible). It is lwys possible to design TM such tht the TM hlts when it reches finl stte without chnging the lnguge the TM ccepts. However, we cnnot require (ll) TMs to hlt for ll inputs. A lnguge L is sid to be recursively enumerble if it is ccepted by some TM. A lnguge L is sid to be recursive if both L nd L c re recursively enumerble. Regulr Context-free Recursive Recursively Enumerble (RE) 7 / 22

8 Extensions of TMs Extensions of TMs 8 / 22

9 Extensions of TMs Multiple-Trck TMs Multiple-trck TM There re k trcks, ech hving symbols written on them. The mchine cn only red symbols from ech tpe corresponding to one loction, i.e., ll symbols in column t ny one time. A k-trck TM with tpe lphbet Γ hs the sme lnguge-cceptnce power s TM with tpe lphbet Γ k. X 1 X 2. X k 9 / 22

10 Extensions of TMs Multi-tpe TMs Multiple-tpe TM There re k tpes, ech hving symbols written on them. The mchine cn ech tpe independently, i.e., the symbols red from ech tpe need not correspond to the sme loction After red of ech tpes, ech reding hed cn move independently to the right, left, or sty sttionry. X 1 X k X / 22

11 Extensions of TMs Multi-tpe TMs Theorem Every lnguge tht is ccepted by multi-tpe TM is lso recursively enumerble (i.e., ccepted by some stndrd TM). Proof of Theorem Let L be ccepted by k-tpe TM M. We ll devise 2k-trck TM M tht ccepts L. Every even tpe of M hs the sme lphbet s tht of the k-tpe TM. The 2i th trck of M contins exctly the sme contents s the i th tpe of M. Every odd trck hs n lphbet {B,, }, nd contins single or ; the 2i 1 th trck of M contins or t the loction where the i th reding hed of M is locted. M M / 22

12 Extensions of TMs Multi-tpe TMs Proof of Theorem The stte of M hs 3 components: () the stte of M; (b) the number of s to its strict left; nd (c) vector of length k with ech component tking vlue in Γ {?}. Ech move of M corresponds to multiple moves of M. Ech move of M corresponds of sweep of the tpe from the loction of the leftmost dgger to tht of the rightmost dgger nd bck performing the chnges to trcks tht M would do to its corresponding tpes. At the beginning of the sweep, the hed of M is t loction where the leftmost is nd the stte of M is (q, 0, [?,,?]). The hed moves to the right uncovering s nd the corresponding trck symbols. The right sweep ends when the second component is k M Stte: (q ; 0; [0; 1; 1]) Stte: q 12 / 22 M

13 Extensions of TMs Multi-tpe TMs Proof of Theorem At this stge, M knows the input symbols M will hve red, nd knows wht ctions to tke. It then sweeps left mking pproprite chnges to the trcks (just like M does to its tpe) ech time is encountered. M lso moves the s ccordingly nd lters it to to indicte tht it hs processed this trck. The left sweep ends when the second component is zero. At this time, M would hve completed moving the s nd the trck contents; they ll now mtch those of M. The TM then sweeps right nd returns reverting ech bck to. M then moves the stte to (q, 0, [?,,?]) nd strt the next sweep if q is not finl stte. Note tht M mimics M nd hence the lnguges ccepted re identicl. 13 / 22

14 Extensions of TMs Multi-tpe TMs The running time of TM M with input w is the number of moves M mkes before it hlts. (If it does not, the running time is ). The time complexity T M : {0, 1,...} {0, 1,...} of TM M is defined s follows: T M (n) := mximum running time of M for n input w of length n symbols. Theorem The time tken for M in Theorem to process n moves of M is O(n 2 ). Outline of Proof of Theorem After n moves of M, ny two heds of M cn be t most 2n loctions prt. Ech sweep then requires 8n moves of M. Ech trck updte requires finite number of moves. Totlly, to updte the trcks, Θ(k) time steps re needed. Loction of tpe heds n 0 n!!!! 0 Moves of M n 2n prt 14 / 22

15 Extensions of TMs Non-deterministic TMs Non-deterministic TM: δ(q, X ) is set of triples representing possible moves. Theorem For every non-deterministic TM N, there is TM M such tht L(M) = L(N). Outline of Proof of Theorem ID 1 (N does Bredth-First explortion of IDs of M) ID 2;1 ID 2;2 ID 2;k ID 3;1 ID 3;2 ID 3;3 ID 3;4 ID 3; Tpe 1 ID 1 ID 1 ID 2;1 ID 2;2 ID 2;k (If M does not hlt t ID1) (If M does not hlt t ID1 nd ID2;1) ID 1 ID 2;1 ID 2;2 ID 2;k ID 3;1 ID 3;2 (If M does not hlt t ID1, ID2;1 nd ID2;2) ID 1 ID 2;1 ID 2;2 ID 2;k ID 3;1 ID 3;2 ID 3;3 ID 3;4 15 / 22

16 Extensions of TMs Outline of Proof of Theorem We cn devise 2-tpe TM M tht simultes N. M first replces the content of the first tpe by followed by the ID tht N is initilly in, which is then followed by specil symbol, which serves s ID seprtor. (M uses the second tpe s scrtch tpe to enble this opertion). If the ID corresponds to finl stte, N hlts (s would M). If not, M then identifies ll possible choices for the next IDs for N nd enters ech one of them followed by t the right end of it s first tpe. (Agin, M uses the second tpe s scrtch tpe to enble this opertion) M then serches for to the right of, chnges the to (to signify tht it is processing the succeeding ID), nd processes tht ID in the similr wy. M hlts t n ID it iff M would t tht ID. 16 / 22

17 Restrictions of TMs Restrictions of TMs 17 / 22

18 Restrictions of TMs TM Semi-infinite Tpe Theorem Every recursively enumerble lnguge is lso ccepted by TM with semi-infinite tpe. Outline of Proof of Theorem Given TM M tht ccepts lnguge L, construct two-trck TM M s follows. The first nd second trcks of M re the R nd L semi-infinite prts of the tpe of M. First, write specil symbol, sy t the leftmost prt of the second trck; this indictes to M tht left move is not to be ttempted t this loction. At ny time, M keeps trck of whether M is to the right or left of its strt loction. If M is to the strict right of its strt loction, M mimics M on the first trck. If M is to the strict left of its strt loction, M mimics M on second trck, but with the hed directions reversed. M detects the strt by the symbol. It cn be formlly shown tht M ccepts string iff M ccepts it. M L $ R B B 2 L $ R b b b M b B B 1 2 L $ R R $ L 18 / 22

19 Restrictions of TMs Multi-stck Mchines A multistck mchne is PDA with severl independent stcks (i.e., one cn be popping symbol, while the other is writing symbol). Theorem Every recursively enumerble lnguge is ccepted by two-stck PDA Outline of Proof of Theorem TM PDA PDA PDA B b B b b b S S 1 2 S b 3 b R semi-infinite portion of TM s tpe Strict L semi-infinite portion of TM s tpe indictes the end of the stck content (to prevent PDA from hlting) If TM moves right chnging tpe symbol X to Y nd stte from q to q, PDA moves from stte q to q popping X from left stck nd pushing Y to the right stck. 19 / 22

20 Restrictions of TMs Counter Mchines A counter mchine is multi-stck mchine whose stck lphbet contins two symbols: Z 0 (stck end mrker) nd X Z 0 is initilly in the stck. Z 0 my be replced by X i Z 0 for ny i 0 X my be replced by X i for ny i 0. A counter mchine effectively stores non-negtive number. X X X Z 0 X X X X X Z 0 20 / 22

21 Restrictions of TMs Counter Mchines Theorem Every recursively enumerble lnguge is ccepted by three-counter mchine Outline of Proof of Theorem We know two-stck PDA cn simulte ny TM. We ll show tht 3-counter mchine cn simulte ny PDA. WLOG, let the stck lphbet of Γ = {0, 1,..., r}. Suppose the first stck contins Y 1(top),..., Y k. Then the first counter stores Y 1 + ry r k 1 Y k. Similrly for the second stck. The third counter is used to chnge the two stck contents. Popping the top symbol stck (sy A) = finding quotient when Y 1 + ry r k 1 Y k is divided by r. pop r X s from stck A, nd push single X on the third stck. Repet until ll X s re exhusted on the stck where popping is performed. Now empty stck A nd copy the third stck contents onto stck A. Chnge Y 1 to some Y 1 requires dding or subtrcting, which is done by popping or pushing the corresponding number of X s. 21 / 22

22 Restrictions of TMs Counter Mchines Outline of Proof of Theorem pushing symbol Z onto stck (sy A) = compute rc + Z where C is the number presently stored in the stck A. pop one X from stck A, nd push r X s on the third stck. Finlly push Z X s onto the third stck. Now empty stck A nd copy the third stck contents onto stck A. Since the bove three re the only opertions needed to simulte TM on two-stck PDA, we cn stimulte 2-stck PDA nd hence TM using 3-counter mchine. Theorem Every recursively enumerble lnguge is ccepted by two-counter mchine Outline of Proof of Theorem The key ide: simulte three counters using one, nd use the other for mnipultions. The first counter stores 2 i 3 j 5 k where i, j, k re the contents of the 3-counter mchine. Updtes to the stck involve: () divide by 2,3, or 5; (b) multiply by 2,3, or 5; or (c) identify if i or j or k is zero (check divisibility). Ech opertion cn be esily seen to be done with spre counter. 22 / 22

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

More information

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power CS411-2015S-12 Turing Mchine Modifictions 1 12-0: Extending Turing Mchines When we dded stck to NFA to get PDA, we incresed computtionl power Cn we do the sme thing for Turing Mchines? Tht is, cn we dd

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Wht problems cn we solve with computer? Regulr Lnguges CFLs Lnguges recognizble by ny fesible computing mchine All Lnguges Tht sme drwing, to scle. All Lnguges The Problem Finite

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

More information

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

More information

Recursively Enumerable and Recursive. Languages

Recursively Enumerable and Recursive. Languages Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Hello Hello Condensed Condensed Slide Slide Reders! Reders! Tody s Tody s lecture lecture consists consists lmost lmost exclusively exclusively of of nimtions nimtions of of Turing

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language. Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

a b b a pop push read unread

a b b a pop push read unread A Finite Automton A Pushdown Automton 0000 000 red unred b b pop red unred push 2 An Exmple A Pushdown Automton Recll tht 0 n n not regulr. cn push symbols onto the stck cn pop them (red them bck) lter

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

Decidability. Models of Computation 1

Decidability. Models of Computation 1 Decidbility We investigte the power of lgorithms to solve problems. We demonstrte tht certin problems cn be solved lgorithmiclly nd others cnnot. Our objective is to explore the limits of lgorithmic solvbility.

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

Lecture 6 Regular Grammars

Lecture 6 Regular Grammars Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility) CS5371 Theory of Computtion Lecture 20: Complexity V (Polynomil-Time Reducibility) Objectives Polynomil Time Reducibility Prove Cook-Levin Theorem Polynomil Time Reducibility Previously, we lernt tht if

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

CSCI FOUNDATIONS OF COMPUTER SCIENCE

CSCI FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1 Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

CSC 473 Automata, Grammars & Languages 11/9/10

CSC 473 Automata, Grammars & Languages 11/9/10 CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is

More information

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages Automt & lnguges A primer on the Theory of Computtion Lurent Vnbever www.vnbever.eu Prt 5 out of 5 ETH Zürich (D-ITET) October, 19 2017 Lst week ws ll bout Context-Free Lnguges Context-Free Lnguges superset

More information

TM M ... TM M. right half left half # # ...

TM M ... TM M. right half left half # # ... CPS 140 - Mthemticl Foundtions of CS Dr. S. Rodger Section: Other Models of Turing Mchines èhndoutè Deænition: Two utomt re equivlent if they ccept the sme lnguge. We will demonstrte equivlence etween

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model? CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction

More information

Some Theory of Computation Exercises Week 1

Some Theory of Computation Exercises Week 1 Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether

More information

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Deterministic Finite-State Automata

Deterministic Finite-State Automata Deterministic Finite-Stte Automt Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 12 August 2013 Outline 1 Introduction 2 Exmple DFA 1 DFA for Odd number of

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

How to simulate Turing machines by invertible one-dimensional cellular automata

How to simulate Turing machines by invertible one-dimensional cellular automata How to simulte Turing mchines by invertible one-dimensionl cellulr utomt Jen-Christophe Dubcq Déprtement de Mthémtiques et d Informtique, École Normle Supérieure de Lyon, 46, llée d Itlie, 69364 Lyon Cedex

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

Reinforcement learning II

Reinforcement learning II CS 1675 Introduction to Mchine Lerning Lecture 26 Reinforcement lerning II Milos Huskrecht milos@cs.pitt.edu 5329 Sennott Squre Reinforcement lerning Bsics: Input x Lerner Output Reinforcement r Critic

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

Chapter 14. Matrix Representations of Linear Transformations

Chapter 14. Matrix Representations of Linear Transformations Chpter 4 Mtrix Representtions of Liner Trnsformtions When considering the Het Stte Evolution, we found tht we could describe this process using multipliction by mtrix. This ws nice becuse computers cn

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

More information

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

Languages & Automata

Languages & Automata Lnguges & Automt Dr. Lim Nughton Lnguges A lnguge is sed on n lphet which is finite set of smols such s {, } or {, } or {,..., z}. If Σ is n lphet, string over Σ is finite sequence of letters from Σ, (strings

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations. Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one

More information

THEOTY OF COMPUTATION

THEOTY OF COMPUTATION Pushdown utomt nd Prsing lgorithms: Pushdown utomt nd context-free lnguges; Deterministic PDNondeterministic PD- Equivlence of PD nd CFG-closure properties of CFL. PUSHDOWN UTOMT ppliction: Regulr lnguges

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1 Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

set is not closed under matrix [ multiplication, ] and does not form a group.

set is not closed under matrix [ multiplication, ] and does not form a group. Prolem 2.3: Which of the following collections of 2 2 mtrices with rel entries form groups under [ mtrix ] multipliction? i) Those of the form for which c d 2 Answer: The set of such mtrices is not closed

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!! Nme: Algebr II Honors Pre-Chpter Homework Before we cn begin Ch on Rdicls, we need to be fmilir with perfect squres, cubes, etc Try nd do s mny s you cn without clcultor!!! n The nth root of n n Be ble

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More information

The University of Nottingham

The University of Nottingham The University of Nottinghm SCHOOL OF COMPUTR SCINC AND INFORMATION TCHNOLOGY A LVL 1 MODUL, SPRING SMSTR 2004-2005 MACHINS AND THIR LANGUAGS Time llowed TWO hours Cndidtes must NOT strt writing their

More information

PESIT SOUTHCAMPUS QUESTION BANK. Chapter 1 & 2 : Introduction to theory of computation and finite automata

PESIT SOUTHCAMPUS QUESTION BANK. Chapter 1 & 2 : Introduction to theory of computation and finite automata QUESTION BANK Fculty: Mr. Krthik S Totl Hours: 52 Chpter 1 & 2 : Introduction to theory of computtion nd finite utomt 1 Define lnguge ccepted by DFA 2 2 Define regulr lnguge 2 3 Give the forml definition

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information