SlideShare a Scribd company logo
Mealy & Moore Machine Models
08/20/14Er. Deepinder Kaur
Mealy Machine Model
08/20/14Er. Deepinder Kaur
In Mealy machine. the value of output function is depend
on the present state and present input. In mealy machine every transition
for a particular input symbol has a fixed output.
Mealy machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0)
 
          where
          Q = Finite non-empty set of states;
          Σ = Set of input alphabets.
          Δ = Set of output alphabets.
          δ = Transitional function mapping Q X Σ → Q
          λ = Output function mapping Q X Σ → Δ
          q0 = Initial state.
δ: it is transition function which takes two arguments as in finite automata, one is input
state and another input symbol
λ’: is a mapping function which maps Q x ∑ to ∆ giving the output associated with
each transition
q0: initial state
So λ’ maps Q x ∑ ∆ that is λ’(q,a) gives the output associated with the transition
from state q0 on input a. The output of Me in response to input a1,a2,a3…..an is
λ’(q0,a1), λ’(q1,a2)………λ’(qn-1,an) where q0,q1,q2……….qn is the sequence
of states such that
δ(qi-1,ai)=qi for 1<=i<=n
Mealy Machine Model
08/20/14Er. Deepinder Kaur
Sample Transition table
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 0 q1 1
q1 q0 1 q3 0
q2 q2 1 q2 0
q3 q1 0 q0 1
Where λ’(q0,0)=0, λ’(q0,1)=1, λ’(q1,0)=1 ,λ’(q1,1)=0, λ’(q2,0)=1
λ’(q2,1)=0
λ’(q3,0)=10, λ’(q3,1)=1
Moore Machine Model
08/20/14Er. Deepinder Kaur
In Moore machine. the value of output function is depend on
the present state only.
Moore machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0)
          where
          Q = Finite non-empty set of states;
          Σ = Set of input alphabets.
          Δ = Set of output alphabets.
          δ = Transition function mapping Q X Σ → Q
          λ = Output function mapping Q → Δ
q0 = Initial state..
δ: it is transition function which takes two arguments as in finite automata, one is input state
and another input symbol
λ’: is a mapping function which maps Q to ∆ giving the output associated with each state
q0: initial state
let Mo be a moore machine and ∑ is a1,a2,a3------an, then output of M0 for ∑ is λ’(q0),
λ’(q1), λ’(q2)………λ’(qn) where q0,q1,q2……….qn is the sequence of states such that
δ(qi-1,ai)=qi for 1<=i<=n
 Moore machine can be represented by transition table as well as transition diagram same as
finite automata
Moore Machine Model
08/20/14Er. Deepinder Kaur
Sample Transition Table:
Present State
Next State
Output
a = 0 a = 1
-> q0 q3 q1 1
q1 q0 q3 0
q2 q2 q2 0
q3 q1 q0 1
Where λ’(q0)=1, λ’(q1)=0, λ’(q2)=0 and λ’(q3)=1. there is no
concept of final state in moore machineas we consider output for
each state.
Representation of Moore machine
Present state Next state
a=0
a=1
output
q0 q3 q1 0
q1 q1 q2 1
q2 q2 q3 0
q3 q3 q0 0
q0
0
1
1
0
0
1
0
0
1
1
0
0
q1
q2
q3
Output for every state is written just above the state
Present statePresent state
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Steps:
 
Step 1:
For a state qi determine the number of outputs that are available in θ state table
of the Mealy machine.
Step 2:
If the outputs corresponding to state qi in the next state columns are same,
then retain state qi as it is. Else, break qi into different states with the number of
new states being equal to the number of different outputs of qi.
e.g. suppose in the next state column of the above sample
transition table of mealy machine, the output associated with q1
is "0" in the first next state column and
"1" in the second next state column.
so we split q1 into q10 and q11 states.
similarly check others and split them.
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Step 3:
Rearrange the states and outputs in the format of Moore machine.
The common output of the new state table can be determined by examining
the outputs under the next state columns of the Mealy machine.
Step 4:
If the output in the constructed state table corresponding to the initial state is 1,
then this specifies the acceptance of the null string ^ by Mealy machine.
Hence, to make both the Mealy and Moore machines equivalent, we either
need to ignore the corresponding to null string or we need to insert a new initial
state at beginning whose output os 0; the other row elements in this case
would remain the same.
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Consider Sample Transition table
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 0 q1 1
q1 q0 1 q3 0
q2 q2 1 q2 0
q3 q1 0 q0 1
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Solution: After applying the conversion steps, we get two states ( q1 and q2) that are
associated with different outputs (0 and 1). so we split both states into q10 , q11 and q20,
q21.
Now the transition table becomes
 
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 0 q11 1
q10 q0 1 q3 0
q11 q0 1 q3 0
q20 q21 1 q20 0
q21 q21 1 q20 0
q3 q10 0 q0 1
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Here 
whole row of q1 is copied to q10 , q11 and whole row of q2 is copied to
q20 and q21 of the sample transition table of mealy machine.
The outputs of the next state columns of q1 and q2 are depend on the
previous output. For ex. in the first row, q1 becomes q11 because the
out of q1 is 1. in the fourth row, q2 becomes q21 because the output of
the q2 is 1. and in the subsequent column q2 becomes q20 because the
output of q2 in that column was 0. and so on
 
