Professional Documents
Culture Documents
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.1
Critical CS Questions
What is a computer? And What is a Computation? real computers too complex for any theory
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.1
Critical CS Questions
What is a computer? And What is a Computation? real computers too complex for any theory need manageable mathematical abstraction
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.1
Critical CS Questions
What is a computer? And What is a Computation? real computers too complex for any theory need manageable mathematical abstraction idealized models: accurate in some ways, but not in all details
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.1
Finite Automata
formal denition of nite automata
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
Finite Automata
formal denition of nite automata deterministic vs. non-deterministic nite automata
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
Finite Automata
formal denition of nite automata deterministic vs. non-deterministic nite automata regular languages
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
Finite Automata
formal denition of nite automata deterministic vs. non-deterministic nite automata regular languages operations on regular languages
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
Finite Automata
formal denition of nite automata deterministic vs. non-deterministic nite automata regular languages operations on regular languages regular expressions
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
Finite Automata
formal denition of nite automata deterministic vs. non-deterministic nite automata regular languages operations on regular languages regular expressions pumping lemma
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.2
front pad
rear pad
door
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.3
front pad
rear pad
door
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.3
front pad
rear pad
door
open when person approaches hold open until person clears dont open when someone standing behind door
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p.3
States:
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.4
States: OPEN
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.4
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.4
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.4
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.4
States: OPEN CLOSED Sensor: FRONT: someone on front pad REAR: someone on rear pad
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p.4
NEITHER
States: OPEN CLOSED Sensor: FRONT: someone on front pad REAR: someone on rear pad BOTH: someone(s) on both pads
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p.4
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
States: OPEN CLOSED Sensor: FRONT: someone on front pad REAR: someone on rear pad BOTH: someone(s) on both pads NEITHER no one on either pad.
NEITHER
p.4
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.5
NEITHER
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.5
NEITHER
neither front rear both closed closed open closed closed open closed open open open
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p.5
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.6
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.6
The machine M1 : states: q1 , q2 , and q3 . start state: q1 (arrow from outside). accept state: q2 (double circle).
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.6
The machine M1 : states: q1 , q2 , and q3 . start state: q1 (arrow from outside). accept state: q2 (double circle). state transitions: arrows.
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.6
On an input string
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.7
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.7
On an input string DFA begins in start state q1 after reading each symbol, DFA makes state transition with matching label.
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.7
On an input string DFA begins in start state q1 after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output:
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.7
On an input string DFA begins in start state q1 after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output: accept if DFA is an accepting state.
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.7
On an input string DFA begins in start state q1 after reading each symbol, DFA makes state transition with matching label. After reading last symbol, DFA produces output: accept if DFA is an accepting state. reject otherwise.
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p.7
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.8
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.8
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.8
Informal Denition
0 q1 1 q 2 0,1 1 0 q3
This DFA accepts all input strings that end with a 1 all input strings that contain at least one 1, and end with an even number of 0s no other strings
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.9
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.10
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.10
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.10
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.11
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.12
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.12
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.12
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.12
Formal Denitions
A deterministic nite automaton (DFA) is a 5-tuple (Q, , , q0 , F ), where Q is a nite set called the states, is a nite set called the alphabet, : Q Q is the transition function, q0 Q is the start state, and F Q is the set of accept states.
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.13
Back to M1
0 q1 1 q 2 0,1 1 0 q3
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.14
Back to M1
0 q1 1 q 2 0,1 1 0 q3
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
Back to M1
0 q1 1 q 2 0,1 1 0 q3
Another Example
s a q1 b r1
q 2
r2
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.15
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.16
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.17
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.17
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.17
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.18
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.19
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.20
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.20
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.20
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.21
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.21
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.21
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.21
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.21
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.22
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.22
Slides modied by Benny Chor, based on original slides by Maurice Herlihy, Brown University.
p.22