SlideShare a Scribd company logo
1 of 57
Costas Busch - LSU 1
Deterministic
Finite Automata
And Regular Languages
Costas Busch - LSU 2
Deterministic Finite Automaton (DFA)
Input Tape
“Accept”
or
“Reject”
String
Finite
Automaton
Output
Costas Busch - LSU 3
Transition Graph
initial
state
accepting
state
state
transition
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
Costas Busch - LSU 4
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
},{ ba
For every state, there is a transition
for every symbol in the alphabet
Alphabet
Costas Busch - LSU 5
Initial Configuration
1q 2q 3q 4qa b b a
5q
a a bb
ba,
Input String
a b b a
ba,
0q
Initial state
Input Tape
head
Costas Busch - LSU 6
Scanning the Input
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b b a
ba,
Costas Busch - LSU 7
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b b a
ba,
Costas Busch - LSU 8
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b b a
ba,
Costas Busch - LSU 9
0q 1q 2q 3q 4qa b b a accept
5q
a a bb
ba,
a b b a
ba,
Input finished
Last state determines the outcome
Costas Busch - LSU 10
1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b a
ba,
0q
A Rejection Case
Input String
Costas Busch - LSU 11
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b a
ba,
Costas Busch - LSU 12
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
a b a
ba,
Costas Busch - LSU 13
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
reject
a b a
ba,
Input finished
Last state determines the outcome
Costas Busch - LSU 14
1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
0q
)(
Another Rejection Case
Tape is empty
reject
Input Finished (no symbol read)
Costas Busch - LSU 15
Language Accepted:  abbaL 
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
This automaton accepts only one string
Costas Busch - LSU 16
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
Costas Busch - LSU 17
Another Example
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
 abbaabL ,,
Accept
state
Accept
state
Accept
state
Costas Busch - LSU 18
)(
Empty Tape
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
accept
Input Finished
Costas Busch - LSU 19
Another Example
a
b ba,
ba,
0q 1q 2q
Accept
state
trap state
Costas Busch - LSU 20
a
b ba,
ba,
0q 1q 2q
a ba
Input String
Costas Busch - LSU 21
a
b ba,
ba,
0q 1q 2q
a ba
Costas Busch - LSU 22
a
b ba,
ba,
0q 1q 2q
a ba
Costas Busch - LSU 23
a
b ba,
ba,
0q 1q 2q
a ba
accept
Input finished
Costas Busch - LSU 24
a
b ba,
ba,
0q 1q 2q
ab b
A rejection case
Input String
Costas Busch - LSU 25
a
b ba,
ba,
0q 1q 2q
ab b
Costas Busch - LSU 26
a
b ba,
ba,
0q 1q 2q
ab b
Costas Busch - LSU 27
a
b ba,
ba,
0q 1q 2q
ab b
reject
Input finished
Costas Busch - LSU 28
Language Accepted: }0:{  nbaL n
a
b ba,
ba,
0q 1q 2q
Costas Busch - LSU 29
Another Example
0q 1q
1
1
}1{Alphabet:
Language Accepted:
even}isand:{ *
xxxEVEN 
},111111,1111,11,{ 
Costas Busch - LSU 30
Formal Definition
Deterministic Finite Automaton (DFA)
 FqQM ,,,, 0
Q


0q
F
: set of states
: input alphabet
: transition function
: initial state
: set of accepting states

Costas Busch - LSU 31
Set of States Q
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
 543210 ,,,,, qqqqqqQ 
ba,
Example
Costas Busch - LSU 32
Input Alphabet 
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba, ba,
ba,
:the input alphabet never contains 
Example
Costas Busch - LSU 33
Initial State 0q
1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
0q
Example
Costas Busch - LSU 34
Set of Accepting States QF 
0q 1q 2q 3qa b b a
5q
a a bb
ba, 4qF 
ba,
4q
Example
Costas Busch - LSU 35
Transition Function QQ :
q q x
qxq ),(
Describes the result of a transition
from state with symbolq x
Costas Busch - LSU 36
2q 3q 4qa b b a
5q
a a bb
ba,
ba,
0q 1q
  10, qaq 
Example:
Costas Busch - LSU 37
  50, qbq 
1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
0q
Costas Busch - LSU 38
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
  32, qbq 
Costas Busch - LSU 39
 a b
0q
1q
2q
3q
4q
5q
1q 5q
5q 2q
5q 3q
4q 5q
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,5q5q
5q5q
Transition Table for
states
symbols

Costas Busch - LSU 40
Extended Transition Function
QQ  **
:
qwq ),(*

Describes the resulting state
after scanning string from statew q
Costas Busch - LSU 41
  20
*
, qabq 
3q 4qa b b a
5q
a a bb
ba,
ba,
0q 1q 2q
Example:
Costas Busch - LSU 42
  50
*
, qabbbaaq 
1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
0q
Costas Busch - LSU 43
  41
*
, qbbaq 
0q 1q 2q 3q 4qa b b a
5q
a a bb
ba,
ba,
Costas Busch - LSU 44
Special case:
  qq  ,*
for any state q
Costas Busch - LSU 45
  qwq ,*

q qw
q q
kw  21
1 2 k
states may be repeated
In general:
implies that there is a walk of transitions
Costas Busch - LSU 46
Language accepted by DFA :
Language Accepted by DFA
it is denoted as and contains
all the strings accepted by
 ML
M
M
 MLWe also say that recognizesM
Costas Busch - LSU 47
For a DFA
Language accepted by :
 FqQM ,,,, 0
M
    FwqwML  ,: 0
**

0q qw Fq 
Costas Busch - LSU 48
Language rejected by :
    FwqwML  ,: 0
**

M
0q qw Fq 
Costas Busch - LSU 49
0q
More DFA Examples
ba,
},{ ba
*
)( ML
0q
ba,
}{)( ML
Empty language All strings
Costas Busch - LSU 50
1q
ba,
},{ ba
0q ba,
}{)( ML
Language of the empty string
Costas Busch - LSU 51
 ML = { all strings with prefix }ab
a b
ba,
0q 1q 2q
accept
ba,3q
ab
},{ ba
Costas Busch - LSU 52
 ML = { all binary strings containing
substring }001
 0 00 001
1
0
1
10
0
1,0
Costas Busch - LSU 53
 ML = { all binary strings without
substring }001
 0 00 001
1
0
1
10
0 1,0
Costas Busch - LSU 54
  *
,:)( bawawaML 
a
b
ba,
a
b
b
a
0q 2q 3q
1q
Costas Busch - LSU 55
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
L
M LML )(
Costas Busch - LSU 56
 abba  abbaab,,
}0:{ nban
{ all strings in {a,b}* with prefix }ab
{ all binary strings without substring }001
Example regular languages:
There exist DFAs that accept these
languages (see previous slides).
  *
,: bawawa 
even}isand}1{:{ *
xxx 
}{ }{
*
},{ ba
Costas Busch - LSU 57
There exist languages which are not Regular:
}0:{  nbaL nn
There are no DFAs that accept these languages
(we will prove this in a later class)
}n
,1z,1y,1x:{ mn
km
zyxADDITION k



More Related Content

What's hot

Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
 
Push down automata
Push down automataPush down automata
Push down automataSomya Bagai
 
Context free grammars
Context free grammarsContext free grammars
Context free grammarsRonak Thakkar
 
Context free grammars
Context free grammarsContext free grammars
Context free grammarsShiraz316
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryTsegazeab Asgedom
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR Zahid Parvez
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automatonSampath Kumar S
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarMdImamHasan1
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02hamzamughal39
 

What's hot (20)

Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Push down automata
Push down automataPush down automata
Push down automata
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
push down automata
push down automatapush down automata
push down automata
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Finite automata
Finite automataFinite automata
Finite automata
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
 
Dfa basics
Dfa basicsDfa basics
Dfa basics
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
 
Push down automata
Push down automataPush down automata
Push down automata
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous Grammar
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 

Viewers also liked

Properties of Regular Expressions
Properties of Regular ExpressionsProperties of Regular Expressions
Properties of Regular ExpressionsShiraz316
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataHafsa.Naseem
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of ComputationShiraz316
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
Applications of Automata in Electronic Machines and Android Games (Finite Aut...
Applications of Automata in Electronic Machines and Android Games (Finite Aut...Applications of Automata in Electronic Machines and Android Games (Finite Aut...
Applications of Automata in Electronic Machines and Android Games (Finite Aut...ijcoa
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsShiraz316
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing MachineRajendran
 
Dfa example
Dfa   exampleDfa   example
Dfa examplesaerrii
 
Universal turing coastus
Universal turing coastusUniversal turing coastus
Universal turing coastusShiraz316
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfadeepinderbedi
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagramsAPU
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite AutomatAdel Al-Ofairi
 

Viewers also liked (18)

Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
Properties of Regular Expressions
Properties of Regular ExpressionsProperties of Regular Expressions
Properties of Regular Expressions
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite Automata
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Applications of Automata in Electronic Machines and Android Games (Finite Aut...
Applications of Automata in Electronic Machines and Android Games (Finite Aut...Applications of Automata in Electronic Machines and Android Games (Finite Aut...
Applications of Automata in Electronic Machines and Android Games (Finite Aut...
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
Dfa example
Dfa   exampleDfa   example
Dfa example
 
Lecture2 B
Lecture2 BLecture2 B
Lecture2 B
 
Universal turing coastus
Universal turing coastusUniversal turing coastus
Universal turing coastus
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
Turing machines
Turing machinesTuring machines
Turing machines
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
Nfa egs
Nfa egsNfa egs
Nfa egs
 

Similar to DFAs and Regular Languages (40

Turing machines
Turing machinesTuring machines
Turing machinesShiraz316
 
Lec 3 ---- dfa
Lec 3  ---- dfaLec 3  ---- dfa
Lec 3 ---- dfaAbdul Aziz
 
context free grammars_simplification
context free grammars_simplificationcontext free grammars_simplification
context free grammars_simplificationShiraz316
 
Turing Machine
Turing MachineTuring Machine
Turing MachineRajendran
 
Pushdown Automata
Pushdown AutomataPushdown Automata
Pushdown Automataparmeet834
 
Universal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.pptUniversal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.pptHimanshuSharma997566
 

Similar to DFAs and Regular Languages (40 (6)

Turing machines
Turing machinesTuring machines
Turing machines
 
Lec 3 ---- dfa
Lec 3  ---- dfaLec 3  ---- dfa
Lec 3 ---- dfa
 
context free grammars_simplification
context free grammars_simplificationcontext free grammars_simplification
context free grammars_simplification
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Pushdown Automata
Pushdown AutomataPushdown Automata
Pushdown Automata
 
Universal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.pptUniversal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.ppt
 

More from Shiraz316

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISShiraz316
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationShiraz316
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt reportShiraz316
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt reportShiraz316
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt reportShiraz316
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt reportShiraz316
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt reportShiraz316
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt reportShiraz316
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt reportShiraz316
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt reportShiraz316
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt reportShiraz316
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt reportShiraz316
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt reportShiraz316
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt reportShiraz316
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt reportShiraz316
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt reportShiraz316
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt reportShiraz316
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session TrainingShiraz316
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceShiraz316
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEShiraz316
 

More from Shiraz316 (20)

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 

DFAs and Regular Languages (40

  • 1. Costas Busch - LSU 1 Deterministic Finite Automata And Regular Languages
  • 2. Costas Busch - LSU 2 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output
  • 3. Costas Busch - LSU 3 Transition Graph initial state accepting state state transition 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba,
  • 4. Costas Busch - LSU 4 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba, },{ ba For every state, there is a transition for every symbol in the alphabet Alphabet
  • 5. Costas Busch - LSU 5 Initial Configuration 1q 2q 3q 4qa b b a 5q a a bb ba, Input String a b b a ba, 0q Initial state Input Tape head
  • 6. Costas Busch - LSU 6 Scanning the Input 0q 1q 2q 3q 4qa b b a 5q a a bb ba, a b b a ba,
  • 7. Costas Busch - LSU 7 0q 1q 2q 3q 4qa b b a 5q a a bb ba, a b b a ba,
  • 8. Costas Busch - LSU 8 0q 1q 2q 3q 4qa b b a 5q a a bb ba, a b b a ba,
  • 9. Costas Busch - LSU 9 0q 1q 2q 3q 4qa b b a accept 5q a a bb ba, a b b a ba, Input finished Last state determines the outcome
  • 10. Costas Busch - LSU 10 1q 2q 3q 4qa b b a 5q a a bb ba, a b a ba, 0q A Rejection Case Input String
  • 11. Costas Busch - LSU 11 0q 1q 2q 3q 4qa b b a 5q a a bb ba, a b a ba,
  • 12. Costas Busch - LSU 12 0q 1q 2q 3q 4qa b b a 5q a a bb ba, a b a ba,
  • 13. Costas Busch - LSU 13 0q 1q 2q 3q 4qa b b a 5q a a bb ba, reject a b a ba, Input finished Last state determines the outcome
  • 14. Costas Busch - LSU 14 1q 2q 3q 4qa b b a 5q a a bb ba, ba, 0q )( Another Rejection Case Tape is empty reject Input Finished (no symbol read)
  • 15. Costas Busch - LSU 15 Language Accepted:  abbaL  0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba, This automaton accepts only one string
  • 16. Costas Busch - LSU 16 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
  • 17. Costas Busch - LSU 17 Another Example 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba,  abbaabL ,, Accept state Accept state Accept state
  • 18. Costas Busch - LSU 18 )( Empty Tape 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba, accept Input Finished
  • 19. Costas Busch - LSU 19 Another Example a b ba, ba, 0q 1q 2q Accept state trap state
  • 20. Costas Busch - LSU 20 a b ba, ba, 0q 1q 2q a ba Input String
  • 21. Costas Busch - LSU 21 a b ba, ba, 0q 1q 2q a ba
  • 22. Costas Busch - LSU 22 a b ba, ba, 0q 1q 2q a ba
  • 23. Costas Busch - LSU 23 a b ba, ba, 0q 1q 2q a ba accept Input finished
  • 24. Costas Busch - LSU 24 a b ba, ba, 0q 1q 2q ab b A rejection case Input String
  • 25. Costas Busch - LSU 25 a b ba, ba, 0q 1q 2q ab b
  • 26. Costas Busch - LSU 26 a b ba, ba, 0q 1q 2q ab b
  • 27. Costas Busch - LSU 27 a b ba, ba, 0q 1q 2q ab b reject Input finished
  • 28. Costas Busch - LSU 28 Language Accepted: }0:{  nbaL n a b ba, ba, 0q 1q 2q
  • 29. Costas Busch - LSU 29 Another Example 0q 1q 1 1 }1{Alphabet: Language Accepted: even}isand:{ * xxxEVEN  },111111,1111,11,{ 
  • 30. Costas Busch - LSU 30 Formal Definition Deterministic Finite Automaton (DFA)  FqQM ,,,, 0 Q   0q F : set of states : input alphabet : transition function : initial state : set of accepting states 
  • 31. Costas Busch - LSU 31 Set of States Q 0q 1q 2q 3q 4qa b b a 5q a a bb ba,  543210 ,,,,, qqqqqqQ  ba, Example
  • 32. Costas Busch - LSU 32 Input Alphabet  0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba, ba, :the input alphabet never contains  Example
  • 33. Costas Busch - LSU 33 Initial State 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba, 0q Example
  • 34. Costas Busch - LSU 34 Set of Accepting States QF  0q 1q 2q 3qa b b a 5q a a bb ba, 4qF  ba, 4q Example
  • 35. Costas Busch - LSU 35 Transition Function QQ : q q x qxq ),( Describes the result of a transition from state with symbolq x
  • 36. Costas Busch - LSU 36 2q 3q 4qa b b a 5q a a bb ba, ba, 0q 1q   10, qaq  Example:
  • 37. Costas Busch - LSU 37   50, qbq  1q 2q 3q 4qa b b a 5q a a bb ba, ba, 0q
  • 38. Costas Busch - LSU 38 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba,   32, qbq 
  • 39. Costas Busch - LSU 39  a b 0q 1q 2q 3q 4q 5q 1q 5q 5q 2q 5q 3q 4q 5q 0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba,5q5q 5q5q Transition Table for states symbols 
  • 40. Costas Busch - LSU 40 Extended Transition Function QQ  ** : qwq ),(*  Describes the resulting state after scanning string from statew q
  • 41. Costas Busch - LSU 41   20 * , qabq  3q 4qa b b a 5q a a bb ba, ba, 0q 1q 2q Example:
  • 42. Costas Busch - LSU 42   50 * , qabbbaaq  1q 2q 3q 4qa b b a 5q a a bb ba, ba, 0q
  • 43. Costas Busch - LSU 43   41 * , qbbaq  0q 1q 2q 3q 4qa b b a 5q a a bb ba, ba,
  • 44. Costas Busch - LSU 44 Special case:   qq  ,* for any state q
  • 45. Costas Busch - LSU 45   qwq ,*  q qw q q kw  21 1 2 k states may be repeated In general: implies that there is a walk of transitions
  • 46. Costas Busch - LSU 46 Language accepted by DFA : Language Accepted by DFA it is denoted as and contains all the strings accepted by  ML M M  MLWe also say that recognizesM
  • 47. Costas Busch - LSU 47 For a DFA Language accepted by :  FqQM ,,,, 0 M     FwqwML  ,: 0 **  0q qw Fq 
  • 48. Costas Busch - LSU 48 Language rejected by :     FwqwML  ,: 0 **  M 0q qw Fq 
  • 49. Costas Busch - LSU 49 0q More DFA Examples ba, },{ ba * )( ML 0q ba, }{)( ML Empty language All strings
  • 50. Costas Busch - LSU 50 1q ba, },{ ba 0q ba, }{)( ML Language of the empty string
  • 51. Costas Busch - LSU 51  ML = { all strings with prefix }ab a b ba, 0q 1q 2q accept ba,3q ab },{ ba
  • 52. Costas Busch - LSU 52  ML = { all binary strings containing substring }001  0 00 001 1 0 1 10 0 1,0
  • 53. Costas Busch - LSU 53  ML = { all binary strings without substring }001  0 00 001 1 0 1 10 0 1,0
  • 54. Costas Busch - LSU 54   * ,:)( bawawaML  a b ba, a b b a 0q 2q 3q 1q
  • 55. Costas Busch - LSU 55 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 L M LML )(
  • 56. Costas Busch - LSU 56  abba  abbaab,, }0:{ nban { all strings in {a,b}* with prefix }ab { all binary strings without substring }001 Example regular languages: There exist DFAs that accept these languages (see previous slides).   * ,: bawawa  even}isand}1{:{ * xxx  }{ }{ * },{ ba
  • 57. Costas Busch - LSU 57 There exist languages which are not Regular: }0:{  nbaL nn There are no DFAs that accept these languages (we will prove this in a later class) }n ,1z,1y,1x:{ mn km zyxADDITION k  