HOME

TheInfoList



OR:

In the theory of computation, a Moore machine is a
finite-state machine A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
whose current output values are determined only by its current
state State may refer to: Arts, entertainment, and media Literature * ''State Magazine'', a monthly magazine published by the U.S. Department of State * ''The State'' (newspaper), a daily newspaper in Columbia, South Carolina, United States * ''Our S ...
. This is in contrast to a Mealy machine, whose output values are determined both by its current state and by the values of its inputs. Like other finite state machines, in Moore machines, the input typicall
influences the next state
Thus the input may indirectly influence subsequent outputs, but not the current or immediate output. The Moore machine is named after
Edward F. Moore Edward Forrest Moore (November 23, 1925 in Baltimore, Maryland – June 14, 2003 in Madison, Wisconsin) was an American professor of mathematics and computer science, the inventor of the Moore finite state machine, and an early pioneer of artifi ...
, who presented the concept in a 1956 paper, “ Gedanken-experiments on Sequential Machines.”


Formal definition

A Moore machine can be defined as a 6-tuple (Q, q_0, \Sigma, O, \delta, G) consisting of the following: * A finite set of states Q * A start state (also called initial state) q_0 which is an element of Q * A finite set called the input
alphabet An alphabet is a standardized set of basic written graphemes (called letters) that represent the phonemes of certain spoken languages. Not all writing systems represent language in this way; in a syllabary, each character represents a syllab ...
\Sigma * A finite set called the output
alphabet An alphabet is a standardized set of basic written graphemes (called letters) that represent the phonemes of certain spoken languages. Not all writing systems represent language in this way; in a syllabary, each character represents a syllab ...
O * A transition function \delta : Q \times \Sigma \rightarrow Q mapping a state and the input alphabet to the next state * An output function G : Q \rightarrow O mapping each state to the output alphabet A Moore machine can be regarded as a restricted type of finite-state transducer.


Visual representation


Table

A state transition table is a table listing all the triples in the transition relation \delta : Q \times \Sigma \rightarrow Q .


Diagram

The state diagram for a Moore machine, or Moore diagram, is a diagram state diagram that associates an output value with each state.


Relationship with Mealy machines

