SlideShare a Scribd company logo
Finite State Machine Without
Output
Name:
Tayyab Aman
Roll No.:
19014156-018
Instructor:
Mr.Shahbaz Ayyaz
History & Introduction
 The two neurophysiologists Warren McCulloch and Walter Pitts were the first to
present a description of finite automata in 1943.
 Their research paper, entitled, “A Logical Calculus Immanent in Nervous Activity”,
made significant contributions to the study of theory of automata, the theory of
computation and cybernetics.
 An automaton in which the state set {Q} contains only a finite number of elements
is called a finite-state machine (FSM), it is famous name is Finite Automata (FA).
 FSMs are conceived as an abstract machine that can be in one of a finite number of
states.
FSMsInput
Language
Output
Types Of FSMs
DF
M
NFM Moore
Without
Output
With Output
Mealy
*Note:: DFM & Non-DFM Give answer in Yes/No.
Deterministic Finite-State Machine
 A finite-state machine M is defined by Five-tuple are as follows;
M = (Q, Σ, δ,q0,F)
 Q: It represents the non-empty set of finite states.
 Σ: It presents the non-empty finite set of the input alphabet.
 δ : It represents the state transition function.
Q × Σ → Q is the next-state function
 q0: It is the initial state.
 F: It is the set of final states (F ⊆ Q).
 Initial State
 Final State
1
𝑞0 𝑞1
0
0,1
Deterministic Finite Automata
 There is a unique or single move from one state to another with same input
Symbol.
 DFM is a simplest model of computation.
 Example:
1 0
1
0
01
0
1
Q={ , , , }
Σ={0,1}
Initial State
δ = Transition Table (State , Input)
0 1
Example
 Acceptance of a string by DFA: A String w is accepted by DFA If
δ(𝒒 𝟎 , w) = q for some q є F.
L =set of all strings starts with a.
L={a,ab,aab,abb,aa,aba,……..}
Let String =abb
Because we start with initial state & end in final state ,so string is present.
𝑞0 𝑞1
𝑞2
a
b
a,b
a,b
Scanning the string
(𝑞0,a) Then (𝑞1, 𝑏) Then (𝑞1, 𝑏) Then 𝒒
Example
 Construct a DFA to accept the string 0,1 which contain Even number of 1’s-
 Solution
L={0,11,011,110,1111,………}
 1)
 2)
 3)
 4)
 5)
𝑞0
𝑞0 𝑞1
1
𝑞0 𝑞1
1
𝑞0 𝑞1
1
1
𝑞0
0
𝑞0 𝑞1
1
0
0
1
0
Transition Table
0 1
𝒒 𝟎
𝑞0 𝑞1
𝒒 𝟏
𝑞1 𝑞0
𝑞0
Example
 Design a DFA which accept set of all strings over {a,b} which starts with ab-
 Solution
 In order to check starting string we add an extra state which is called Dead state.
 Total No. of states=Length of a smallest string+1+1= 42
𝑞0
𝑞3
𝑞1 𝑞2
a b
b
a,b
a
a,b
Dead
State
a b
𝒒 𝟎
𝑞1 𝑞3
𝒒 𝟏 𝑞3 𝑞2
𝒒 𝟐 𝑞2 𝑞2
𝒒 𝟑 𝑞3 𝑞3
Q={𝑞0, 𝑞1, 𝑞2, 𝑞3}
Σ={a,b}
Example
 Construct a DFA which accept set of all strings over {0,1} which interpreted as
binary number divisible by 2-
 Solution:
 When we divide any number by 2 we get 2 remainders (0,1)
 𝒒 𝟎= State with 0 remainder
 𝒒 𝟏= State with 1 remainder
