TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund

Size: px
Start display at page:

Download "TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund"

Transcription

1 TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA Written by Liat Peterfreund 1

2 TWO-WAY FINITE AUTOMATA A two way deterministic finite automata (2DFA) is a quintuple M Q,,, q0, F where: Q,, q, F are as before 0 : Q Q { L, R} o If ( q, a) ( p, L) then in state q, scanning the input symbol a, the 2DFA enters state p and moves its head left one square. o If ( q, a) ( p, R) then in state q, 2 scanning the input symbol a, the 2DFA enters state p and moves its head right one square.

3 COMMENTS: o o In describing the behavior of one-way finite automata, we extend to * Q. This notion is insufficient for 2DFA because the head may move left. Instead we introduce the notion of instantaneous description ( ID ) of 2DFA which describes the input string, current state and current position if the input head. o The relation on ID 's such that M I1 M I 2 if and only if M o 3 can go from I 1 to I 2 in one move. An ID of M is a sting in * * Q.

4 o The ID wqx whereas intended to represent : 1) wx is the input string 2) q is the current state * wx, and q Q is 3) the input head is scanning the first symbol of x (If x then the input head has moved off the right hand end of the input). 4

5 5 o We define the relation M understood, by or just if M is a a... a qa... a a a... a a pa... a 1) 1 2 i1 i n 1 2 i1 i i 1 n whenever ( q, a ) ( p, R) i a a... a a qa... a a a... a pa a... a 2) 1 2 i2 i1 i n 1 2 i2 i 1 i n whenever ( q, a ) ( p, L) and i 1(The i condition i 1 prevents any action in the event that the tape head would move off the left hand end of the tape). in (the tape o Note that no move is possible if 1 head has moved off the right hand end).

6 Let * be the reflexive and transitive closure of. * I1 I k whenever I1 I2... I k for some I2,..., k 1 define * L( M ) w q 0w wp, p F. That is w is I we accepted by M if, starting in state q 0 with w on the input tape and the head at the left end of w, M eventually enters a final state at the same time it falls off the right hand of the input tape. 6

7 Example: Consider a 2DFA M that behaves as follows: starting in state q 0, M repeats a cycle of moves wherein the tape head moves right until two ones have been encountered then left until encountering a zero at which point state q 0 is reentered and the cycle repeated. More precisely M has three states all of which are final. is given as follows: q q q 2 R L 0, 2,

8 Consider the input : 8 q q q q q q q q q q q 1 than LM ( )

9 Crossing sequences q 0 q 1 q 1 q 2 q 0 q 1 q 1 q 1 q 2 q 0 q 1 9 The list of states below each boundary between squares is termed a crossing sequence.

10 Observations: o o o 10 If a 2DFA accepts its input, no crossing sequence may have a repeated state with the head moving in the same direction. Otherwise the 2DFA being deterministic would be in a loop. The first time a boundary is crossed, the head must be moving right. Subsequent crossings must be in alternate directions: odd-numbered elements of the crossing sequence represents right moves even-numbered elements of the crossing sequence represents left moves

11 o o If the input is accepted then all crossing sequences are of odd length A crossing sequence q,..., 1 q k is said to be valid if : it is of odd length no two odd-numbered and no two evennumbered elements are identical o The number of valid crossing sequences is finite (a 2DFA with s states can have valid crossing sequence of length at most 2s-1). 11

12 Theorem: 2DFA and DFA (deterministic finite automata) have the same expressive power. 12

13 Proof: o o We construct a NFA (non-deterministic finite automata) that will simulate the 2DFA M and whose states are the valid crossing sequences of M. In order to construct the transition function we first examine the relationship between adjacent crossing sequences. 13

14 o Suppose we are given an isolated tape square holding the symbol a and are also given valid crossing sequences q1, q2,..., q k and p1, p2,..., p l at the left and the right boundaries of the square, respectively. Note that there may be no input strings that can be attached to the left and right of symbol a to actually produce these two crossing sequences 14

15 o We can test two sequences for local compatibility as follows: If the tape head moves left from the square holding a in state q i, restart the automaton on the square holding a in state qi 1 If the tape head moves right from the square holding a in state p i, restart the automaton on the square holding a in state pi 1 15

