SlideShare ist ein Scribd-Unternehmen logo
1 von 53
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
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, ...}

Weitere ähnliche Inhalte

Ähnlich wie Lecture12_16717_Lecture1.ppt

introduction-190804060837.pptx
introduction-190804060837.pptxintroduction-190804060837.pptx
introduction-190804060837.pptxshumPanwar
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite AutomataRatnakar Mikkili
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Srimatre K
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationnarayan dudhe
 
Phttp://www.cw360ms.com/pmsurveyresults/index.aspda
Phttp://www.cw360ms.com/pmsurveyresults/index.aspdaPhttp://www.cw360ms.com/pmsurveyresults/index.aspda
Phttp://www.cw360ms.com/pmsurveyresults/index.aspdaHafeez Rehman
 
NFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition DiagramNFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition DiagramAbdullah Jan
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfadeepinderbedi
 
Theory of automata
Theory of automataTheory of automata
Theory of automataArslan905905
 
PUSH DOWN AUTOMATA VS TURING MACHINE
PUSH DOWN AUTOMATA VS TURING MACHINEPUSH DOWN AUTOMATA VS TURING MACHINE
PUSH DOWN AUTOMATA VS TURING MACHINEAbhishek Shivhare
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata parmeet834
 

Ähnlich wie Lecture12_16717_Lecture1.ppt (20)

Pda
PdaPda
Pda
 
introduction-190804060837.pptx
introduction-190804060837.pptxintroduction-190804060837.pptx
introduction-190804060837.pptx
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 
Lecture03 (1).ppt
Lecture03 (1).pptLecture03 (1).ppt
Lecture03 (1).ppt
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
PDA (pushdown automaton)
PDA (pushdown automaton)PDA (pushdown automaton)
PDA (pushdown automaton)
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computation
 
Automata
AutomataAutomata
Automata
 
Phttp://www.cw360ms.com/pmsurveyresults/index.aspda
Phttp://www.cw360ms.com/pmsurveyresults/index.aspdaPhttp://www.cw360ms.com/pmsurveyresults/index.aspda
Phttp://www.cw360ms.com/pmsurveyresults/index.aspda
 
NFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition DiagramNFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition Diagram
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
Finite automata
Finite automataFinite automata
Finite automata
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
DFA Minimization
DFA MinimizationDFA Minimization
DFA Minimization
 
PUSH DOWN AUTOMATA VS TURING MACHINE
PUSH DOWN AUTOMATA VS TURING MACHINEPUSH DOWN AUTOMATA VS TURING MACHINE
PUSH DOWN AUTOMATA VS TURING MACHINE
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 

Mehr von Venneladonthireddy1

Mehr von Venneladonthireddy1 (10)

02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY
02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY
02 Hadoop.pptx HADOOP VENNELA DONTHIREDDY
 
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDYCG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
 
CG Lecture0.pptx
CG Lecture0.pptxCG Lecture0.pptx
CG Lecture0.pptx
 
Supervised Learning-classification Part-3.ppt
Supervised Learning-classification Part-3.pptSupervised Learning-classification Part-3.ppt
Supervised Learning-classification Part-3.ppt
 
unit3.ppt
unit3.pptunit3.ppt
unit3.ppt
 
EOD Continued.pdf
EOD Continued.pdfEOD Continued.pdf
EOD Continued.pdf
 
lecture 1234.ppt
lecture 1234.pptlecture 1234.ppt
lecture 1234.ppt
 
VLAN _SLAN and VSAN.pptx
VLAN _SLAN and VSAN.pptxVLAN _SLAN and VSAN.pptx
VLAN _SLAN and VSAN.pptx
 
Tableau Prep.pptx
Tableau Prep.pptxTableau Prep.pptx
Tableau Prep.pptx
 
fashion.pptx
fashion.pptxfashion.pptx
fashion.pptx
 

Kürzlich hochgeladen

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
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
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
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 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
 

Kürzlich hochgeladen (20)

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
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...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
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 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
 

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
  • 8.
  • 9.
  • 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, ...}

Hinweis der Redaktion

  1. Input alphabet