1
Chapter Two: Finite Automata
Formal Language, chapter 2, slide 1
Chapter Two: Finite Automata Formal Language, chapter 2, slide 1 1 - - PowerPoint PPT Presentation
Chapter Two: Finite Automata Formal Language, chapter 2, slide 1 1 One way to define a language is to construct an automatona kind of abstract computer that takes a string as input and produces a yes- or-no answer. The language it
1
Formal Language, chapter 2, slide 1
2
Formal Language, chapter 2, slide 2
3
Formal Language, chapter 2, slide 3
4
Formal Language, chapter 2, slide 4
5
Formal Language, chapter 2, slide 5
6
E: mwgc W: E: wc W: mg g g
Formal Language, chapter 2, slide 6
7
E : W: mwgc E: mwgc W: E: wc W: mg g g E: mwc W: g n n E: c W: mwg E: w W: mgc E: mgc W: w E: mgw W: c E: mg W: wc g g E: g W: mwc n n g g g g w w c c c c w w Formal Language, chapter 2, slide 7
8
Formal Language, chapter 2, slide 8
9
Formal Language, chapter 2, slide 9
10
error w,g,c,n
Formal Language, chapter 2, slide 10
11
E : W: mwgc E: mwgc W: E: wc W: mg g g E: mwc W: g n n E: c W: mwg E: w W: mgc E: mgc W: w E: mgw W: c E: mg W: wc g g E: g W: mwc n n error g g g g w w c c c c w w w,g,c,n w,c,n w,c,n w,c w,c g g c,n w,n c,n w,n
Formal Language, chapter 2, slide 11
12
Formal Language, chapter 2, slide 12
13
Formal Language, chapter 2, slide 13
14
Formal Language, chapter 2, slide 14
15
Formal Language, chapter 2, slide 15
16
b a a b
last symbol seen was not a last symbol seen was a b a a b Formal Language, chapter 2, slide 16
17
Formal Language, chapter 2, slide 17
18
Formal Language, chapter 2, slide 18
19
– Drawn as circles in the diagram – We often refer to individual states as qi – The definition requires at least one: q0, the start state
– Drawn as double circles in the diagram
Formal Language, chapter 2, slide 19
20
Formal Language, chapter 2, slide 20
21
q0 q1 b a a b
Formal Language, chapter 2, slide 21
22
Formal Language, chapter 2, slide 22
23
– δ*(q,ε) = q – δ*(q,xa) = δ(δ*(q,x),a)
– For the empty string, no moves – For any string xa (x is any string and a is any final symbol) first make the moves on x, then one final move on a
Formal Language, chapter 2, slide 23
24
Formal Language, chapter 2, slide 24
25
Formal Language, chapter 2, slide 25