16 We take q1, q2,..., q k to appear at the left boundary of a and p1, p2,..., p l at the right boundary of a then, q1, q2,..., q k right-match p1, p2,..., p l on a if these sequences are consistent, assuming we initially reach a in state q 1 moving right q1, q2,..., q k left-match p1, p2,..., p l on a if these 16 sequences are consistent, assuming we initially reach a in state p 1 moving left

17 We define right-matching and left matching pairs of crossing sequences recursively in (1) through (5): (1) The null sequence left- and right-matches the null sequence. (if we never reach the square holding a, then it is consistent that the boundaries on neither side should be crossed). 17

18 q (2) If,..., 3 qk right-matches p1, p2,..., pl and ( q, a) ( q, L) 1 2 q then 1, q2,..., qk right-matches p1, p2,..., p l (if the first crossing of the left boundary q is in state 1 and the head immediately moves left in 18 q state 2, then if we follow these two crossings by any consistent behavior starting from another crossing of the left boundary, we obtain a consistent pair of sequences with first crossing moving right i.e. a right matched pair). (3) If q,..., 2 q k left-matches p,..., 2 p l and ( q1, a) ( p1, R) then q1 q2,,..., q k right-matches p1, p2,..., p l.

19 (4) If q,..., 1 q k left-matches p,..., 3 l ( p, a) ( p, R) then q,..., 1 k 1 2 p1, p2,..., p l. (5) If q,..., 2 q k right matches p,..., 2 l ( p, a) ( q, L) then q,..., 1 k 1 1 p1, p2,..., p l. p and q left-matches p and q left-matches 19

20 The construction: Let M Q,,, q0, F M ' Q',, ', q ', F ' be a 2DFA. We contruct a NFA which accepts LM ( ) such that: 0 1) Q ' consists of all valid crossing sequences for M. 2) q ' is the crossing sequence consisting of 0 q 0 alone. 3) F ' is the set of all crossing sequences of length one 4) 20 consisting of a state in F. d d is a valid crossing sequence '( ca, ) that is right matched by c on input a

21 The intuitive idea is that M ' puts together pieces of computations of M as it scans the input string. This is done by guessing successive crossing sequences. If has guessed that c is the crossing sequence at a boundary, and a is the next input symbol then M ' can guess any valid crossing sequence that c right matches on input a. M ' If the guessed computation results in M moving off the right end of the input in an accepting state, then 21 accepts. M '