now in moore machine format, we copied all the states and common
output because in moore machine. the outputs of the next state are
common.
 
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Present State
Next State
Output
a = 0 a = 1
-> q0 q3 q11 1
q10 q0 q3 0
q11 q0 q3 1
q20 q21 q20 0
q21 q21 q20 1
q3 q10 q0 0
This table is moore machine table corresponding to the sample mealy
machine.
 
Conversion from Mealy machine to
Moore machine
08/20/14Er. Deepinder Kaur
Exercise : convert the following mealy machine to corresponding
moore machine
Present State
Next State
a = 0 a = 1
State Output State Output
->q0 q1 0 q3 0
q1 q3 1 q2 0
q2 q4 1 q0 0
q3 q0 0 q4 1
q4 q2 0 q1 1
Conversion from Moore machine to Mealy
machine
08/20/14Er. Deepinder Kaur
For understanding the conversion of moore to mealy machine, let us take an
example:
 
suppose the moore machine transition table is:
 
Present State
Next State
Output
a = 0 a = 1
-> q0 q3 q1 1
q1 q0 q3 0
q2 q2 q2 0
q3 q1 q0 1
machine
08/20/14Er. Deepinder Kaur
Solution: First of all take the mealy machine transition table format, i.e.,
Present State
Next State
a = 0 a = 1
State Output State Output
machine
08/20/14Er. Deepinder Kaur
Next step is to copy all the  moore machine transition table states into mealy
machine transition table format
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 q1
q1 q0 q3
q2 q2 q2
q3 q1 q0
machine
08/20/14Er. Deepinder Kaur
Now in the moore machine, the output of the q0 is 1. so make the
output of q0 in the mealy machine next state column of the above
table is 1. same process is repeated for q1, q2 and q3.
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 q1
q1 q0 1 q3
q2 q2 q2
q3 q1 q0 1
machine
08/20/14Er. Deepinder Kaur
After repeating the above process for q1,q2 and q3 states, the final
mealy machine transition table is: 
Present State
Next State
a = 0 a = 1
State Output State Output
-> q0 q3 1 q1 0
q1 q0 1 q3 1
q2 q2 0 q2 0
q3 q1 0 q0 1
machine
08/20/14Er. Deepinder Kaur
Exercise :  convert the following Moore machine into mealy
machine:
Present State
Next State
Output
a = 0 a = 1
-> q0 q1 q0 0
q1 q2 q3 1
q2 q3 q2 0
q3 q0 q1 1

More Related Content

What's hot

Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machine
Ehatsham Riaz
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
Sujata Pardeshi
 
Moore Mealy Machine Conversion
Moore Mealy Machine Conversion Moore Mealy Machine Conversion
Moore Mealy Machine Conversion
Aiman Hafeez
 
Finite automata
Finite automataFinite automata
Finite automata
Bipul Roy Bpl
 
J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
Krishma Parekh
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
hafizhamza0322
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
kunj desai
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machines
Irfan Anjum
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
dennis gookyi
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
Animesh Chaturvedi
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
Rajendran
 
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
 
Minimization of DFA.pptx
Minimization of DFA.pptxMinimization of DFA.pptx
Minimization of DFA.pptx
SadagopanS
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
suthi
 
Introduction state machine
Introduction state machineIntroduction state machine
Introduction state machine
Shreyans Pathak
 
Pda
PdaPda
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
Archana Gopinath
 
Finite State Machines with Output
Finite State Machines with OutputFinite State Machines with Output
Finite State Machines with Output
Mustafa Saeed
 
Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
Akila Krishnamoorthy
 