𝑞0 𝑞1
1
0
1
0 0 1
𝒒 𝟎
𝑞0 𝑞1
𝒒 𝟏
𝑞0 𝑞1
Examples:(011)2 = 3
Nondeterministic Finite Automata(NFA)
 In NFA Or NDFA ,we may lead to more than one states for a given inputs.
 An NFA for a language can be smaller & easier to construct than a DFA .
 We need to convert NFA to DFA for designing a compiler.
 Every DFA is NFA , but every NFA is not DFA.
 It is also a 5-tuple Machine. M = (Q, Σ, δ,q0,F)
 But in NDFM , δ :Q x Σ  P(Q) is a function called as transition function.
𝒒 𝟎 𝒒 𝟏
є
𝒒 𝟎
𝒒 𝟐
𝒒 𝟏
a
a
Example
 Design a NFA over an alphabet {0,1} such that every string accept must start
with 0-
 Solution:
NFA DFA
𝑞0 𝑞1
0
0,1
𝑞0
𝑞2
𝑞1
0
0,10,1
0 1
𝒒 𝟎
𝑞1 ∅
𝒒 𝟏
𝑞1 𝑞1
0 1
𝒒 𝟎 𝑞1 𝑞2
𝒒 𝟏 𝑞1 𝑞1
𝒒 𝟐
𝑞2 𝑞2
Conversion NDFA To DFA
Step 1: Initially Q' = ϕ
Step 2: Add q0 of NFA to Q'. Then find the transitions from this
start state.
Step 3: In Q', find the possible set of states for each input symbol.
If this set of states is not in Q', then add it to Q'.
Step 4: In DFA, the final state will be all the states which contain
F(final states of NFA)
Example
convert NDFA To DFA
State 0 1
→q0 {q0, q1} {q1}
q1 ϕ {q0, q1}
Now we will obtain δ' transition for state q0.
δ'([q0], 0) = {q0, q1}
= [q0, q1] (new state generated)
δ'([q0], 1) = {q1} = [q1]
The δ' transition for state q1 is obtained as:
δ'([q1], 0) = ϕ
δ'([q1], 1) = [q0, q1]
Now we will obtain δ' transition on [q0, q1].
δ'([q0, q1], 0) = δ(q0, 0) ∪ δ(q1, 0)
= {q0, q1} ∪ ϕ
= {q0, q1}
= [q0, q1]
Similarly,
δ'([q0, q1], 1) = δ(q0, 1) ∪ δ(q1, 1)
= {q1} ∪ {q0, q1}
= {q0, q1}
= [q0, q1]
As in the given NFA, q1 is a final state, then in DFA
wherever, q1 exists that state becomes a final state.
Hence in the DFA, final states are [q1] and [q0, q1].
Therefore set of final states F
= {[q1], [q0, q1]}.
Cont.….
State 0 1
→[q0] [q0, q1] [q1]
*[q1] ϕ [q0, q1]
*[q0, q1] [q0, q1] [q0, q1]
Suppose
1.A = [q0]
2.B = [q1]
3.C = [q0, q1]
With these new names the DFA will be as follows:
0,
Applications
 FSMs are used in games; they are most recognized for being utilized in artificial
intelligence, and however, they are also frequent in executions of navigating
parsing text, input handling of the customer, as well as network protocols.
 The finite state machines are applicable in vending machines, video games, traffic
lights, controllers in CPU, text parsing, analysis of protocol, recognition of speech,
language processing, etc.
 These are restricted in computational power; they have the good quality of being
comparatively simple to recognize. So, they are frequently used by software
developers as well as system designers for summarizing the performance of a
difficult system.
References
 https://www.elprocus.com/finite-state-machine.
 https://www.javatpoint.com/automata-conversion-from-nfa-to-dfa
 https://www.youtube.com/c/ashakhilrani
 https://www.youtube.com/watch?v=Qa6csfkK7_I
Finite state machine without output

More Related Content

What's hot

Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
Lecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language TechnologyLecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language Technology
Marina Santini
 
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)
Mohammad Ilyas Malik
 