22 Claim: L( M) L( M ') Proof: L( M) L( M ') : Let w L( M ). Look at the crossing sequences generated by an accepting computation of M on w. Each crossing sequence right-matches the one at the next boundary, so 22 can guess the proper crossing sequence (among its other guesses) and accept i.e. w L( M '). M '

23 L( M ') L( M) : Let w L( M '). Consider the crossing sequence c,..., 0 c n of M corresponding the states of w a,..., 1 an. For each 0 i n i M ' as M ' scans c right matches ci 1 on We can construct an accepting computation of M on input w by determining when the head reverses 23 direction. a i

24 We prove by induction on i that M ' on reading a... 1 a i can enter state c q q conditions hold: i only if the following two 1,..., 1) M started in state q 0 on a... 1 a i will first move right from position i in state q 1 2) for j 2,4,..., if M is started at position i in state k q j, M will eventually move right from position i in 24 state q j 1 (this implies k must be odd).

25 Basis: 0 i then c q 0 0. (1) is satisfied since M begins its computation by "moving right from position 0" in state q 0. (2) holds vacuously. 25

26 Assume the hypothesis is true for 1 26 M ' on reading a... 1 i a can enter state i. Suppose that from state c q q c,..., i p1 p l i k. 1 1,..., o Since k and l are odd, and ci 1 right o matches c i on such that in state a i there must exist an odd j q j on input a i, M moves right. Let j 1 be the smallest such j. By definition of "right matches" it follows that ( q, a ) ( p, R). This proves (1). j1 1 1 We will prove (2) by induction: Basis: vacuously Inductive step: by the definition of "right-matches" (rule (3)) [ qj,..., qk] left-matches [ p2,..., p l ] 1 1

27 27 Now if ( p j, ai ) ( p j1, R) for all even j, then (2) follows immediately. In the case that for some smallest even j, 2 ( p j, a ) (, ) 2 i q L, then by definition of "left-matches" (rule (5)) q must be q j 1 and [ q,..., ] 1 j qk right matches [ p,..., p ] By induction hypothesis, (2) holds for [ qj,..., qk] [ pj,..., ] and 2 p 1 l 1 2 j l

28 With the induction hypothesis for all i established, the fact that c [ p] for some p F implies that M n accepts a... 1 a n. 28

29 Reminder - Example: Consider a 2DFA M that behaves as follows: starting in state q 0, M repeats a cycle of moves wherein the tape head moves right until two ones have been encountered then left until encountering a zero at which point state q 0 is reentered and the cycle repeated. More precisely M has three states all of which are final. is given as follows: q q q 2 R L 0, 2,

30 Consider the construction of NFA 2DFA M : M ' equivalent to the Since q 2 is only entered on a left move and q 1 and q3 are 30 only entered on right moves, all even numbered components of valid crossing sequences must be q 2. Since a valid crossing sequence must be of odd length, and no two odd numbered states can be the same, nor can two even-numbered states be the same, there are only four crossing sequences of interest: [ q0],[ q1 ],[ q0, q2, q1 ],[ q1, q2, q 0].

31 Valid crossing sequences Right matches on 0 [ ] [ ] Right matches on 1 [ q ] q 0 q 0 1 q 1 [ q1 ],[ q1, q2, q 0] - [ ] [ q, q, q ] [ q, q, q ] [ q 1] Thus the automaton is: 0 0 [ 0] q 1 1 [ q ] [ q1, q2, q0]

32 32 Pebble Automata

33 Preface: We consider strings over infinite alphabet D. A D -string is a finite sequence d... 1 d n where n 0 and 1 i n : di D. dom( w) 1,2,..., w. For i dom( w) we write valw() i for d i. A language is a set of D -strings. 33

34 We delimit input strings by two special symbols, for the left and for the right of the string, neither of which are in D. Therefore the automata work on extended strings of the form w u where u * D. The positions of, are 0 and w 1 respectively 34 We write dom ( w) 0,..., w 1 of positions for the extended set We likewise extend the function val w by defining val (0) w and valw ( w 1)

35 Pebble automata are finite state machines equipped with a finite number of pebbles. The use of pebbles is restricted by a stack discipline (pebble i 1 can only be placed when pebble i is present on the string and pebble i can only be lifted when pebble i 1 is not present on the string). The highest numbered pebble present on the string acts as the head of the automaton. 35

36 36 A transition depends on: o The current state o The pebbles placed on the current position of the head o Equality type of the data values under the placed pebbles. The transition relation specifies: o Change of state o Movement of the head o Possibly whether the head pebble is removed or a new pebble is placed

37 Definition: A nondeterministic two-way k-pebble automaton A over D (infinite alphabet) is a tuple ( Q, q0, F, T ) where: o Q is a finite set of states o q0 Q is the initial state o F Q is a set of finite states 37

38 o T is a finite set of transitions of the form 38 where o is of the form ( i, s, P, V, q ) or ( i, P, V, q ) where i 1,..., k, s D, P, V 1,..., i 1, o is of the form ( qd, ) with q Q and stay,left,right,place-new-pebble, d lift-current-pebble

39 Given a string w, a configuration of A on w is of the form iq,, where i 1,..., k :{1,..., i} dom ( w)., q Q and We call pebble assignment and i the depth of configuration (and of pebble assignment). Initial configuration: : 1, q, where (1) Accepting configuration:, iq, where 39 F.

40 A transition ( i, s, P, V, q) jq,, if: 1) i j, p q applies to a configuration 2) V l i val ( ( l)) val ( ( i)) 3) P l i ( l) ( i) 4) val ( ( i)) s w w w 40 A transition ( i, P, V, q) applies to a configuration jq,, if 1-3 holds and no transition ( i, s, P, V, q) applies to.