What's hot (20)

Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machine
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Moore Mealy Machine Conversion
Moore Mealy Machine Conversion Moore Mealy Machine Conversion
Moore Mealy Machine Conversion
 
Finite automata
Finite automataFinite automata
Finite automata
 
J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machines
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
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)
 
Minimization of DFA.pptx
Minimization of DFA.pptxMinimization of DFA.pptx
Minimization of DFA.pptx
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
Introduction state machine
Introduction state machineIntroduction state machine
Introduction state machine
 
Pda
PdaPda
Pda
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Finite State Machines with Output
Finite State Machines with OutputFinite State Machines with Output
Finite State Machines with Output
 
Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
 

Viewers also liked

Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
lavishka_anuj
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
grahamwell
 
Mealy state machine
Mealy state machineMealy state machine
Mealy state machine
Arif Siyal
 
Meley & moore
Meley & mooreMeley & moore
Meley & moore
Arif Siyal
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)
Mumbi Chishimba
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
deepinderbedi
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
Marina Santini
 
Mealy machine
Mealy machineMealy machine
Mealy machine
Arif Siyal
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
Abhilash Nair
 
Design1
Design1Design1
Design1
deepinderbedi
 
Finite State Machines
Finite State Machines Finite State Machines
Finite State Machines
Basel Mansour
 
Cldch8
Cldch8Cldch8
Cldch8
sealife24
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
Adarsh Patel
 
Boostsapporomsmpost 111106070819-phpapp02
Boostsapporomsmpost 111106070819-phpapp02Boostsapporomsmpost 111106070819-phpapp02
Boostsapporomsmpost 111106070819-phpapp02
Takatoshi Kondo
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
Raghu nath
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
Ranjan Kumar
 
Fsm sequence detector
Fsm sequence detector Fsm sequence detector
Fsm sequence detector
lpvasam
 
Os6
Os6Os6
Os6
issbp
 
Os6 2
Os6 2Os6 2
Os6 2
issbp
 
Ch11 input output systems
Ch11 input output systemsCh11 input output systems
Ch11 input output systems
issbp
 

Viewers also liked (20)

Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
 
Mealy state machine
Mealy state machineMealy state machine
Mealy state machine
 
Meley & moore
Meley & mooreMeley & moore
Meley & moore
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Mealy machine
Mealy machineMealy machine
Mealy machine
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
 
Design1
Design1Design1
Design1
 
Finite State Machines
Finite State Machines Finite State Machines
Finite State Machines
 
Cldch8
Cldch8Cldch8
Cldch8
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
 
Boostsapporomsmpost 111106070819-phpapp02
Boostsapporomsmpost 111106070819-phpapp02Boostsapporomsmpost 111106070819-phpapp02
Boostsapporomsmpost 111106070819-phpapp02
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Fsm sequence detector
Fsm sequence detector Fsm sequence detector
Fsm sequence detector
 
Os6
Os6Os6
Os6
 
Os6 2
Os6 2Os6 2
Os6 2
 
Ch11 input output systems
Ch11 input output systemsCh11 input output systems
Ch11 input output systems
 

Similar to Mealy moore machine model

Autoata.pptx
Autoata.pptxAutoata.pptx
Autoata.pptx
PratikBose10
 
Lesson 18 Automata .ppt
Lesson 18 Automata .pptLesson 18 Automata .ppt
Lesson 18 Automata .ppt
GeekyHassan
 
Conversion of melay to moore
Conversion of melay to mooreConversion of melay to moore
Conversion of melay to moore
Dr. ABHISHEK K PANDEY
 
mealy moore machine conversion
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion
Chandnigupta80
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
meresie tesfay
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
rdjo
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
rdjo
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
NAMRATA BORKAR
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
Arslan905905
 
Automata based programming
Automata based programmingAutomata based programming
Automata based programming
VisnuDharsini
 
Lecture 3
Lecture 3Lecture 3
07 seq logicii-ix2
07 seq logicii-ix207 seq logicii-ix2
07 seq logicii-ix2
SHIVA PRASAD
 
@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
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machines
Abhilash Nair
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
SHASHISHARMA850123
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! Edhole
Edhole.com
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
Edhole.com
 
Formalization Machines and Sastes
Formalization Machines and SastesFormalization Machines and Sastes
Formalization Machines and Sastes
Lahiru Danushka
 
Modern control 2
Modern control 2Modern control 2
Modern control 2
cairo university
 
