SlideShare a Scribd company logo
1 of 14
INTRODUCTION
TO
FINITE AUTOMATA
M RATNAKAR BABU
Asst.Prof. CSE
KMIT
Alphabet
An alphabet is a finite and non empty set of symbols.
The example of alphabet is,
S={a, b, c,……..z}
The elements a, b, c, …….z are alphabets.
If W={0,1}
Here 0 and 1 are alphabets, denoted by W.
KMIT
String
• It is finite collection of symbols from alphabet.
For example, if  = {a,b} then various strings that can be formed
from  are {ab, ba, aaa, bbbb, aba, bab, ….}. An infinite number
of strings can be generated.
Language
• The language is a collection of appropriate strings.
• The language is defined using an input set. The input set is typically
denoted by letter .
For example:  ={Ꜫ,0,00,000,0000,….}.
Here the language L is defined as ‘Any number of Zeros’.
KMIT
Examples
1.The set of all strings over {a,b,c} that have ac as substring can be
written as {xacy | x,y ∈{a,b,c}∗}.
This can also be written as {x∈{a,b,c}∗ ||x|ac ≥1},
stating that the set of all strings over {a,b,c} in which the number
of occurrences of substring ac is at least 1.
2. The set of all strings over some alphabet Σ with even number of
a’s is {x∈Σ∗ ||x|a = 2n, for some n∈N}.
Equivalently, {x∈Σ∗ ||x|a ≡ 0 mod 2}.
3. The set of all strings over some alphabet Σ with equal number
of a’s and b’s can be written as {x∈Σ∗ ||x|a =|x|b}.
4. The set of all palindromes over an alphabet Σ can be written as
{x∈Σ∗ | x = xR}, where xR is the string obtained by reversing x.
KMIT
Finite State Machine
• The finite state machine represents a mathematical model of a
system with certain input.
• The model finally gives certain output.
• The input is processed by various states, these states are called as
intermediate states.
• The finite state system is very good design tool for the programs such
as TEXT EDITORS and LEXICAL ANALYZERS.
KMIT
Definition of Finite Automata
• A finite automata is a collection of 5-tuple(Q,,,q0,F) Where ,
Q is finite set of states, which is non empty.
 is input alphabet, indicates input set.
 is transition function or mapping function. We can determine
the next state using this function.
q0 is an initial state and is in Q
F is set of final states.
KMIT
Finite Automata Model
• The finite automata can be represented as follows:
A B A B A B A B A B
Finite
Control
Input Tape
Tape
Reader Input Tape: It is a linear tape
having some number of cells. Each
input symbol is placed in each cell.
Finite Control: The finite control
decides the next state on receiving
particular input from input tape.
KMIT
Out put
Types of Automata
Finite Automata
Deterministic
Finite Automata
Non Deterministic
Finite Automata
KMIT
Types of Automata
• Deterministic Finite Automata: The Finite Automata is called
Deterministic Finite Automata if there is only one path for a specific
input from current state to next state.
It can be represented as follows:
• A machine M = (Q,,,q0,F) Where ,
Q is finite set of states, which is non empty.
 is input alphabet, indicates input set.
 is transition function or mapping function. We can determine
the next state using this function.
q0 is an initial state and is in Q
F is set of final states.
Where :Q X  -> Q KMIT
Types of Automata
• Non Deterministic Finite Automata: The Finite Automata is called
Non Deterministic Finite Automata if there are more than one path
for a specific input from current state to next state.
It can be represented as follows:
• A machine M = (Q,,,q0,F) Where ,
Q is finite set of states, which is non empty.
 is input alphabet, indicates input set.
 is transition function or mapping function. We can determine
the next state using this function.
q0 is an initial state and is in Q
F is set of final states.
Where :Q X  -> 2Q KMIT
Difference between DFA & NFA
Deterministic Finite Automata Non Deterministic Finite Automata
For Every symbol of the alphabet, there is only one
state transition in DFA.
We do not need to specify how does the NFA react
according to some symbol.
DFA cannot use Empty String transition. NFA can use Empty String transition.
DFA can be understood as one machine. NFA can be understood as multiple little machines
computing at the same time.
DFA will reject the string if it end at other than
accepting state.
If all of the branches of NFA dies or rejects the string,
we can say that NFA reject the string.
Backtracking is allowed in DFA. Backtracking is not always allowed in NFA.
DFA is more difficult to construct. NFA is easier to construct.
KMIT
Summary
• From this session we have seen what is Finite Automata
• Types of Automata.
KMIT
Next Class
• In the next session we are going to learn about
Deterministic Finite Automata
KMIT
END For NOW
Continue in next class
KMIT

More Related Content

What's hot

CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR Zahid Parvez
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of ComputationShiraz316
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Akila Krishnamoorthy
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata TheorySaifur Rahman
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 

What's hot (20)

Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata Theory
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 

Similar to Introduction TO Finite Automata

@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdfFariyaTasneem1
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfAmayJaiswal4
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationnarayan dudhe
 
Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Nadeem Qasmi
 
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
 
closure properties of regular language.pptx
closure properties of regular language.pptxclosure properties of regular language.pptx
closure properties of regular language.pptxThirumoorthy64
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite AutomatAdel Al-Ofairi
 
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
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introductionNAMRATA BORKAR
 

Similar to Introduction TO Finite Automata (20)

5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdf
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
flat unit1
flat unit1flat unit1
flat unit1
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 
Finite automata
Finite automataFinite automata
Finite 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
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computation
 
CS 5th.pptx
CS 5th.pptxCS 5th.pptx
CS 5th.pptx
 
Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine
 
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
 