41 We define the transition relation as follows: [ i, q, ] [ i', q', '] iff there is a transition ( pd, ) that applies to such that q' p and j i : '( j) ( j) and: 41 If d stay, then i' If d left, then i' If d right, then i' i and '( i) ( i) i and '( i) ( i) 1 i and '( i) ( i) 1 If d place-new-pebble, then i' i 1 and '( i) '( i 1) ( i) If d lift-current-pebble, then i' i 1

42 An automaton is deterministic if in each configuration at most one transition applies. If there are no left transitions then the automaton is oneway. The language of the automaton: A string w is accepted by A if * for some accepting configuration. 0 42

43 Example 1: Let L d1... dn n 0, i, j : i j di d j. We define a 2-pebble-automata A accepting this language. A ( Q, q, F, T) is defined as follows: 0 43 Q q q q q,,, acc 1 2 F { q acc } T consists of the following transitions: (1) (1,,, q1) ( q1,right) (2) (1,,, q1 ) ( q,place-new-pebble) (3) (2,{1},{1}, q ) ( q2,right) (4) (2,,, q2) ( q2,right) (5) (2,,{1}, q2) ( q acc,stay)

44 Intuitive explanation: (1-2) A stays in state q 1 while moving to the right or places a pebble (3) After the placement of the pebble A moves one position to the right (4-5) A continues moving to the right and when it reads a symbol equal to the symbol under the first pebble, it moves to the final state 44

45 Example 2: * Let L u$ v u, v D $ D [ u] [ v] whereas [ u],[ v ] are the sets of all the letters of uv, respectively. We define a 2-pebble-automata A accepting this language that operates as follows: o The first pebble passes through all of the positions of 45 o o the word u (until it encounters the sign $ ) and for each such position it checks whether there is a position in v with the same letter. The above check is done by placing the second pebble and iterating through all of the positions in v - if there is such a position it lifts the pebble and continues with the next position in u, if there is not it rejects. When the first pebble reaches the $ it moves to an accepting state.

46 Formally, A ( Q, q0, F, T) whereas Q q,,,,, 0 q q q q q, u uv v rej acc the following transitions: F q acc and T contains ( a1)(1,,, q ) ( q,right) 0 ( b1)(1,$,,, q ) ( q,stay) u ( c1)(1,,, q ) ( q,place-new-pebble) u u uv acc 46 ( a2)(2,{1},{1}, q ) ( q,right) ( b2)(2,$,,, q ) ( q,right) ( c2)(2,,, q ) ( q,right) uv ( d2)(2,,{1}, q ) ( q,right) uv uv uv ( e2)(2,,{1}, q ) ( q,lift-current-pebble) ( f 2)(2,,,, q ) ( q,stay) ( g2)(2,,, q ) ( q,right) v v v uv 0 v uv uv v rej

47 Intuitive explanation: ( a 1) is used to skip a sign ( b1),( c 1) are used to iterate all over u 's elements ( a2) ( d2) skip the end of u and the $ ( e2) ( f2) iterates through v and compares the sign under the current pebble with the sign under pebble 1 47

48 Example 3: We define a two-way nondeterministic pebble automaton with three pebbles that accepts all words w where w 2 and there exists some position i in dom( w ) such that the set of symbols occurring at positions smaller than i is disjoint from the set of symbols occurring at position larger than or equal to i. For example the automaton accepts abb and 48 rejects abab

49 49 The automaton will work as follows: o The first pebble is used nondeterministically to guess i o The second pebble is used to step through position to the left of i one at a time, from o o i 1 to For each such position of the second pebble, the third pebble is used to check that all symbols at positions i are distinct from the symbol under the second pebble. The input is excepted if the second pebble can reach the leftmost symbol

50 Formal definition: A Q, q, F, T Q q q 0,..., 7, F q5 transitions: where o { } and T is the set of 50

51 ( a1) (1,,,, q ) ( q,right) } skip 0 0 (b1) (1,,, q ) ( q,right) } i (c1) (1,,,, q ) ( q,stay) } reached the end without guessing i 1 2 q1 q1 q1 q3 (d1) (1,,, ) (,right) (e1) (1,,, ) (,place-new-pebble) guess i ( a2) (2,{1},{1}, q ) ( q,left) } move to position i ( b2) (2,,, q ) ( q,left) } move one position left (after lifting pebble 3) 3 4 ( c2) (2,,,, q ) ( q,stay) } finished reading positions i ( d2) (2,,, q ) ( q,place-new-pebble) } "save" position 4 6 ( a3) (3,{2},{2}, q6) ( q6,right) (b3) (3,,,q 6) ( q6,right) move right to position i 1 ( c3) (3,,{2}, q6) ( q6,right) ( d3) (3,{1},{1}, q6) ( q7,right) 51 (e3) (3,,{1},q 7) ( q7,right) ( f 3) (3,,,, q7) ( q3,lift-pebble) scan positions > i ( g3) (3,,, q7) ( q7,right)

