570 likes | 820 Views
Deterministic Finite Automata And Regular Languages. Deterministic Finite Automaton (DFA). Input Tape. String. Output. “Accept” or “Reject”. Finite Automaton. Transition Graph. initial state. accepting state. transition. state. Alphabet.
E N D
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU
Deterministic Finite Automaton (DFA) Input Tape String Output “Accept” or “Reject” Finite Automaton Prof. Busch - LSU
Transition Graph initial state accepting state transition state Prof. Busch - LSU
Alphabet For every state, there is a transition for every symbol in the alphabet Prof. Busch - LSU
Initial Configuration head Input Tape Input String Initial state Prof. Busch - LSU
Scanning the Input Prof. Busch - LSU
Input finished accept Last state determines the outcome Prof. Busch - LSU
A Rejection Case Input String Prof. Busch - LSU
Input finished reject Last state determines the outcome Prof. Busch - LSU
Another Rejection Case Tape is empty Input Finished (no symbol read) reject Prof. Busch - LSU
This automaton accepts only one string Language Accepted: Prof. Busch - LSU
To accept a string: all the input string is scanned and the last state is accepting To reject a string: all the input string is scanned and the last state is non-accepting Prof. Busch - LSU
Another Example Accept state Accept state Accept state Prof. Busch - LSU
Empty Tape Input Finished accept Prof. Busch - LSU
Another Example trap state Accept state Prof. Busch - LSU
Input String Prof. Busch - LSU
Input finished accept Prof. Busch - LSU
A rejection case Input String Prof. Busch - LSU
Input finished reject Prof. Busch - LSU
Language Accepted: Prof. Busch - LSU
Another Example Alphabet: Language Accepted: Prof. Busch - LSU
Formal Definition Deterministic Finite Automaton (DFA) : set of states : input alphabet : transition function : initial state : set of accepting states Prof. Busch - LSU
Set of States Example Prof. Busch - LSU
Input Alphabet :the input alphabet never contains Example Prof. Busch - LSU
Initial State Example Prof. Busch - LSU
Set of Accepting States Example Prof. Busch - LSU
Transition Function Describes the result of a transition from state with symbol Prof. Busch - LSU
Example: Prof. Busch - LSU
Transition Table for symbols states Prof. Busch - LSU
Extended Transition Function Describes the resulting state after scanning string from state Prof. Busch - LSU
Example: Prof. Busch - LSU
Special case: for any state Prof. Busch - LSU
In general: implies that there is a walk of transitions states may be repeated Prof. Busch - LSU
Language Accepted by DFA Language accepted by DFA : it is denoted as and contains all the strings accepted by We also say that recognizes Prof. Busch - LSU
For a DFA Language accepted by : Prof. Busch - LSU
Language rejected by : Prof. Busch - LSU
More DFA Examples Empty language All strings Prof. Busch - LSU
Language of the empty string Prof. Busch - LSU