closure properties of regular language.pptx
closure properties of regular language.pptxclosure properties of regular language.pptx
closure properties of regular language.pptx
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
Final fa part1
Final fa part1Final fa part1
Final fa part1
 
Finite automata
Finite automataFinite automata
Finite automata
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 

More from Ratnakar Mikkili

AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptxRatnakar Mikkili
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptxRatnakar Mikkili
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxRatnakar Mikkili
 
Artificial Intelligence_Environment.pptx
Artificial Intelligence_Environment.pptxArtificial Intelligence_Environment.pptx
Artificial Intelligence_Environment.pptxRatnakar Mikkili
 
2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt2_2Specification of Tokens.ppt
2_2Specification of Tokens.pptRatnakar Mikkili
 

More from Ratnakar Mikkili (7)

AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptx
 
Artificial Intelligence_Environment.pptx
Artificial Intelligence_Environment.pptxArtificial Intelligence_Environment.pptx
Artificial Intelligence_Environment.pptx
 
2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt
 
2_4 Finite Automata.ppt
2_4 Finite Automata.ppt2_4 Finite Automata.ppt
2_4 Finite Automata.ppt
 
Push down automata
Push down automataPush down automata
Push down automata
 

Recently uploaded

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 

Introduction TO Finite Automata

  • 2. Alphabet An alphabet is a finite and non empty set of symbols. The example of alphabet is, S={a, b, c,……..z} The elements a, b, c, …….z are alphabets. If W={0,1} Here 0 and 1 are alphabets, denoted by W. KMIT
  • 3. String • It is finite collection of symbols from alphabet. For example, if  = {a,b} then various strings that can be formed from  are {ab, ba, aaa, bbbb, aba, bab, ….}. An infinite number of strings can be generated. Language • The language is a collection of appropriate strings. • The language is defined using an input set. The input set is typically denoted by letter . For example:  ={Ꜫ,0,00,000,0000,….}. Here the language L is defined as ‘Any number of Zeros’. KMIT
  • 4. Examples 1.The set of all strings over {a,b,c} that have ac as substring can be written as {xacy | x,y ∈{a,b,c}∗}. This can also be written as {x∈{a,b,c}∗ ||x|ac ≥1}, stating that the set of all strings over {a,b,c} in which the number of occurrences of substring ac is at least 1. 2. The set of all strings over some alphabet Σ with even number of a’s is {x∈Σ∗ ||x|a = 2n, for some n∈N}. Equivalently, {x∈Σ∗ ||x|a ≡ 0 mod 2}. 3. The set of all strings over some alphabet Σ with equal number of a’s and b’s can be written as {x∈Σ∗ ||x|a =|x|b}. 4. The set of all palindromes over an alphabet Σ can be written as {x∈Σ∗ | x = xR}, where xR is the string obtained by reversing x. KMIT
  • 5. Finite State Machine • The finite state machine represents a mathematical model of a system with certain input. • The model finally gives certain output. • The input is processed by various states, these states are called as intermediate states. • The finite state system is very good design tool for the programs such as TEXT EDITORS and LEXICAL ANALYZERS. KMIT
  • 6. Definition of Finite Automata • A finite automata is a collection of 5-tuple(Q,,,q0,F) Where , Q is finite set of states, which is non empty.  is input alphabet, indicates input set.  is transition function or mapping function. We can determine the next state using this function. q0 is an initial state and is in Q F is set of final states. KMIT
  • 7. Finite Automata Model • The finite automata can be represented as follows: A B A B A B A B A B Finite Control Input Tape Tape Reader Input Tape: It is a linear tape having some number of cells. Each input symbol is placed in each cell. Finite Control: The finite control decides the next state on receiving particular input from input tape. KMIT Out put
  • 8. Types of Automata Finite Automata Deterministic Finite Automata Non Deterministic Finite Automata KMIT
  • 9. Types of Automata • Deterministic Finite Automata: The Finite Automata is called Deterministic Finite Automata if there is only one path for a specific input from current state to next state. It can be represented as follows: • A machine M = (Q,,,q0,F) Where , Q is finite set of states, which is non empty.  is input alphabet, indicates input set.  is transition function or mapping function. We can determine the next state using this function. q0 is an initial state and is in Q F is set of final states. Where :Q X  -> Q KMIT
  • 10. Types of Automata • Non Deterministic Finite Automata: The Finite Automata is called Non Deterministic Finite Automata if there are more than one path for a specific input from current state to next state. It can be represented as follows: • A machine M = (Q,,,q0,F) Where , Q is finite set of states, which is non empty.  is input alphabet, indicates input set.  is transition function or mapping function. We can determine the next state using this function. q0 is an initial state and is in Q F is set of final states. Where :Q X  -> 2Q KMIT
  • 11. Difference between DFA & NFA Deterministic Finite Automata Non Deterministic Finite Automata For Every symbol of the alphabet, there is only one state transition in DFA. We do not need to specify how does the NFA react according to some symbol. DFA cannot use Empty String transition. NFA can use Empty String transition. DFA can be understood as one machine. NFA can be understood as multiple little machines computing at the same time. DFA will reject the string if it end at other than accepting state. If all of the branches of NFA dies or rejects the string, we can say that NFA reject the string. Backtracking is allowed in DFA. Backtracking is not always allowed in NFA. DFA is more difficult to construct. NFA is easier to construct. KMIT
  • 12. Summary • From this session we have seen what is Finite Automata • Types of Automata. KMIT
  • 13. Next Class • In the next session we are going to learn about Deterministic Finite Automata KMIT
  • 14. END For NOW Continue in next class KMIT