52 For example, an accepting run on abb will be: 52

53 53 In the above definition, new pebbles are placed at the position if the most recent pebble. An alternative would be to place new pebbles at the beginning of the string. While the choice makes no difference in the two-way case, it is significant in the one way case. We refer to the model as defined above as weak pebble automata and to the latter as strong pebble automata. Strong pebble automata are formally defined by setting '( i 1) 0 in the place-new-pebble case of the definition of the transition relation.

54 Our next result shows that the variants of strong pebble automata, one-way and two-way, collapse. Theorem: Two-way weak 2-pebble automata and two-way strong 2- pebble automata have the same expressive power. 54

55 Proof: Let A Q, q, F, T be a two-way strong 2-pebble o automaton. We want to construct a two-way weak 2-pebble automaton that will simulate A 's behavior. Idea of construction: For every state in q Q we will add a new state q ' and transition that such that the automaton head will move left until it encounters the left delimiter and then move to the appropriate state. 55

56 Let A Q, q, F, T be a two-way weak 2-pebble o automaton. We construct a two-way 2-pebble strong automaton that will simulate A 's behavior. The only difference between the automata is in placing a new pebble. Idea of construction: For every state in q new state Q we will add a q ' and transition that such that the automaton head will move right until it encounters the first pebble and then move to the appropriate state. 56

57 Theorem: Two-way strong 2-pebble automata and one-way strong 2- pebble automata have the same expressive power. Proof: A one-way strong 2-pebble automaton is a particular case of two-way strong automaton. 57

58 Claim: For each two-way non-deterministic pebble automata A there is a strong one-way deterministic pebble automata that accepts the same language. Proof: Assumptions: (1) A lifts pebble only in the right delimiter (2) A accepts its input only in configurations [1, q, θ], i.e., with only one pebble. 58

59 By virtually adding two steps we view an accepting computation as consisting of: (1) a first step in which the first pebble is placed at the left delimiter, i.e., position 0. (2) a computation in which always at least one pebble is present. (3) a final step in which the only remaining pebble is removed. 59

