Mealy and Moore Machines

Slides:



Advertisements
Similar presentations
CMPS 3223 Theory of Computation
Advertisements

Theory Of Automata By Dr. MM Alam
Software Engineering, COMP 201 Slide 1 Automata and Formal Languages Moore and Mealy Automata Ralf Möller Hamburg Univ. of Technology based on slides by.
Finite Automata with Output
Lecture # 14 Theory Of Automata By Dr. MM Alam 1.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Rosen 5th ed., ch. 11 Ref: Wikipedia
CSC312 Automata Theory Lecture # 19 Chapter # 8 by Cohen Finite Automata with Output.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Moore machine and Mealy machine (P.274)
Lecture # 15 Theory Of Automata By Dr. MM Alam 1.
Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No Roll No Roll No Roll No Group No. 3 Presented To Mam.
1 Recap lecture 22 Applications of complementing and incrementing machines, Equivalent machines, Moore equivalent to Mealy, proof, example, Mealy equivalent.
1 Recap lecture 21 Example of Moore machine, Mealy machine, Examples, complementing machine, Incrementing machine.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
Lecture 8 Theory of AUTOMATA
Lecture # 15. Mealy machine A Mealy machine consists of the following 1. A finite set of states q 0, q 1, q 2, … where q 0 is the initial state. 2. An.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
Lecture 09: Theory of Automata:2014 Asif NawazUIIT, PMAS-Arid Agriclture University Rawalpindi. Kleene’s Theorem and NFA.
L ECTURE 3 T HEORY OF AUTOMATA. E QUIVALENT R EGULAR E XPRESSIONS Definition Two regular expressions are said to be equivalent if they generate the same.
Lecture 06: Theory of Automata:08 Finite Automata with Output.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 Advanced Theory of Computation Finite Automata with output Pumping Lemma Theorem.
Finite Automata (FA) with Output FA discussed so far, is just associated with R.Es or language. Is there exist an FA which generates an output string corresponding.
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Theory of Computation Automata Theory Dr. Ayman Srour.
Kleene’s Theorem and NFA
Non Deterministic Automata
PDA’s - A new format for FAs
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Pushdown Automata.
Lecture 9 Theory of AUTOMATA
Chapter 2 FINITE AUTOMATA.
Non-deterministic Finite Automata (NFA)
Non-Deterministic Finite Automata
Recap lecture 29 Example of prefixes of a language, Theorem: pref(Q in R) is regular, proof, example, Decidablity, deciding whether two languages are equivalent.
CSE322 Mealy and Moore Machine
Non Deterministic Automata
Kleene’s Theorem Muhammad Arif 12/6/2018.
Recap Lecture 16 Examples of Kleene’s theorem part III (method 3), NFA, examples, avoiding loop using NFA, example, converting FA to NFA, examples, applying.
Lecture 5 Theory of AUTOMATA
ReCap Chomsky Normal Form, Theorem regarding CNF, examples of converting CFG to be in CNF, Example of an FA corresponding to Regular CFG, Left most and.
Recap lecture 10 Definition of GTG, examples of GTG accepting the languages of strings:containing aa or bb, beginning with and ending in same letters,
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Chapter 1 Regular Language
Lecture # 13.
Recap Lecture 17 converting NFA to FA (method 3), example, NFA and Kleene’s theorem method 1, examples, NFA and Kleene’s theorem method 2 , NFA corresponding.
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
Recap lecture 23 Mealy machines in terms of sequential circuit.
Recap Lecture 15 Examples of Kleene’s theorem part III (method 3), NFA, examples, avoiding loop using NFA, example, converting FA to NFA, examples, applying.
Finite Automata with Output
Recap lecture 20 Recap Theorem, Example, Finite Automaton with output, Moore machine, Examples.
Finite Automaton with output
Chapter # 5 by Cohen (Cont…)
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
Kleene’s Theorem (Part-3)
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
LECTURE # 07.
CHAPTER 1 Regular Languages
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
Finite Automata Fall 2018.
Presentation transcript:

Mealy and Moore Machines Lecture 8 Mealy and Moore Machines

Overview Moore Machines Mealy Machines Sequential Circuits

A Moore Machine q0/1 q1/0 q2/0 q3/1 a b a,b

Definition of a Moore Machine A finite set of states q0, q1, q2, etc. q0 is the start state Alphabet of input letters Alphabet of output letters Transitions A unique one for each letter and each state Output Table A letter for each state

Moore Machine for aba a b a q0/0 q1/0 q2/0 q3/1 b a b q4/0 a,b

Defining a Language To change a FA into a Moore machine which accepts the same language Name each state Name the Start state q0 Output 0 in all non-final states Output 1 in all Final states. A string is accepted if after it has been completed read in the last letter printed is 1.

A Mealy Machine q0 q1 q2 b/0 a/0 a/1 a/1, b/1

Definition of a Mealy Machine A finite set of states q0, q1, q2, etc. q0 is the start state Alphabet of input letters Alphabet of output letters Transitions A unique one for each letter and each state Each transition also has one output letter

Equivalence of Machines Every Moore machine can be turned into a Mealy machine. Every Mealy machine can be turned into a Moore machine. Every regular language can be defined by Moore machine or a Mealy machine. All languages defined by a Moore machine or a Mealy machine are regular.

Equivalent Machines: Two machine are said to equivalent if they print the same output string when the same input string is run on them Moore = Mealy A Moore machine can’t be equivalent to any Mealy machine. However, ignoring the extra character printed by Moore machine, automatically at the start state, there exist a Mealy machine which is equivalent to the Moore machine.

Theorem 8: For every Moore machine Mo, there is a Mealy machine Me that is equivalent to it (ignoring the initial extra character printed by the Moore machine). Proof: The proof will be the constructive algorithm. Consider the following situation in Moore machine

It will be converted into its equivalent Mealy machine by shifting the output character corresponding to state qx to the labels of corresponding incoming arrows. Thus the above machine will become. Note: If any state does not have incoming arrow then remove its output character for nothing. Ex:

Theorem 9: For every Mealy machine Me, there is a Moore machine Mo that is equivalent to it. Proof: The proof will be the constructive algorithm. At each state of a Mealy machine there are two possibilities for incoming transitions; The incoming transitions have same output character. Shift the output character of all the incoming transition to corresponding state.

ii) The incoming transitions have different output characters. Under this scenario there are two possibility. There is no self loop on the state. Split the corresponding state into as many new states as the number of different output characters on the incoming transitions, i.e. can be split into etc. Shift the output characters of the transitions to the corresponding new states. These new states should behave like the old state. i.e.

b) There is self loop on the state. Split the corresponding state into as many new states as the number of different output characters on the incoming transitions, i.e. can be split into etc. Shift the output characters of the transitions to the corresponding new states. These new states should behave like the old state. i.e. . Connect the new states with each other with the arrow in appropriate direction and with appropriate output character. Examples: Ch # 8: Exercise Questions 8, 9

Transducers Transducers as Models of Sequential Circuits: Automata with input and output are sometimes called transducers. Thus Moore and Mealy machines are also called transducers. Example: Exercise Q. No. 10 Solve Exercise questions: 1, 3, 4, 5, 6, 7, 8, 9, 10