{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture02&Acirc;&shy;_finite_automata

lecture02&Acirc;&shy;_finite_automata -...

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

Deterministic Finite Automata COMPSCI 102 Lecture 2

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

View Full Document
Let me show you a machine so simple that you can understand it in less than two minutes
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

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

View Full Document
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)
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}

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

View Full Document
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
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}

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

View Full Document
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 Σ
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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}