60 Writing [0, p, ] for a (virtual) configuration without pebble, to determine whether A accepts, one has to find out whether * [0, q, ] [0, q, ] for some final state q. 0 The latter can be done by recursively solving subproblems of * the form [ i, q, ] [ i, q', ] i where the subscript > i indicates that only subcomputations are considered in which, at every step, more than i pebbles are present. 60

61 More formally, we show the following claim by induction on i (starting from i = k). Claim: For each i {0,...,k} and each finite set of states R, there is a strong one-way deterministic pebble automata B i (with k pebbles) such that, whenever B i starts from a configuration[i, p, ], where p R, the next configuration of depth i of B i is [i,(p, S), ], * S {(q,q ) QQ [i,q, ] i [i, q, ]}. The set of states of B i includes R and 2 R R R 61. where

62 The theorem indeed follows from the claim: Let i = 0 and let R {p 0} (the intended initial state of B 0 ). We obtain an automaton which ends up in a state (p 0, S) where S {(q,q ) QQ [0,q, ] [0,q, ]} * 0 The set of final states of B 0 consists of all states 0 where S contains a pair (q 0, q) with q F. (p, S) 62

63 For i k the proof of the claim is trivial, as there are no configurations of depth k. Hence, B k can compute (p, S) by a stay-transition. Therefore, let i k and suppose the claim holds for all j i 63

64 64 Let the input string w of length n be fixed. Hence B i works on the string w with positions from dom ( w). For ln 1, let l denote the ( i 1) -pebble assignment that coincides with in the first i pebbles l and for which ( i1) l. S ( l ) is the set of pairs ( q, q ) of states such that there is a computation starting at [ i 1, q, l ] and reaching [ i 1, q', l ] which only includes configurations [ j, q, ] that fulfill j i 1 or ( ji 1 and ( i1) l ). Intuitively, this says that pebble i 1 is not allowed to move to the right of position l.

65 We write S ( l ) for the set of pairs ( q, q) of states for which [ i1, q, l ] can be reached from 1 [ i 1, q, ] by a subcomputation satisfying the same property. 65 The set S ( l ) can be computed as follows: Let R ( l ) be the set of pairs ( q, q ) for which one of the following holds: (a) There exist p1, p 2 such that 1 [ 1,, l l i q ] [ i 1, p, ], (b) 1 l 1 ( p1, p2) S ( ) and 1 [ 1, 2, l l i p ] [ i 1, q, ] l * l [ i 1, q, ] i 1 [ i 1, q, ]. (c) [ 1,, l l i q ] [ i 1, q, ]

66 S ( l ) is the transitive closure of R ( l ). They are computed simultaneously. The information needed for (a) can be computed in one left-to-right pass of pebble i 1. By induction we can assume a subautomaton Bi 1 that 66 computes, for each position l, the part of R ( l ) contributed by condition (b). (c) and the computation of the transitive closure do not require any pebble movements. During the same pass, the automaton can compute, for each position l, the set S ( l ). The computation of ( l m S ) makes use of the sets S ( ), m l.

67 From n 1 S ( ), n 1 S ( ) and the transition relation of A one can deduce, during a lift-pebble step, the set S as in the claim. Note that n 1is the position of the right delimiter and recall that A lifts its pebbles only at that position. This completes the proof of the claim and of the theorem. 67

Lecture 2: Regular Expression

Lecture 2: Regular Expression Lecture 2: Regular Expression Instructor: Ketan Mulmuley Scriber: Yuan Li January 8, 2015 In the last lecture, we proved that DFA, NFA, and NFA with ϵ-moves are equivalent. Recall that a language L Σ is

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite The Church-Turing Thesis CS60001: Foundations of Computing Science Professor, Dept. of Computer Sc. & Engg., Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q 0, q accept, q reject ), where

More information

Closure Under Reversal of Languages over Infinite Alphabets

Closure Under Reversal of Languages over Infinite Alphabets Closure Under Reversal of Languages over Infinite Alphabets Daniel Genkin 1, Michael Kaminski 2(B), and Liat Peterfreund 2 1 Department of Computer and Information Science, University of Pennsylvania,

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

Finite Automata. Mahesh Viswanathan

Finite Automata. Mahesh Viswanathan Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

More information

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

CS243, Logic and Computation Nondeterministic finite automata

CS243, Logic and Computation Nondeterministic finite automata CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger

More information

Turing Machines Part II

Turing Machines Part II Turing Machines Part II COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 2016 Slides created by Katya Lebedeva COMP 2600 Turing Machines 1 Why

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

Chapter Five: Nondeterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more

More information

Lecture 4 Nondeterministic Finite Accepters

Lecture 4 Nondeterministic Finite Accepters Lecture 4 Nondeterministic Finite Accepters COT 4420 Theory of Computation Section 2.2, 2.3 Nondeterminism A nondeterministic finite automaton can go to several states at once. Transitions from one state

More information

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

ECS 120 Lesson 15 Turing Machines, Pt. 1

ECS 120 Lesson 15 Turing Machines, Pt. 1 ECS 120 Lesson 15 Turing Machines, Pt. 1 Oliver Kreylos Wednesday, May 2nd, 2001 Before we can start investigating the really interesting problems in theoretical computer science, we have to introduce

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

More information

Nondeterminism. September 7, Nondeterminism

Nondeterminism. September 7, Nondeterminism September 7, 204 Introduction is a useful concept that has a great impact on the theory of computation Introduction is a useful concept that has a great impact on the theory of computation So far in our

More information

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

More information

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata : Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means

More information

Introduction to Formal Languages, Automata and Computability p.1/42

Introduction to Formal Languages, Automata and Computability p.1/42 Introduction to Formal Languages, Automata and Computability Pushdown Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/42 Introduction We have considered

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Theory of Regular Expressions DFAs and NFAs Reminders Project 1 due Sep. 24 Homework 1 posted Exam 1 on Sep. 25 Exam topics list posted Practice homework

More information

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular Expressions Orit Moskovich Gal Rotem Tel Aviv University October 28, 2015 Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular

More information

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor 60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

More information

Sri vidya college of engineering and technology

Sri vidya college of engineering and technology Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 28 Alexis Maciel Department of Computer Science Clarkson University Copyright c 28 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

The Turing machine model of computation

The Turing machine model of computation The Turing machine model of computation For most of the remainder of the course we will study the Turing machine model of computation, named after Alan Turing (1912 1954) who proposed the model in 1936.

More information

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

September 11, Second Part of Regular Expressions Equivalence with Finite Aut Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language

More information

CS 455/555: Finite automata

CS 455/555: Finite automata CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently

More information

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata. CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

More information

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

Finite Automata. BİL405 - Automata Theory and Formal Languages 1 Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states

More information

Chapter 8. Turing Machine (TMs)

Chapter 8. Turing Machine (TMs) Chapter 8 Turing Machine (TMs) Turing Machines (TMs) Accepts the languages that can be generated by unrestricted (phrase-structured) grammars No computational machine (i.e., computational language recognition

More information

Classes and conversions

Classes and conversions Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r

More information

Inf2A: Converting from NFAs to DFAs and Closure Properties

Inf2A: Converting from NFAs to DFAs and Closure Properties 1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether

More information

Finite Automata. Finite Automata

Finite Automata. Finite Automata Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State

More information

1 Unrestricted Computation

1 Unrestricted Computation 1 Unrestricted Computation General Computing Machines Machines so far: DFAs, NFAs, PDAs Limitations on how much memory they can use: fixed amount of memory plus (for PDAs) a stack Limitations on what they

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

CS4026 Formal Models of Computation

CS4026 Formal Models of Computation CS4026 Formal Models of Computation Turing Machines Turing Machines Abstract but accurate model of computers Proposed by Alan Turing in 1936 There weren t computers back then! Turing s motivation: find

More information

Lecture 3: Nondeterministic Finite Automata

Lecture 3: Nondeterministic Finite Automata Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where

More information

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4 Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is

More information

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA) Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

Two Way Deterministic Finite Automata

Two Way Deterministic Finite Automata Two Way Deterministic Finite Automata Jagvir Singh and Pavan Kumar Akulakrishna Indian Institute of Science November 29, 2013 Jagvir Singh and Pavan Kumar Akulakrishna (IISC) 2DFA November 29, 2013 1 /

More information

THEORY OF COMPUTATION

THEORY OF COMPUTATION Finite Automata and Regular Expressions: Formal Languages and Regular expressions, Deterministic and Non-Deterministic Finite Automata, Finite Automata with ε-moves, Equivalence of NFA and DFA, Minimization

More information

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

The Church-Turing Thesis

The Church-Turing Thesis The Church-Turing Thesis Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

More information

Computational Models #1

Computational Models #1 Computational Models #1 Handout Mode Nachum Dershowitz & Yishay Mansour March 13-15, 2017 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, 2017 1 / 41 Lecture Outline I Motivation

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages CS 154 Finite Automata vs Regular Expressions, Non-Regular Languages Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and guessing

More information

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting

More information

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Outline Nondeterminism Regular expressions Elementary reductions http://www.cs.caltech.edu/~cs20/a October 8, 2002 1 Determistic Finite Automata A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Q is a finite

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

Graph Reachability and Pebble Automata over Infinite Alphabets

Graph Reachability and Pebble Automata over Infinite Alphabets Graph Reachability and Pebble Automata over Infinite Alphabets Tony Tan Department of Computer Science Technion Israel Institute of Technology Haifa 32000, Israel Email: tantony@cs.technion.ac.il Abstract

More information

Turing Machines (TM) The Turing machine is the ultimate model of computation.

Turing Machines (TM) The Turing machine is the ultimate model of computation. TURING MACHINES Turing Machines (TM) The Turing machine is the ultimate model of computation. Alan Turing (92 954), British mathematician/engineer and one of the most influential scientists of the last

More information

CSCC63 Worksheet Turing Machines

CSCC63 Worksheet Turing Machines 1 An Example CSCC63 Worksheet Turing Machines Goal. Design a turing machine, M that accepts only strings of the form {w#w w {0, 1} }. Idea. Describe in words how the machine would work. Read first symbol

More information

Foundations of

Foundations of 91.304 Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin dm@cs.uml.edu With some modifications by Prof. Karen Daniels, Fall 2012

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) 1 Deterministic Turing Machine (DTM).. B B 0 1 1 0 0 B B.. Finite Control Two-way, infinite tape, broken into

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

Theory of Computation

Theory of Computation Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,

More information

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CS 154. Finite Automata, Nondeterminism, Regular Expressions CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata

More information

Chapter 2: Finite Automata

Chapter 2: Finite Automata Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A

More information

3.13. PUSHDOWN AUTOMATA Pushdown Automata

3.13. PUSHDOWN AUTOMATA Pushdown Automata 3.13. PUSHDOWN AUTOMATA 317 3.13 Pushdown Automata We have seen that the regular languages are exactly the languages accepted by DFA s or NFA s. The context-free languages are exactly the languages accepted

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite

More information

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The

More information

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine) Finite Automata - Deterministic Finite Automata Deterministic Finite Automaton (DFA) (or Finite State Machine) M = (K, Σ, δ, s, A), where K is a finite set of states Σ is an input alphabet s K is a distinguished

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, Spring 2004 Answer Key CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is

