SlideShare a Scribd company logo
CSE322
Finite Automata
Lecture #1
Terminologies
• Symbols:
– Symbols are an entity or individual objects, which can be any letter,
alphabet or any picture.
– Example: 1, a, b, #
• Alphabets:
– Alphabets are a finite set of symbols. It is denoted by ∑.
– Examples: ∑ = {a, b} , ∑ = {A, B, C, D} , ∑ = {0, 1, 2}, ∑ = {#, β, Δ}
• String:
• It is a finite collection of symbols from the alphabet. The string is
denoted by w.
• Example 1:
• If ∑ = {a, b}, various string that can be generated from ∑ are {ab,
aa, aaa, bb, bbb, ba, aba.....}.
• A string with zero occurrences of symbols is known as an empty
string. It is represented by ε.
• The number of symbols in a string w is called the length of a
string. It is denoted by |w|.
Definition
An automaton is defined as a system where energy, materials and
information are transformed, transmitted and used for
performing some functions without direct participation of man.
Definition
• An automaton is an abstract model of a digital computer.
• Every automaton includes some essential features.
• It has a mechanism for reading input.
– This input mechanism can read the input from left to right
– One symbol at a time
– Can also detect the end of the input string
• An automaton can produce output of some sort.
• It may have a temporary storage device.
• An automaton has a control unit which can be in any one of
finite number of internal states and which can change state in
some defined manner.
Finite Automaton
Input
“Accept”
or
“Reject”
String
Finite
Automaton
Output
Formal Definition
• Finite Automaton (FA)
 
F
q
Q
M ,
,
,
, 0



• Finite Automaton (FA)
 
F
q
Q
M ,
,
,
, 0



Q


0
q
F
: set of states
: input alphabet
: transition function
: initial state
: set of accepting states
DESCRIPTION: DETERMINISTIC FINITE AUTOMATON
Lecture12_16717_Lecture1.ppt
Lecture12_16717_Lecture1.ppt
Topics
 Acceptability of a String by a Finite Automaton
 Transition Graph and Properties of Transition Functions
Transition System Definition
• The transition function which maps
Q x ∑* into Q
(i.e. maps a state and a string of input symbols
including the empty string into a state) is called the
indirect transition function.
Transition Graph
initial
state
accepting
state
state
transition
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
 
b
a,


b
a,
Input alphabet
Initial Configuration
1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
Input String
a b b a
b
a,
0
q
Reading the Input
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
accept
5
q
a a b
b
b
a,
a b b a
b
a,
Input finished
Rejection (other than abba)
1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b a
b
a,
0
q
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
a b a
b
a,
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
reject
a b a
b
a,
Input finished
Another Rejection on empty string
1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q

1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q
reject

Another Example for accepting
a
b b
a,
b
a,
0
q 1
q 2
q
a b
a
a
b b
a,
b
a,
0
q 1
q 2
q
a b
a
a
b b
a,
b
a,
0
q 1
q 2
q
a b
a
a
b b
a,
b
a,
0
q 1
q 2
q
a b
a
a
b b
a,
b
a,
0
q 1
q 2
q
a b
a
accept
Input finished
Rejection Example
a
b b
a,
b
a,
0
q 1
q 2
q
a
b b
a
b b
a,
b
a,
0
q 1
q 2
q
a
b b
a
b b
a,
b
a,
0
q 1
q 2
q
a
b b
a
b b
a,
b
a,
0
q 1
q 2
q
a
b b
a
b b
a,
b
a,
0
q 1
q 2
q
a
b b
reject
Input finished
Languages Accepted by FAs
FA
Definition:
The language contains
all input strings accepted by
= { strings that bring
to an accepting state}
M
 
M
L
M
M
 
M
L
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
   
abba
M
L  M
accept
Example ( being null string)
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
   
abba
ab
M
L ,
,

 M
accept
accept
accept
Example
a
b b
a,
b
a,
0
q 1
q 2
q
  }