Language Model (N-Gram).pptx
Language Model (N-Gram).pptxLanguage Model (N-Gram).pptx
Language Model (N-Gram).pptx
HeneWijaya
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
InteX Research Lab
 
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
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
Megha Sharma
 
Frames
FramesFrames
Frames
amitp26
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
chidabdu
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 
Word embedding
Word embedding Word embedding
Word embedding
ShivaniChoudhary74
 
Mycin
MycinMycin
Mycin
vini89
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
Kirti Verma
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdf
Deptii Chaudhari
 
Lecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdfLecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdf
Deptii Chaudhari
 
Introduction To Mycin Expert System
Introduction To Mycin Expert SystemIntroduction To Mycin Expert System
Introduction To Mycin Expert System
Nipun Jaswal
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge Representation
Harmony Kwawu
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
Mohammad Imam Hossain
 
Planning in Artificial Intelligence
Planning in Artificial IntelligencePlanning in Artificial Intelligence
Planning in Artificial Intelligence
kitsenthilkumarcse
 
Tutorial on Coreference Resolution
Tutorial on Coreference Resolution Tutorial on Coreference Resolution
Tutorial on Coreference Resolution
Anirudh Jayakumar
 

What's hot (20)

Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Lecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language TechnologyLecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language Technology
 
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)
 
Language Model (N-Gram).pptx
Language Model (N-Gram).pptxLanguage Model (N-Gram).pptx
Language Model (N-Gram).pptx
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
Frames
FramesFrames
Frames
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Word embedding
Word embedding Word embedding
Word embedding
 
Mycin
MycinMycin
Mycin
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdf
 
Lecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdfLecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdf
 
Introduction To Mycin Expert System
Introduction To Mycin Expert SystemIntroduction To Mycin Expert System
Introduction To Mycin Expert System
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge Representation
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
 
Planning in Artificial Intelligence
Planning in Artificial IntelligencePlanning in Artificial Intelligence
Planning in Artificial Intelligence
 
Tutorial on Coreference Resolution
Tutorial on Coreference Resolution Tutorial on Coreference Resolution
Tutorial on Coreference Resolution
 

Similar to Finite state machine without output

Dfa
DfaDfa
Finite Automata
Finite AutomataFinite Automata
Finite Automata
parmeet834
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
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
 
Finite automata
Finite automataFinite automata
Finite automata
Sutee Sudprasert
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
parmeet834
 
Materi 3 Finite State Automata
Materi 3   Finite State AutomataMateri 3   Finite State Automata
Materi 3 Finite State Automata
ahmad haidaroh
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
ranjan317165
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
amara jyothi
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
Muhammad Love Kian
 
Automata
AutomataAutomata
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
RohitPaul71
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
ssuser47f7f2
 
NFAvsDFA.ppt
NFAvsDFA.pptNFAvsDFA.ppt
NFAvsDFA.ppt
ARITRACSE0078
 
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
Rushabh2428
 
Fsa
FsaFsa
Graph representation of DFA’s Da
Graph representation of DFA’s DaGraph representation of DFA’s Da
Graph representation of DFA’s Da
parmeet834
 
PDA (1) (1).pptx
PDA (1) (1).pptxPDA (1) (1).pptx
PDA (1) (1).pptx
nandan543979
 
Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1
Abhimanyu Mishra
 
0227 regularlanguages
 0227 regularlanguages 0227 regularlanguages
0227 regularlanguages
issbp
 

Similar to Finite state machine without output (20)

Dfa
DfaDfa
Dfa
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
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
 
Finite automata
Finite automataFinite automata
Finite automata
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 
Materi 3 Finite State Automata
Materi 3   Finite State AutomataMateri 3   Finite State Automata
Materi 3 Finite State Automata
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
 
Automata
AutomataAutomata
Automata
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
 
NFAvsDFA.ppt
NFAvsDFA.pptNFAvsDFA.ppt
NFAvsDFA.ppt
 
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
 
Fsa
FsaFsa
Fsa
 
