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
For every state, there is a transition 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
Prof. Busch - LSU
Prof. Busch - LSU
Last state determines the outcome Input finished accept Last state determines the outcome Prof. Busch - LSU
A Rejection Case Input String Prof. Busch - LSU
Prof. Busch - LSU
Prof. Busch - LSU
Last state determines the outcome 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
all the input string is scanned and the last state is accepting 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
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
Example: Prof. Busch - LSU
Prof. Busch - LSU
Transition Table for symbols states Prof. Busch - LSU
implies that there is a walk of transitions In general: implies that there is a walk of transitions states may be repeated Prof. Busch - LSU
Language Accepted by DFA it is denoted as and contains all the strings accepted by We also say that recognizes Prof. Busch - LSU
= { all strings with prefix } accept Prof. Busch - LSU
= { all binary strings containing substring } Prof. Busch - LSU
= { all binary strings without substring } Prof. Busch - LSU
Prof. Busch - LSU
Regular Languages Definition: A language is regular if there is a DFA that accepts it ( ) The languages accepted by all DFAs form the family of regular languages Prof. Busch - LSU
Example regular languages: { all strings in {a,b}* with prefix } { all binary strings without substring } There exist DFAs that accept these languages (see previous slides). Prof. Busch - LSU
There exist languages which are not Regular: There are no DFAs that accept these languages (we will prove this in a later class) Prof. Busch - LSU