This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 Introduction to Finite Automata Languages Deterministic Finite Automata Representations of Automata 2 Alphabets ◆ An alphabet is any finite set of symbols. ◆ Examples : ASCII, Unicode, {0,1} ( binary alphabet ), {a,b,c}. 3 Strings ◆ The set of strings over an alphabet Σ is the set of lists, each element of which is a member of Σ . ◗ Strings shown with no commas, e.g., abc. ◆ Σ * denotes this set of strings. ◆ ε stands for the empty string (string of length 0). 4 Example : Strings ◆ {0,1}* = { ε , 0, 1, 00, 01, 10, 11, 000, 001, . . . } ◆ Subtlety : 0 as a string, 0 as a symbol look the same. ◗ Context determines the type. 5 Languages ◆ A language is a subset of Σ * for some alphabet Σ . ◆ Example : The set of strings of 0’s and 1’s with no two consecutive 1’s. ◆ L = { ε , 0, 1, 00, 01, 10, 000, 001, 010, 100, 101, 0000, 0001, 0010, 0100, 0101, 1000, 1001, 1010, . . . } Hmm… 1 of length 0, 2 of length 1, 3, of length 2, 5 of length 3, 8 of length 4. I wonder how many of length 5? 6 Deterministic Finite Automata ◆ A formalism for defining languages, consisting of: 1. A finite set of states (Q, typically). 2. An input alphabet ( Σ , typically). 3. A transition function ( δ , typically). 4. A start state (q , in Q, typically). 5. A set of final states (F ⊆ Q, typically). ◆ “Final” and “accepting” are synonyms. 7 The Transition Function ◆ Takes two arguments: a state and an input symbol. ◆ δ (q, a) = the state that the DFA goes to when it is in state q and input a is received. 8 Graph Representation of DFA’s ◆ Nodes = states. ◆ Arcs represent transition function. ◗ Arc from state p to state q labeled by all those input symbols that have transitions from p to q. ◆ Arrow labeled “Start” to the start state. ◆ Final states indicated by double circles. 9 Example : Graph of a DFA Start 1 A C B 1 0,1 Previous string OK, does not end in 1. Previous String OK, ends in a single 1. Consecutive 1’s have been seen....
View
Full Document
 Spring '08
 Motwani,R

Click to edit the document details