As Moore and Mealy machines are both types of finite-state machines, they are equally expressive: either type can be used to parse a
regular language In theoretical computer science and formal language theory, a regular language (also called a rational language) is a formal language that can be defined by a regular expression, in the strict sense in theoretical computer science (as opposed to ...
. The difference between Moore machines and Mealy machines is that in the latter, the output of a transition is determined by the combination of current
state State may refer to: Arts, entertainment, and media Literature * ''State Magazine'', a monthly magazine published by the U.S. Department of State * ''The State'' (newspaper), a daily newspaper in Columbia, South Carolina, United States * ''Our S ...
and current input (S \times \Sigma as the domain of G), as opposed to just the current state (S as the domain of G). When represented as a state diagram, * for a Moore machine, each node (state) is labeled with an output value; * for a Mealy machine, each arc (transition) is labeled with an output value. Every Moore machine M is equivalent to the Mealy machine with the same states and transitions and the output function G(s, \sigma) = G_M(\delta_M(s, \sigma)), which takes each state-input pair (s, \sigma) and yields G_M(\delta_M(s, \sigma)), where G_M is M's output function and \delta_M is M's transition function. However, not every Mealy machine can be converted to an equivalent Moore machine. Some can be converted only to an ''almost'' equivalent Moore machine, with outputs shifted in time. This is due to the way that state labels are paired with transition labels to form the input/output pairs. Consider a transition s_i\rightarrow s_j from state s_i to state s_j. The input causing the transition s_i\rightarrow s_j labels the edge (s_i, s_j). The output corresponding to that input, is the label of state s_i. Notice that this is the source state of the transition. So for each input, the output is already fixed before the input is received, and depends solely on the present state. This is the original definition by E. Moore. It is a common mistake to use the label of state s_j as output for the transition s_i\rightarrow s_j.


Examples

Types according to number of inputs/outputs.


Simple

Simple Moore machines have one input and one output: * edge detector using
XOR Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
* binary adding machine * clocked sequential systems (a restricted form of Moore machine where the state changes only when the global clock signal changes) Most digital electronic systems are designed as clocked sequential systems. Clocked sequential systems are a restricted form of Moore machine where the state changes only when the global clock signal changes. Typically the current state is stored in flip-flops, and a global clock signal is connected to the "clock" input of the flip-flops. Clocked sequential systems are one way to solve
metastability In chemistry and physics, metastability denotes an intermediate energetic state within a dynamical system other than the system's state of least energy. A ball resting in a hollow on a slope is a simple example of metastability. If the ball i ...
problems. A typical electronic Moore machine includes a combinational logic chain to decode the current state into the outputs (lambda). The instant the current state changes, those changes ripple through that chain, and almost instantaneously the output gets updated. There are design techniques to ensure that no glitches occur on the outputs during that brief period while those changes are rippling through the chain, but most systems are designed so that glitches during that brief transition time are ignored or are irrelevant. The outputs then stay the same indefinitely ( LEDs stay bright, power stays connected to the motors,
solenoid upright=1.20, An illustration of a solenoid upright=1.20, Magnetic field created by a seven-loop solenoid (cross-sectional view) described using field lines A solenoid () is a type of electromagnet formed by a helix, helical coil of wire whose ...
s stay energized, etc.), until the Moore machine changes state again.


Worked Example

A sequential network has one input and one output. The output becomes 1 and remains 1 thereafter when at least two 0's and two 1's have occurred as inputs. A Moore machine with nine states for the above description is shown on the right. The initial state is state A, and the final state is state I. The state table for this example is as follows:


Complex

More complex Moore machines can have multiple inputs as well as multiple outputs.


Gedanken-experiments

In Moore's 1956 paper " Gedanken-experiments on Sequential Machines", the (n;m;p) automata (or machines) S are defined as having n states, m input symbols and p output symbols. Nine theorems are proved about the structure of S, and experiments with S. Later, "S machines" became known as "Moore machines". At the end of the paper, in Section "Further problems", the following task is stated:
Another directly following problem is the improvement of the bounds given at the theorems 8 and 9.
Moore's Theorem 8 is formulated as:
Given an arbitrary (n;m;p) machine S, such that every two of its states are distinguishable from one another, then there exists an experiment of length \tfrac which determines the state of S at the end of the experiment.
In 1957, A. A. Karatsuba proved the following two theorems, which completely solved Moore's problem on the improvement of the bounds of the experiment length of his "Theorem 8".
Theorem A. If S is an (n;m;p) machine, such that every two of its states are distinguishable from one another, then there exists a branched experiment of length at most \tfrac + 1 through which one may determine the state of S at the end of the experiment.
Theorem B. There exists an (n;m;p) machine, every two states of which are distinguishable from one another, such that the length of the shortest experiments establishing the state of the machine at the end of the experiment is equal to \tfrac + 1.
Theorems A and B were used for the basis of the course work of a student of the fourth year, A. A. Karatsuba, "On a problem from the automata theory", which was distinguished by testimonial reference at the competition of student works of the faculty of mechanics and mathematics of
Moscow State University M. V. Lomonosov Moscow State University (MSU; russian: Московский государственный университет имени М. В. Ломоносова) is a public research university in Moscow, Russia and the most prestigious ...
in 1958. The paper by Karatsuba was given to the journal ''Uspekhi Mat. Nauk'' on 17 December 1958 and was published there in June 1960. Until the present day (2011), Karatsuba's result on the length of experiments is the only exact nonlinear result, both in automata theory, and in similar problems of
computational complexity theory In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
.


See also

*
Synchronous circuit In digital electronics, a synchronous circuit is a digital circuit in which the changes in the state of memory elements are synchronized by a clock signal. In a sequential digital logic circuit, data are stored in memory devices called flip-f ...
* Mealy machine * Algorithmic state machine *
Autonomous system (mathematics) In mathematics, an autonomous system or autonomous differential equation is a system of ordinary differential equations which does not explicitly depend on the independent variable. When the variable is time, they are also called time-invariant ...


References


Further reading

* * Moore E. F. Gedanken-experiments on Sequential Machines. Automata Studies, Annals of Mathematical Studies, 34, 129–153. Princeton University Press, Princeton, N.J.(1956). * Karatsuba A. A. Solution of one problem from the theory of finite automata. Usp. Mat. Nauk, 15:3, 157–159 (1960). * Karatsuba A. A. Experimente mit Automaten (German) Elektron. Informationsverarb. Kybernetik, 11, 611–612 (1975). * Karatsuba A. A.
List of research works
'.


External links

*{{Commonscatinline Finite automata