Graph representation of DFA’s Da
Graph representation of DFA’s DaGraph representation of DFA’s Da
Graph representation of DFA’s Da
 
PDA (1) (1).pptx
PDA (1) (1).pptxPDA (1) (1).pptx
PDA (1) (1).pptx
 
Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1
 
0227 regularlanguages
 0227 regularlanguages 0227 regularlanguages
0227 regularlanguages
 

Recently uploaded

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 

Recently uploaded (20)

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 

Finite state machine without output

  • 1. Finite State Machine Without Output Name: Tayyab Aman Roll No.: 19014156-018 Instructor: Mr.Shahbaz Ayyaz
  • 2. History & Introduction  The two neurophysiologists Warren McCulloch and Walter Pitts were the first to present a description of finite automata in 1943.  Their research paper, entitled, “A Logical Calculus Immanent in Nervous Activity”, made significant contributions to the study of theory of automata, the theory of computation and cybernetics.  An automaton in which the state set {Q} contains only a finite number of elements is called a finite-state machine (FSM), it is famous name is Finite Automata (FA).  FSMs are conceived as an abstract machine that can be in one of a finite number of states. FSMsInput Language Output
  • 3. Types Of FSMs DF M NFM Moore Without Output With Output Mealy *Note:: DFM & Non-DFM Give answer in Yes/No.
  • 4. Deterministic Finite-State Machine  A finite-state machine M is defined by Five-tuple are as follows; M = (Q, Σ, δ,q0,F)  Q: It represents the non-empty set of finite states.  Σ: It presents the non-empty finite set of the input alphabet.  δ : It represents the state transition function. Q × Σ → Q is the next-state function  q0: It is the initial state.  F: It is the set of final states (F ⊆ Q).  Initial State  Final State 1 𝑞0 𝑞1 0 0,1
  • 5. Deterministic Finite Automata  There is a unique or single move from one state to another with same input Symbol.  DFM is a simplest model of computation.  Example: 1 0 1 0 01 0 1 Q={ , , , } Σ={0,1} Initial State δ = Transition Table (State , Input) 0 1
  • 6. Example  Acceptance of a string by DFA: A String w is accepted by DFA If δ(𝒒 𝟎 , w) = q for some q є F. L =set of all strings starts with a. L={a,ab,aab,abb,aa,aba,……..} Let String =abb Because we start with initial state & end in final state ,so string is present. 𝑞0 𝑞1 𝑞2 a b a,b a,b Scanning the string (𝑞0,a) Then (𝑞1, 𝑏) Then (𝑞1, 𝑏) Then 𝒒
  • 7. Example  Construct a DFA to accept the string 0,1 which contain Even number of 1’s-  Solution L={0,11,011,110,1111,………}  1)  2)  3)  4)  5) 𝑞0 𝑞0 𝑞1 1 𝑞0 𝑞1 1 𝑞0 𝑞1 1 1 𝑞0 0 𝑞0 𝑞1 1 0 0 1 0 Transition Table 0 1 𝒒 𝟎 𝑞0 𝑞1 𝒒 𝟏 𝑞1 𝑞0 𝑞0
  • 8. Example  Design a DFA which accept set of all strings over {a,b} which starts with ab-  Solution  In order to check starting string we add an extra state which is called Dead state.  Total No. of states=Length of a smallest string+1+1= 42 𝑞0 𝑞3 𝑞1 𝑞2 a b b a,b a a,b Dead State a b 𝒒 𝟎 𝑞1 𝑞3 𝒒 𝟏 𝑞3 𝑞2 𝒒 𝟐 𝑞2 𝑞2 𝒒 𝟑 𝑞3 𝑞3 Q={𝑞0, 𝑞1, 𝑞2, 𝑞3} Σ={a,b}
  • 9. Example  Construct a DFA which accept set of all strings over {0,1} which interpreted as binary number divisible by 2-  Solution:  When we divide any number by 2 we get 2 remainders (0,1)  𝒒 𝟎= State with 0 remainder  𝒒 𝟏= State with 1 remainder 𝑞0 𝑞1 1 0 1 0 0 1 𝒒 𝟎 𝑞0 𝑞1 𝒒 𝟏 𝑞0 𝑞1 Examples:(011)2 = 3
  • 10. Nondeterministic Finite Automata(NFA)  In NFA Or NDFA ,we may lead to more than one states for a given inputs.  An NFA for a language can be smaller & easier to construct than a DFA .  We need to convert NFA to DFA for designing a compiler.  Every DFA is NFA , but every NFA is not DFA.  It is also a 5-tuple Machine. M = (Q, Σ, δ,q0,F)  But in NDFM , δ :Q x Σ  P(Q) is a function called as transition function. 𝒒 𝟎 𝒒 𝟏 є 𝒒 𝟎 𝒒 𝟐 𝒒 𝟏 a a
  • 11. Example  Design a NFA over an alphabet {0,1} such that every string accept must start with 0-  Solution: NFA DFA 𝑞0 𝑞1 0 0,1 𝑞0 𝑞2 𝑞1 0 0,10,1 0 1 𝒒 𝟎 𝑞1 ∅ 𝒒 𝟏 𝑞1 𝑞1 0 1 𝒒 𝟎 𝑞1 𝑞2 𝒒 𝟏 𝑞1 𝑞1 𝒒 𝟐 𝑞2 𝑞2
  • 12. Conversion NDFA To DFA Step 1: Initially Q' = ϕ Step 2: Add q0 of NFA to Q'. Then find the transitions from this start state. Step 3: In Q', find the possible set of states for each input symbol. If this set of states is not in Q', then add it to Q'. Step 4: In DFA, the final state will be all the states which contain F(final states of NFA)
  • 13. Example convert NDFA To DFA State 0 1 →q0 {q0, q1} {q1} q1 ϕ {q0, q1} Now we will obtain δ' transition for state q0. δ'([q0], 0) = {q0, q1} = [q0, q1] (new state generated) δ'([q0], 1) = {q1} = [q1] The δ' transition for state q1 is obtained as: δ'([q1], 0) = ϕ δ'([q1], 1) = [q0, q1] Now we will obtain δ' transition on [q0, q1]. δ'([q0, q1], 0) = δ(q0, 0) ∪ δ(q1, 0) = {q0, q1} ∪ ϕ = {q0, q1} = [q0, q1] Similarly, δ'([q0, q1], 1) = δ(q0, 1) ∪ δ(q1, 1) = {q1} ∪ {q0, q1} = {q0, q1} = [q0, q1] As in the given NFA, q1 is a final state, then in DFA wherever, q1 exists that state becomes a final state. Hence in the DFA, final states are [q1] and [q0, q1]. Therefore set of final states F = {[q1], [q0, q1]}.
  • 14. Cont.…. State 0 1 →[q0] [q0, q1] [q1] *[q1] ϕ [q0, q1] *[q0, q1] [q0, q1] [q0, q1] Suppose 1.A = [q0] 2.B = [q1] 3.C = [q0, q1] With these new names the DFA will be as follows: 0,
  • 15. Applications  FSMs are used in games; they are most recognized for being utilized in artificial intelligence, and however, they are also frequent in executions of navigating parsing text, input handling of the customer, as well as network protocols.  The finite state machines are applicable in vending machines, video games, traffic lights, controllers in CPU, text parsing, analysis of protocol, recognition of speech, language processing, etc.  These are restricted in computational power; they have the good quality of being comparatively simple to recognize. So, they are frequently used by software developers as well as system designers for summarizing the performance of a difficult system.
  • 16. References  https://www.elprocus.com/finite-state-machine.  https://www.javatpoint.com/automata-conversion-from-nfa-to-dfa  https://www.youtube.com/c/ashakhilrani  https://www.youtube.com/watch?v=Qa6csfkK7_I