{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture02­_finite_automata

lecture02­_finite_automata -...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Deterministic Finite Automata COMPSCI 102 Lecture 2
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Let me show you a machine so simple that you can understand it in less than two minutes
Image of page 2
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 0 0,1 0 0 1 1 1 0111 111 11 1 The machine accepts a string if the process ends in a double circle
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 0 0,1 0 0 1 1 1 The machine accepts a string if the process ends in a double circle Anatomy of a Deterministic Finite Automaton states states q 0 q 1 q 2 q 3 start state (q 0 ) accept states (F)
Image of page 4
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 Anatomy of a Deterministic Finite Automaton 0 0,1 0 0 1 1 1 q 0 q 1 q 2 q 3 The alphabet of a finite automaton is the set where the symbols come from: The language of a finite automaton is the set of strings that it accepts {0,1}
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 0,1 q 0 L(M) = All strings of 0s and 1s The Language of Machine M
Image of page 6
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 q 0 q 1 0 0 1 1 L(M) = { w | w has an even number of 1s}
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For a string x, |x| is the length of x The unique string of length 0 will be denoted by ε and will be called the empty or null string Notation A language over Σ is a set of strings over Σ
Image of page 8
Steven Rudich: www.cs.cmu.edu/~rudich rudich0123456789 Q is the set of states Σ is the alphabet δ : Q × Σ → Q is the transition function q 0 Q is the start state F Q is the set of accept states A finite automaton is a 5-tuple M = (Q, Σ, δ , q 0 , F) L(M) = the language of machine M = set of all strings machine M accepts
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}