Download presentation
Presentation is loading. Please wait.
Published byBenny Hadiman Modified over 6 years ago
1
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU
2
Deterministic Finite Automaton (DFA)
Input Tape String Output “Accept” or “Reject” Finite Automaton Prof. Busch - LSU
3
Transition Graph initial state accepting state transition state
Prof. Busch - LSU
4
For every state, there is a transition
Alphabet For every state, there is a transition for every symbol in the alphabet Prof. Busch - LSU
5
Initial Configuration
head Input Tape Input String Initial state Prof. Busch - LSU
6
Scanning the Input Prof. Busch - LSU
7
Prof. Busch - LSU
8
Prof. Busch - LSU
9
Last state determines the outcome
Input finished accept Last state determines the outcome Prof. Busch - LSU
10
A Rejection Case Input String Prof. Busch - LSU
11
Prof. Busch - LSU
12
Prof. Busch - LSU
13
Last state determines the outcome
Input finished reject Last state determines the outcome Prof. Busch - LSU
14
Another Rejection Case
Tape is empty Input Finished (no symbol read) reject Prof. Busch - LSU
15
This automaton accepts only one string
Language Accepted: Prof. Busch - LSU
16
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
17
Another Example Accept state Accept state Accept state
Prof. Busch - LSU
18
Another Example Alphabet: Language Accepted: Prof. Busch - LSU
19
Formal Definition Deterministic Finite Automaton (DFA) : set of states
: input alphabet : transition function : initial state : set of accepting states Prof. Busch - LSU
20
Example: Prof. Busch - LSU
21
Prof. Busch - LSU
22
Transition Table for symbols states Prof. Busch - LSU
23
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
24
Language Accepted by DFA
it is denoted as and contains all the strings accepted by We also say that recognizes Prof. Busch - LSU
25
= { all strings with prefix }
accept Prof. Busch - LSU
26
= { all binary strings containing substring }
Prof. Busch - LSU
27
= { all binary strings without substring }
Prof. Busch - LSU
28
Prof. Busch - LSU
29
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
30
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
31
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.