0
:
{ 
 n
b
a
M
L n
accept trap state
Transition Function 
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
Q
Q 


:

b
a,
  1
0, q
a
q 

2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q 1
q
  5
0, q
b
q 

1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
  3
2, q
b
q 

Transition Function
0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
 a b
0
q
1
q
2
q
3
q
4
q
5
q
1
q 5
q
5
q 2
q
5
q 3
q
4
q 5
q
b
a,
5
q
5
q
5
q
5
q
Extended Transition Function *

Q
Q 

 *
:
*

0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
  2
0,
* q
ab
q 

3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q 1
q 2
q
  4
0,
* q
abba
q 

0
q 1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
  5
0,
* q
abbbaa
q 

1
q 2
q 3
q 4
q
a b b a
5
q
a a b
b
b
a,
b
a,
0
q
Deterministic Final Automata
• DFA refers to deterministic finite automata.
– Deterministic refers to the uniqueness of the computation. The finite
automata are called deterministic finite automata if the machine reads
an input string one symbol at a time.
• In DFA, given the current state we know what the next step
will be.
• In DFA, there is only one path for specific input from the
current state to the next state.
• DFA does not accept the null move, i.e., the DFA cannot
change state without any input character.
• DFA accepts zero length string i.e. {}
• DFA can contain multiple final states. It is used in Lexical
Analysis in Compiler.
QUESTIONS
1. Draw a DFA which accept 00 and 11 at the end
of a string containing 0, 1 in it, e.g., 01010100
but not 000111010.
2. Construct a DFA which accepts set of all
strings over Σ={a,b} of length ≤2
3. Create a DFA which accepts strings of even
length.
4. Design a DFA in which start and end symbol
must be different
Given: Input alphabet, Σ={a, b}
QUESTIONS
5. Design a DFA in which every 'a' should be
followed by 'b'
Given: Input alphabet, Σ={a, b}
6. Design a DFA such that:
L = {anbm | n,m ≥ 1} Given: Input alphabet, Σ={a,
b}
Language L = {ab, aab, aaab, abbb, aabb,
aaaabbbb, ...}

More Related Content

Similar to Lecture12_16717_Lecture1.ppt (20)

PDF
5. NFA & DFA.pdf
TANZINTANZINA
 
PPTX
TOC Introduction
Thapar Institute
 
PPT
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
AdharshKumarSingh
 
PDF
Ch2 finite automaton
meresie tesfay
 
PPT
1. finite_automata_new.ppt
SanthoshS508159
 
PDF
Automata_Theory_and_compiler_design_UNIT-1.pptx.pdf
TONY562
 
PPTX
Theory of Automata(Formal Language) Lecture 3.pptx
muhammadanasgc
 
PPT
lecture1aboutdfaandndfaautomataandexampl.ppt
nikhilguptha06
 
PPTX
LectIntroduction to Finite Automata.pptx
kennethnamonye77
 
DOC
Flat notes iii i (1)(7-9-20)
saithirumalg
 
PPT
FiniteAutomata.ppt
RohitPaul71
 
PPT
FiniteAutomata (1).ppt
ssuser47f7f2
 
PPTX
1. Introduction to machine learning and AI
sameerkumar56473
 
PPTX
1. Introduction automata throry and intoduction
sameerkumar56473
 
PPTX
DIU_BD_AvaGandu_SE-234-Lecture-02-DFA.pptx
mafen98815
 
PPT
Finite Automata Theory, Computational Theory Basics
Chithra720576
 
PPT
Basics of Theory of Computation, Finite Automata with Deterministic and Non D...
Chithra720576
 
PPT
67a999b1e2665.pptcffttftr5ftffgvvgsfrrrggv
honeyredde0606
 
PPTX
Formal language and automata theoryLAT Class notes.pptx
SrinivasRedyySarviga
 
5. NFA & DFA.pdf
TANZINTANZINA
 
TOC Introduction
Thapar Institute
 
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
AdharshKumarSingh
 
Ch2 finite automaton
meresie tesfay
 
1. finite_automata_new.ppt
SanthoshS508159
 
Automata_Theory_and_compiler_design_UNIT-1.pptx.pdf
TONY562
 
Theory of Automata(Formal Language) Lecture 3.pptx
muhammadanasgc
 
lecture1aboutdfaandndfaautomataandexampl.ppt
nikhilguptha06
 
LectIntroduction to Finite Automata.pptx
kennethnamonye77
 
Flat notes iii i (1)(7-9-20)
saithirumalg
 
FiniteAutomata.ppt
RohitPaul71
 
FiniteAutomata (1).ppt
ssuser47f7f2
 
1. Introduction to machine learning and AI
sameerkumar56473
 
1. Introduction automata throry and intoduction
sameerkumar56473
 
DIU_BD_AvaGandu_SE-234-Lecture-02-DFA.pptx
mafen98815
 
Finite Automata Theory, Computational Theory Basics
Chithra720576
 
Basics of Theory of Computation, Finite Automata with Deterministic and Non D...
Chithra720576
 
67a999b1e2665.pptcffttftr5ftffgvvgsfrrrggv
honeyredde0606
 
Formal language and automata theoryLAT Class notes.pptx
SrinivasRedyySarviga
 

More from Venneladonthireddy1 (10)

PPTX
02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY
Venneladonthireddy1
 
PPTX
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
Venneladonthireddy1
 
PPTX
CG Lecture0.pptx
Venneladonthireddy1
 
PPT
Supervised Learning-classification Part-3.ppt
Venneladonthireddy1
 
PPT
unit3.ppt
Venneladonthireddy1
 
PDF
EOD Continued.pdf
Venneladonthireddy1
 
PPT
lecture 1234.ppt
Venneladonthireddy1
 
PPTX
VLAN _SLAN and VSAN.pptx
Venneladonthireddy1
 
PPTX
Tableau Prep.pptx
Venneladonthireddy1
 
PPTX
fashion.pptx
Venneladonthireddy1
 
02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY
Venneladonthireddy1
 
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
Venneladonthireddy1
 
CG Lecture0.pptx
Venneladonthireddy1
 
Supervised Learning-classification Part-3.ppt
Venneladonthireddy1
 
EOD Continued.pdf
Venneladonthireddy1
 
lecture 1234.ppt
Venneladonthireddy1
 
VLAN _SLAN and VSAN.pptx
Venneladonthireddy1
 
Tableau Prep.pptx
Venneladonthireddy1
 
fashion.pptx
Venneladonthireddy1
 
Ad

Recently uploaded (20)

PPT
Testing and final inspection of a solar PV system
MuhammadSanni2
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PPT
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPTX
Knowledge Representation : Semantic Networks
Amity University, Patna
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PDF
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
PPTX
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
Electrical Machines and Their Protection.pdf
Nabajyoti Banik
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
Introduction to Internal Combustion Engines - Types, Working and Camparison.pptx
UtkarshPatil98
 
PPTX
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
Testing and final inspection of a solar PV system
MuhammadSanni2
 
Design Thinking basics for Engineers.pdf
CMR University
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
Knowledge Representation : Semantic Networks
Amity University, Patna
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
Electrical Machines and Their Protection.pdf
Nabajyoti Banik
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Introduction to Internal Combustion Engines - Types, Working and Camparison.pptx
UtkarshPatil98
 
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
Ad

Lecture12_16717_Lecture1.ppt

  • 2. Terminologies • Symbols: – Symbols are an entity or individual objects, which can be any letter, alphabet or any picture. – Example: 1, a, b, # • Alphabets: – Alphabets are a finite set of symbols. It is denoted by ∑. – Examples: ∑ = {a, b} , ∑ = {A, B, C, D} , ∑ = {0, 1, 2}, ∑ = {#, β, Δ} • String: • It is a finite collection of symbols from the alphabet. The string is denoted by w. • Example 1: • If ∑ = {a, b}, various string that can be generated from ∑ are {ab, aa, aaa, bb, bbb, ba, aba.....}. • A string with zero occurrences of symbols is known as an empty string. It is represented by ε. • The number of symbols in a string w is called the length of a string. It is denoted by |w|.
  • 3. Definition An automaton is defined as a system where energy, materials and information are transformed, transmitted and used for performing some functions without direct participation of man.
  • 4. Definition • An automaton is an abstract model of a digital computer. • Every automaton includes some essential features. • It has a mechanism for reading input. – This input mechanism can read the input from left to right – One symbol at a time – Can also detect the end of the input string • An automaton can produce output of some sort. • It may have a temporary storage device. • An automaton has a control unit which can be in any one of finite number of internal states and which can change state in some defined manner.
  • 6. Formal Definition • Finite Automaton (FA)   F q Q M , , , , 0    • Finite Automaton (FA)   F q Q M , , , , 0    Q   0 q F : set of states : input alphabet : transition function : initial state : set of accepting states
  • 10. Topics  Acceptability of a String by a Finite Automaton  Transition Graph and Properties of Transition Functions
  • 12. • The transition function which maps Q x ∑* into Q (i.e. maps a state and a string of input symbols including the empty string into a state) is called the indirect transition function.
  • 14. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a,   b a,   b a, Input alphabet
  • 15. Initial Configuration 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, Input String a b b a b a, 0 q
  • 16. Reading the Input 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b b a b a,
  • 17. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b b a b a,
  • 18. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b b a b a,
  • 19. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b b a b a,
  • 20. 0 q 1 q 2 q 3 q 4 q a b b a accept 5 q a a b b b a, a b b a b a, Input finished
  • 21. Rejection (other than abba) 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b a b a, 0 q
  • 22. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b a b a,
  • 23. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b a b a,
  • 24. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, a b a b a,
  • 25. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, reject a b a b a, Input finished
  • 26. Another Rejection on empty string 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a, 0 q 
  • 27. 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a, 0 q reject 
  • 28. Another Example for accepting a b b a, b a, 0 q 1 q 2 q a b a
  • 32. a b b a, b a, 0 q 1 q 2 q a b a accept Input finished
  • 37. a b b a, b a, 0 q 1 q 2 q a b b reject Input finished
  • 38. Languages Accepted by FAs FA Definition: The language contains all input strings accepted by = { strings that bring to an accepting state} M   M L M M   M L
  • 39. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a,     abba M L  M accept
  • 40. Example ( being null string) 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a,     abba ab M L , ,   M accept accept accept
  • 41. Example a b b a, b a, 0 q 1 q 2 q   } 0 : {   n b a M L n accept trap state
  • 42. Transition Function  0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, Q Q    :  b a,
  • 43.   1 0, q a q   2 q 3 q 4 q a b b a 5 q a a b b b a, b a, 0 q 1 q
  • 44.   5 0, q b q   1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a, 0 q
  • 45. 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a,   3 2, q b q  
  • 46. Transition Function 0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a,  a b 0 q 1 q 2 q 3 q 4 q 5 q 1 q 5 q 5 q 2 q 5 q 3 q 4 q 5 q b a, 5 q 5 q 5 q 5 q
  • 47. Extended Transition Function *  Q Q    * : *  0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a,
  • 48.   2 0, * q ab q   3 q 4 q a b b a 5 q a a b b b a, b a, 0 q 1 q 2 q
  • 49.   4 0, * q abba q   0 q 1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a,
  • 50.   5 0, * q abbbaa q   1 q 2 q 3 q 4 q a b b a 5 q a a b b b a, b a, 0 q
  • 51. Deterministic Final Automata • DFA refers to deterministic finite automata. – Deterministic refers to the uniqueness of the computation. The finite automata are called deterministic finite automata if the machine reads an input string one symbol at a time. • In DFA, given the current state we know what the next step will be. • In DFA, there is only one path for specific input from the current state to the next state. • DFA does not accept the null move, i.e., the DFA cannot change state without any input character. • DFA accepts zero length string i.e. {} • DFA can contain multiple final states. It is used in Lexical Analysis in Compiler.
  • 52. QUESTIONS 1. Draw a DFA which accept 00 and 11 at the end of a string containing 0, 1 in it, e.g., 01010100 but not 000111010. 2. Construct a DFA which accepts set of all strings over Σ={a,b} of length ≤2 3. Create a DFA which accepts strings of even length. 4. Design a DFA in which start and end symbol must be different Given: Input alphabet, Σ={a, b}
  • 53. QUESTIONS 5. Design a DFA in which every 'a' should be followed by 'b' Given: Input alphabet, Σ={a, b} 6. Design a DFA such that: L = {anbm | n,m ≥ 1} Given: Input alphabet, Σ={a, b} Language L = {ab, aab, aaab, abbb, aabb, aaaabbbb, ...}

Editor's Notes