SlideShare a Scribd company logo
1 of 10
Theory of Computing
Finite Automata
Abu-Bakar Muhammad Abdullah
Lecturer, CSE
1
Introduction
• What is Finite Automata?
▫ It is the simplest machine to recognize patterns.
• A Finite Automata consists of the following :
Q : Finite set of states.
∑ : set of Input Symbols.
q : Initial state.
F : set of Final States.
δ : Transition Function.
2
Example
• Let us consider the controller of an automatic door.
• The controller is in either of two states: OPEN or CLOSED
CLOSED OPEN
FRONT
NEITHER
FRONT
REAR
BOTH
REAR
NEITHER
BOTH
FRONT – a person is standing in front
of the doorway.
REAR – a person is standing to the rear
of the doorway.
BOTH – people are standing on both
sides.
NEITHER – none is standing on either
side.
3
Example
States NEITHER FRONT REAR BOTH
CLOSED CLOSED OPEN CLOSED CLOSED
OPEN CLOSED OPEN OPEN OPEN
Input Signals
4
Notation of Formal Definition
• We can describe the finite automaton as M = (Q, ∑, δ, q1, F)
where,
Q = {q1, q2, q3},
∑ = {0, 1},
δ is described as
q1 is the start state, and
F = {q2}.
0 1
q1 q1 q2
q2 q3 q2
q3 q2 q2
5
Formal Definition
• In the example, let A be the language of Machine M.
• A = {w|w contains at least one 1 and
an even number of 0’s follow the last 1}
• So L(M) = A or equivalently M recognizes A.
6
Drawing State Diagrams
• A finite automaton is described as
M = ({q1, q2}, {0, 1}, δ, q1, {q2}).
The transition function δ is
7
0 1
q1 q1 q2
q2 q1 q2
Designing Finite Automata
• Design a finite automaton which has input symbols {0,
1} and accepts the language L = {w|w is the empty string
ϵ or ends with a 0}
8
As this machine accepts the language L, it is called regular
language.
Designing Finite Automata
• Suppose a machine has ∑ = {a, b} and accepts all the
strings that start and end with a or that start and end
with b.
9
sa b
q1 r1
a b
q2
b r2 a
b baa
Book Reference
• Introduction to the Theory of Computation
▫ Michael Sipser
10

More Related Content

What's hot

Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
Problems of function based syntax
Problems of function based syntaxProblems of function based syntax
Problems of function based syntax
Diego Krivochen
 

What's hot (20)

Dfa h11
Dfa h11Dfa h11
Dfa h11
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
 
Thoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's ClassificationThoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's Classification
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
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
 
Problems of function based syntax
Problems of function based syntaxProblems of function based syntax
Problems of function based syntax
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
 
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)
 
Automaton
AutomatonAutomaton
Automaton
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
 
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYFINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
 
Nfa egs
Nfa egsNfa egs
Nfa egs
 
Automata
AutomataAutomata
Automata
 
Finite automata
Finite automataFinite automata
Finite automata
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
NFA DFA Equivalence theorem
NFA DFA Equivalence theorem NFA DFA Equivalence theorem
NFA DFA Equivalence theorem
 

Similar to 01. Theory of Computing

@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 examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
prasadmvreddy
 

Similar to 01. Theory of Computing (20)

Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
 
Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed
Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd edLecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed
Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed
 
@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
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
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
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Graph representation of DFA’s Da
Graph representation of DFA’s DaGraph representation of DFA’s Da
Graph representation of DFA’s Da
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3
 
Automata
AutomataAutomata
Automata
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
 

Recently uploaded

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
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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...
 
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
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

01. Theory of Computing

  • 1. Theory of Computing Finite Automata Abu-Bakar Muhammad Abdullah Lecturer, CSE 1
  • 2. Introduction • What is Finite Automata? ▫ It is the simplest machine to recognize patterns. • A Finite Automata consists of the following : Q : Finite set of states. ∑ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function. 2
  • 3. Example • Let us consider the controller of an automatic door. • The controller is in either of two states: OPEN or CLOSED CLOSED OPEN FRONT NEITHER FRONT REAR BOTH REAR NEITHER BOTH FRONT – a person is standing in front of the doorway. REAR – a person is standing to the rear of the doorway. BOTH – people are standing on both sides. NEITHER – none is standing on either side. 3
  • 4. Example States NEITHER FRONT REAR BOTH CLOSED CLOSED OPEN CLOSED CLOSED OPEN CLOSED OPEN OPEN OPEN Input Signals 4
  • 5. Notation of Formal Definition • We can describe the finite automaton as M = (Q, ∑, δ, q1, F) where, Q = {q1, q2, q3}, ∑ = {0, 1}, δ is described as q1 is the start state, and F = {q2}. 0 1 q1 q1 q2 q2 q3 q2 q3 q2 q2 5
  • 6. Formal Definition • In the example, let A be the language of Machine M. • A = {w|w contains at least one 1 and an even number of 0’s follow the last 1} • So L(M) = A or equivalently M recognizes A. 6
  • 7. Drawing State Diagrams • A finite automaton is described as M = ({q1, q2}, {0, 1}, δ, q1, {q2}). The transition function δ is 7 0 1 q1 q1 q2 q2 q1 q2
  • 8. Designing Finite Automata • Design a finite automaton which has input symbols {0, 1} and accepts the language L = {w|w is the empty string ϵ or ends with a 0} 8 As this machine accepts the language L, it is called regular language.
  • 9. Designing Finite Automata • Suppose a machine has ∑ = {a, b} and accepts all the strings that start and end with a or that start and end with b. 9 sa b q1 r1 a b q2 b r2 a b baa
  • 10. Book Reference • Introduction to the Theory of Computation ▫ Michael Sipser 10