04 - Lecture 4: Finite Automata A nite automaton is a...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 4: Finite Automata A fnite automaton is a machine (controller) with only a fnite number oF states. It is the simplest and most restricted model oF a com- puter. Such a controller is used in many electromechanical de- vices, e.g., automatic door, liFt, vending machine, wash- ing machine, microwave oven, parts oF digital watches and calculators. Example: vending machine $2 $0.5 $0.5 $0.5 $2 $0.5 $1 $1 $2 $1 start B C sold A 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Deterministic fnite automata Deterministic fnite automata (DFA) : A language recognizer consisting of 1. An input tape — divided into squares, for storing the string input. 2. A fnite control — a controller that can be in a Fnite number of states. 3. A reading head — move one position to the right each step. q 4 q 3 q 2 q 1 q 0 q 5 control Finite bb abaa a b tape Input Reading Head 2
Background image of page 2
Deterministic fnite automata How does a DFA work? 1. Initialization: The reading head is at the leftmost square. The Fnite control is in the initial state . 2. After reading a symbol, The reading head moves one square to the right. The Fnite control enters a new state, which is deterministically dependent on the current state and current input symbol. 3. After reading the entire input string, If the Fnite control is in a fnal state , the input string is considered accepted . Otherwise, the input string is not . 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Deterministic fnite automata A DFA is a quintuple M =( K, Σ ,δ,s,F )where K — a fnite set oF states (oF the machine), Σ — an alphabet (symbols that the machine recog- nizes), s K — the initial state, F K — a set oF fnal states (a.k.a. accepting states) δ
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/22/2011 for the course COMP 272 taught by Professor Prof.tai during the Spring '10 term at HKUST.

Page1 / 15

04 - Lecture 4: Finite Automata A nite automaton is a...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online