More information

Lecture 1: Finite State Automaton

Lecture 1: Finite State Automaton Lecture 1: Finite State Automaton Instructor: Ketan Mulmuley Scriber: Yuan Li January 6, 2015 1 Deterministic Finite Automaton Informally, a deterministic finite automaton (DFA) has finite number of s-

More information

This lecture covers Chapter 6 of HMU: Pushdown Automata

This lecture covers Chapter 6 of HMU: Pushdown Automata This lecture covers Chapter 6 of HMU: ushdown Automata ushdown Automata (DA) Language accepted by a DA Equivalence of CFs and the languages accepted by DAs Deterministic DAs Additional Reading: Chapter

More information

Kolmogorov structure functions for automatic complexity

Kolmogorov structure functions for automatic complexity Kolmogorov structure functions for automatic complexity Bjørn Kjos-Hanssen June 16, 2015 Varieties of Algorithmic Information, University of Heidelberg Internationales Wissenschaftssentrum History 1936:

More information

Introduction to Turing Machines

Introduction to Turing Machines Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

Chapter 3: The Church-Turing Thesis

Chapter 3: The Church-Turing Thesis Chapter 3: The Church-Turing Thesis 1 Turing Machine (TM) Control... Bi-direction Read/Write Turing machine is a much more powerful model, proposed by Alan Turing in 1936. 2 Church/Turing Thesis Anything

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Today's learning goals Sipser Ch 3 Trace the computation of a Turing machine using its transition function and configurations.

