SlideShare a Scribd company logo
1 of 13
Finite Automata:
Two categories of FiniteAutomata:
Deterministic Finite Automata(DFA)
The machinecanexist in onlyone state at any
given time
Non-deterministic Finite Automata (NFA)
The machinecanexist in multiple states at the
same time
1
Deterministic Finite
Automata (DFA):
A Deterministic Finite Automaton (DFA) is a finite
state machine that accepts/rejects finite strings
(sequence of symbols or alphabets) and perform
unique computation for eachinput string.
Deterministic refers to the uniqueness of the
computation.
2
Deterministic Finite
Automata (DFA):
ADFAis defined by the 5-tuples:
{Q, ∑ , q0,F, δ }
It consists of:
Q ==> afinite set ofstates
∑ ==> afinite set ofinput symbols(alphabets)
q0==> astart state (q0Q)
F==> set offinalstates (subset of Q)
δ ==> atransition function, from Q x ∑ ==> Q
3
DFA Computation [1/3]:
Let us consider an example, where a string is given
and have to calculate that the string is present in
the language or not?
Given, LisaFinite language;
∑ = { a,b}
L1= Setofallstrings starts with “a”
={ a, aa, ab, aaa,….}
String, S= aab
The DFAfor this calculationisgivenin next slide:
4
DFA Computation [2/3]:
A B
a
b
a,b
C
a,b
5
DFA Computation [3/3]:
Steps:
Start from the “start state/ initial state”
Foreveryinput symbolin the string we do the
following:
Compute the next state from the current state, giventhe
current input symbolfrom the string andthe transition
function
After allsymbolsin that stringsare calculated, ifthe
current state isone ofthe finalstates (F) then we cansay
the string will be acceptedbythat DFA;
Otherwise, the string will berejected.
6
DFA Computation:
Let us consider another example, where a string is
given and have to calculate that the string is present
in the language or not?
Given, Lisainfinite language;
∑ = { a,b}
L1= Setofallstrings starts with “a”
={ a, aa, ab, aaa,….}
String, S= bba
Here, S= bbaisnot present in the languageandit isinvalid
operation for computation.
7
Construct a DFA:
BuildaDFAfor the followinglanguage:
L= {w | w is a binary string that contains 01 as a
substring}
Steps for buildinga DFA:
∑ = {0,1}
Decide on the states: Q
Designate start state andfinal state(s)
δ: Decideon the transitions
Finalstates == acceptingstates
Other states == non-acceptingstates
8
DFA for strings containing
{01}
q0
start
q1
0
1 0,1
0
1
q2
Final
state
• Q = {q0,q1,q2}
• ∑ = {0,1}
• start state = q0
2
• F = {q }
Transition Table
0 1
q0 q1 q0
q1 q1 q2
*q2 q2 q2
states
symbols
State Diagram
Construct a DFA:
BuildaDFAfor the followinglanguage:
W {a,b}; |W | ≥ 2
Solution:
∑ = {a,b}
L= {aa, ab, ba, bb, aaa…,bbb….}
State Diagram:
A B
10
C
a, b
a , b
a, b
Example of DFA:
11
Example of DFA:
12
EndofSlides
13

More Related Content

Similar to finiteautomata-160104102657.pptx

@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
FariyaTasneem1
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptx
AsadBaig49
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
Adel Al-Ofairi
 
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
Srimatre K
 

Similar to finiteautomata-160104102657.pptx (20)

@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
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Theory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and ProblemsTheory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and Problems
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
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
 
Theory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite AcceptorsTheory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite Acceptors
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptx
 
flat unit1
flat unit1flat unit1
flat unit1
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
Formalization Machines and Sastes
Formalization Machines and SastesFormalization Machines and Sastes
Formalization Machines and Sastes
 
5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
 
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
 
minimization the number of states of DFA
minimization the number of states of DFAminimization the number of states of DFA
minimization the number of states of DFA
 
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
 
CS 5th.pptx
CS 5th.pptxCS 5th.pptx
CS 5th.pptx
 
Finite automata
Finite automataFinite automata
Finite automata
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
MidtermI-review.pptx
MidtermI-review.pptxMidtermI-review.pptx
MidtermI-review.pptx
 

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Recently uploaded (20)

Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 

finiteautomata-160104102657.pptx

  • 1. Finite Automata: Two categories of FiniteAutomata: Deterministic Finite Automata(DFA) The machinecanexist in onlyone state at any given time Non-deterministic Finite Automata (NFA) The machinecanexist in multiple states at the same time 1
  • 2. Deterministic Finite Automata (DFA): A Deterministic Finite Automaton (DFA) is a finite state machine that accepts/rejects finite strings (sequence of symbols or alphabets) and perform unique computation for eachinput string. Deterministic refers to the uniqueness of the computation. 2
  • 3. Deterministic Finite Automata (DFA): ADFAis defined by the 5-tuples: {Q, ∑ , q0,F, δ } It consists of: Q ==> afinite set ofstates ∑ ==> afinite set ofinput symbols(alphabets) q0==> astart state (q0Q) F==> set offinalstates (subset of Q) δ ==> atransition function, from Q x ∑ ==> Q 3
  • 4. DFA Computation [1/3]: Let us consider an example, where a string is given and have to calculate that the string is present in the language or not? Given, LisaFinite language; ∑ = { a,b} L1= Setofallstrings starts with “a” ={ a, aa, ab, aaa,….} String, S= aab The DFAfor this calculationisgivenin next slide: 4
  • 5. DFA Computation [2/3]: A B a b a,b C a,b 5
  • 6. DFA Computation [3/3]: Steps: Start from the “start state/ initial state” Foreveryinput symbolin the string we do the following: Compute the next state from the current state, giventhe current input symbolfrom the string andthe transition function After allsymbolsin that stringsare calculated, ifthe current state isone ofthe finalstates (F) then we cansay the string will be acceptedbythat DFA; Otherwise, the string will berejected. 6
  • 7. DFA Computation: Let us consider another example, where a string is given and have to calculate that the string is present in the language or not? Given, Lisainfinite language; ∑ = { a,b} L1= Setofallstrings starts with “a” ={ a, aa, ab, aaa,….} String, S= bba Here, S= bbaisnot present in the languageandit isinvalid operation for computation. 7
  • 8. Construct a DFA: BuildaDFAfor the followinglanguage: L= {w | w is a binary string that contains 01 as a substring} Steps for buildinga DFA: ∑ = {0,1} Decide on the states: Q Designate start state andfinal state(s) δ: Decideon the transitions Finalstates == acceptingstates Other states == non-acceptingstates 8
  • 9. DFA for strings containing {01} q0 start q1 0 1 0,1 0 1 q2 Final state • Q = {q0,q1,q2} • ∑ = {0,1} • start state = q0 2 • F = {q } Transition Table 0 1 q0 q1 q0 q1 q1 q2 *q2 q2 q2 states symbols State Diagram
  • 10. Construct a DFA: BuildaDFAfor the followinglanguage: W {a,b}; |W | ≥ 2 Solution: ∑ = {a,b} L= {aa, ab, ba, bb, aaa…,bbb….} State Diagram: A B 10 C a, b a , b a, b