Automaton
AutomatonAutomaton
Automaton
SudipKambli
 

Similar to Mealy moore machine model (20)

Autoata.pptx
Autoata.pptxAutoata.pptx
Autoata.pptx
 
Lesson 18 Automata .ppt
Lesson 18 Automata .pptLesson 18 Automata .ppt
Lesson 18 Automata .ppt
 
Conversion of melay to moore
Conversion of melay to mooreConversion of melay to moore
Conversion of melay to moore
 
mealy moore machine conversion
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Automata based programming
Automata based programmingAutomata based programming
Automata based programming
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
07 seq logicii-ix2
07 seq logicii-ix207 seq logicii-ix2
07 seq logicii-ix2
 
@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
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machines
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! Edhole
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
 
Formalization Machines and Sastes
Formalization Machines and SastesFormalization Machines and Sastes
Formalization Machines and Sastes
 
Modern control 2
Modern control 2Modern control 2
Modern control 2
 
Automaton
AutomatonAutomaton
Automaton
 

Recently uploaded

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 

Recently uploaded (20)

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 

Mealy moore machine model

  • 1. Mealy & Moore Machine Models 08/20/14Er. Deepinder Kaur
  • 2. Mealy Machine Model 08/20/14Er. Deepinder Kaur In Mealy machine. the value of output function is depend on the present state and present input. In mealy machine every transition for a particular input symbol has a fixed output. Mealy machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0)             where           Q = Finite non-empty set of states;           Σ = Set of input alphabets.           Δ = Set of output alphabets.           δ = Transitional function mapping Q X Σ → Q           λ = Output function mapping Q X Σ → Δ           q0 = Initial state.
  • 3. δ: it is transition function which takes two arguments as in finite automata, one is input state and another input symbol λ’: is a mapping function which maps Q x ∑ to ∆ giving the output associated with each transition q0: initial state So λ’ maps Q x ∑ ∆ that is λ’(q,a) gives the output associated with the transition from state q0 on input a. The output of Me in response to input a1,a2,a3…..an is λ’(q0,a1), λ’(q1,a2)………λ’(qn-1,an) where q0,q1,q2……….qn is the sequence of states such that δ(qi-1,ai)=qi for 1<=i<=n
  • 4. Mealy Machine Model 08/20/14Er. Deepinder Kaur Sample Transition table Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 0 q1 1 q1 q0 1 q3 0 q2 q2 1 q2 0 q3 q1 0 q0 1 Where λ’(q0,0)=0, λ’(q0,1)=1, λ’(q1,0)=1 ,λ’(q1,1)=0, λ’(q2,0)=1 λ’(q2,1)=0 λ’(q3,0)=10, λ’(q3,1)=1
  • 5. Moore Machine Model 08/20/14Er. Deepinder Kaur In Moore machine. the value of output function is depend on the present state only. Moore machine is described by 6-tuples - (Q, Σ, Δ, δ, λ, q0)           where           Q = Finite non-empty set of states;           Σ = Set of input alphabets.           Δ = Set of output alphabets.           δ = Transition function mapping Q X Σ → Q           λ = Output function mapping Q → Δ q0 = Initial state..
  • 6. δ: it is transition function which takes two arguments as in finite automata, one is input state and another input symbol λ’: is a mapping function which maps Q to ∆ giving the output associated with each state q0: initial state let Mo be a moore machine and ∑ is a1,a2,a3------an, then output of M0 for ∑ is λ’(q0), λ’(q1), λ’(q2)………λ’(qn) where q0,q1,q2……….qn is the sequence of states such that δ(qi-1,ai)=qi for 1<=i<=n  Moore machine can be represented by transition table as well as transition diagram same as finite automata
  • 7. Moore Machine Model 08/20/14Er. Deepinder Kaur Sample Transition Table: Present State Next State Output a = 0 a = 1 -> q0 q3 q1 1 q1 q0 q3 0 q2 q2 q2 0 q3 q1 q0 1 Where λ’(q0)=1, λ’(q1)=0, λ’(q2)=0 and λ’(q3)=1. there is no concept of final state in moore machineas we consider output for each state.
  • 8. Representation of Moore machine Present state Next state a=0 a=1 output q0 q3 q1 0 q1 q1 q2 1 q2 q2 q3 0 q3 q3 q0 0
  • 9. q0 0 1 1 0 0 1 0 0 1 1 0 0 q1 q2 q3 Output for every state is written just above the state Present statePresent state
  • 10. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Steps:   Step 1: For a state qi determine the number of outputs that are available in θ state table of the Mealy machine. Step 2: If the outputs corresponding to state qi in the next state columns are same, then retain state qi as it is. Else, break qi into different states with the number of new states being equal to the number of different outputs of qi. e.g. suppose in the next state column of the above sample transition table of mealy machine, the output associated with q1 is "0" in the first next state column and "1" in the second next state column. so we split q1 into q10 and q11 states. similarly check others and split them.
  • 11. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Step 3: Rearrange the states and outputs in the format of Moore machine. The common output of the new state table can be determined by examining the outputs under the next state columns of the Mealy machine. Step 4: If the output in the constructed state table corresponding to the initial state is 1, then this specifies the acceptance of the null string ^ by Mealy machine. Hence, to make both the Mealy and Moore machines equivalent, we either need to ignore the corresponding to null string or we need to insert a new initial state at beginning whose output os 0; the other row elements in this case would remain the same.
  • 12. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Consider Sample Transition table Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 0 q1 1 q1 q0 1 q3 0 q2 q2 1 q2 0 q3 q1 0 q0 1
  • 13. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Solution: After applying the conversion steps, we get two states ( q1 and q2) that are associated with different outputs (0 and 1). so we split both states into q10 , q11 and q20, q21. Now the transition table becomes   Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 0 q11 1 q10 q0 1 q3 0 q11 q0 1 q3 0 q20 q21 1 q20 0 q21 q21 1 q20 0 q3 q10 0 q0 1
  • 14. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Here  whole row of q1 is copied to q10 , q11 and whole row of q2 is copied to q20 and q21 of the sample transition table of mealy machine. The outputs of the next state columns of q1 and q2 are depend on the previous output. For ex. in the first row, q1 becomes q11 because the out of q1 is 1. in the fourth row, q2 becomes q21 because the output of the q2 is 1. and in the subsequent column q2 becomes q20 because the output of q2 in that column was 0. and so on   now in moore machine format, we copied all the states and common output because in moore machine. the outputs of the next state are common.  
  • 15. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Present State Next State Output a = 0 a = 1 -> q0 q3 q11 1 q10 q0 q3 0 q11 q0 q3 1 q20 q21 q20 0 q21 q21 q20 1 q3 q10 q0 0 This table is moore machine table corresponding to the sample mealy machine.  
  • 16. Conversion from Mealy machine to Moore machine 08/20/14Er. Deepinder Kaur Exercise : convert the following mealy machine to corresponding moore machine Present State Next State a = 0 a = 1 State Output State Output ->q0 q1 0 q3 0 q1 q3 1 q2 0 q2 q4 1 q0 0 q3 q0 0 q4 1 q4 q2 0 q1 1
  • 17. Conversion from Moore machine to Mealy machine 08/20/14Er. Deepinder Kaur For understanding the conversion of moore to mealy machine, let us take an example:   suppose the moore machine transition table is:   Present State Next State Output a = 0 a = 1 -> q0 q3 q1 1 q1 q0 q3 0 q2 q2 q2 0 q3 q1 q0 1
  • 18. machine 08/20/14Er. Deepinder Kaur Solution: First of all take the mealy machine transition table format, i.e., Present State Next State a = 0 a = 1 State Output State Output
  • 19. machine 08/20/14Er. Deepinder Kaur Next step is to copy all the  moore machine transition table states into mealy machine transition table format Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 q1 q1 q0 q3 q2 q2 q2 q3 q1 q0
  • 20. machine 08/20/14Er. Deepinder Kaur Now in the moore machine, the output of the q0 is 1. so make the output of q0 in the mealy machine next state column of the above table is 1. same process is repeated for q1, q2 and q3. Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 q1 q1 q0 1 q3 q2 q2 q2 q3 q1 q0 1
  • 21. machine 08/20/14Er. Deepinder Kaur After repeating the above process for q1,q2 and q3 states, the final mealy machine transition table is:  Present State Next State a = 0 a = 1 State Output State Output -> q0 q3 1 q1 0 q1 q0 1 q3 1 q2 q2 0 q2 0 q3 q1 0 q0 1
  • 22. machine 08/20/14Er. Deepinder Kaur Exercise :  convert the following Moore machine into mealy machine: Present State Next State Output a = 0 a = 1 -> q0 q1 q0 0 q1 q2 q3 1 q2 q3 q2 0 q3 q0 q1 1