More information

The Turing Machine. CSE 211 (Theory of Computation) The Turing Machine continued. Turing Machines

The Turing Machine. CSE 211 (Theory of Computation) The Turing Machine continued. Turing Machines The Turing Machine Turing Machines Professor Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka-1000, Bangladesh The Turing machine is essentially

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

More information

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata Sungjin Im University of California, Merced 1-27-215 Nondeterminism Michael Rabin and Dana Scott (1959) Michael Rabin Dana

More information

Closure under the Regular Operations

Closure under the Regular Operations Closure under the Regular Operations Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have

More information

Automata and Languages

Automata and Languages Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Nondeterministic Finite Automata with empty moves (-NFA) Definition A nondeterministic finite automaton

More information

Decision, Computation and Language

Decision, Computation and Language Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 23rd September, 2014 1 / 29 1 Closure properties of regular languages

More information

CpSc 421 Final Exam December 15, 2006

CpSc 421 Final Exam December 15, 2006 CpSc 421 Final Exam December 15, 2006 Do problem zero and six of problems 1 through 9. If you write down solutions for more that six problems, clearly indicate those that you want graded. Note that problems

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.1 Design an automaton that recognizes a given language. Specify each of

More information

October 6, Equivalence of Pushdown Automata with Context-Free Gramm

October 6, Equivalence of Pushdown Automata with Context-Free Gramm Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free

More information