State transition table

State transition table

In automata theory and sequential logic, a state transition table is a table showing what state (or states in the case of a nondeterministic finite automaton) a finite semiautomaton or finite state machine will move to, based on the current state and other inputs. A state table is essentially a truth table in which some of the inputs are the current state, and the outputs include the next state, along with other outputs.

A state table is one of many ways to specify a state machine, other ways being a state diagram, and a characteristic equation.

Contents

Common forms

One-dimensional state tables

Also called characteristic tables, single-dimension state tables are much more like truth tables than the two-dimensional versions. Inputs are usually placed on the left, and separated from the outputs, which are on the right. The outputs will represent the next state of the machine. Here's a simple example of a state machine with two states, and two combinatorial inputs:

A B Current State Next State Output
0 0 S1 S2 1
0 0 S2 S1 0
0 1 S1 S2 0
0 1 S2 S2 1
1 0 S1 S1 1
1 0 S2 S1 1
1 1 S1 S1 1
1 1 S2 S2 0

S1 and S2 would most likely represent the single bits 0 and 1, since a single bit can only have two states.

Two-dimensional state tables

State transition tables are typically two-dimensional tables. There are two common forms for arranging them.

  • The vertical (or horizontal) dimension indicates current states, the horizontal (or vertical) dimension indicates events, and the cells (row/column intersections) in the table contain the next state if an event happens (and possibly the action linked to this state transition).
State Transition Table
  Events
State
E1 E2   ...   En
S1 - Ay/Sj ... -
S2 - - ... Ax/Si
... ... ... ... ...
Sm Az/Sk - ... -

(S: state, E: event, A: action, -: illegal transition)

  • The vertical (or horizontal) dimension indicates current states, the horizontal (or vertical) dimension indicates next states, and the row/column intersections contain the event which will lead to a particular next state.
State Transition Table
      next
current
S1 S2   ...   Sm
S1 Ay/Ej - ... -
S2 - - ... Ax/Ei
... ... ... ... ...
Sm - Az/Ek ... -

(S: state, E: event, A: action, -: impossible transition)

Other forms

Simultaneous transitions in multiple finite state machines can be shown in what is effectively an n-dimensional state transition table in which pairs of rows map (sets of) current states to next states.[1] This is an alternative to representing communication between separate, interdependent state machines.

At the other extreme, separate tables have been used for each of the transitions within a single state machine: "AND/OR tables"[2] are similar to incomplete decision tables in which the decision for the rules which are present is implicitly the activation of the associated transition.

Example

An example of a state transition table for a machine M together with the corresponding state diagram is given below.

State Transition Table
  Input
State
1 0
S1 S1 S2
S2 S2 S1
  State Diagram
DFAexample.svg

All the possible inputs to the machine are enumerated across the columns of the table. All the possible states are enumerated across the rows. From the state transition table given above, it is easy to see that if the machine is in S1 (the first row), and the next input is character 1, the machine will stay in S1. If a character 0 arrives, the machine will transition to S2 as can be seen from the second column. In the diagram this is denoted by the arrow from S1 to S2 labeled with a 0.

For a nondeterministic finite automaton (NFA), a new input may cause the machine to be in more than one state, hence its non-determinism. This is denoted in a state transition table by a pair of curly braces { } with the set of all target states between them. An example is given below.

State Transition Table for an NFA
  Input
State
1 0 ε
S1 S1 { S2, S3 } Φ
S2 S2 S1 Φ
S3 S2 S1 S1

Here, a nondeterministic machine in the state S1 reading an input of 0 will cause it to be in two states at the same time, the states S2 and S3. The last column defines the legal transition of states of the special character, ε. This special character allows the NFA to move to a different state when given no input. In state S3, the NFA may move to S1 without consuming an input character. The two cases above make the finite automaton described non-deterministic.

Transformations from/to state diagram

It is possible to draw a state diagram from the table. A sequence of easy to follow steps is given below:

  1. Draw the circles to represent the states given.
  2. For each of the states, scan across the corresponding row and draw an arrow to the destination state(s). There can be multiple arrows for an input character if the automaton is an NFA.
  3. Designate a state as the start state. The start state is given in the formal definition of the automaton.
  4. Designate one or more states as accept state. This is also given in the formal definition.

See also

References

  1. ^ Breen, Michael (2005), "Experience of using a lightweight formal specification method for a commercial embedded system product line", Requirements Engineering Journal 10 (2), doi:10.1007/s00766-004-0209-1, http://mbreen.com/experience.pdf 
  2. ^ Leveson, Nancy; Heimdahl, Mats Per Erik; Hildreth, Holly; Reese, Jon Damon (1994), "Requirements Specification for Process-Control Systems", IEEE Transactions on Software Engineering 20 (9), doi:10.1109/32.317428, http://sunnyday.mit.edu/papers/tcas-tse.pdf 

Further reading

  • Michael Sipser: Introduction to the Theory of Computation. PWS Publishing Co., Boston 1997 ISBN 0-534-94728-X

Wikimedia Foundation. 2010.

Поможем студентам написать доклад

Look at other dictionaries:

  • State diagram — State diagrams is a diagram used in the field of computer science, representing the behavior of a system, which is composed of a finite number of states. There are many forms of state diagrams, which differ slightly and have different semantics.… …   Wikipedia

  • Transition To War — (TTW) is a NATO military term [cite web title=NATO C3 Technical Architecture work=North Atlantic Treaty Organisation url=http://nc3ta.nc3a.nato.int/website/book.asp?cl=no menuid=13 page=acronyms%2Facronyms T.html accessdate=2006 04 21] referring… …   Wikipedia

  • transition element — Chem. any element in any of the series of elements with atomic numbers 21 29, 39 47, 57 79, and 89 107, that in a given inner orbital has less than a full quota of electrons. Also called transition metal. [1920 25] * * * Any chemical element with …   Universalium

  • Transition metal — The term transition metal (sometimes also called a transition element) has two possible meanings: The IUPAC definition[1] states that a transition metal is an element whose atom has an incomplete d sub shell, or which can give rise to cations… …   Wikipedia

  • State University of New York at Binghamton — Infobox University name = Binghamton University State University of New York size = 300px motto = From breadth through depth to perspective established = 1946 type = Public Faculty = 551 (full time only) employees = 5,000+ endowment = $68.9… …   Wikipedia

  • State of Vietnam referendum, 1955 — Ngô Đình Diệm declared himself president of the newly proclaimed Republic of Vietnam after a fraudulent referendum. The State of Vietnam referendum of 1955 determined the future form of government of the State of Vietnam, the nation that was to… …   Wikipedia

  • transition — n. 1 a passing or change from one place, state, condition, etc., to another (an age of transition; a transition from plain to hills). 2 Mus. a momentary modulation. 3 Art a change from one style to another, esp. Archit. from Norman to Early… …   Useful english dictionary

  • Finite-state machine — State machine redirects here. For infinite state machines, see State transition system. For fault tolerance methodology, see State machine replication. SFSM redirects here. For the Italian railway company, see Circumvesuviana. A finite state… …   Wikipedia

  • Virtual finite state machine — The virtual finite state machine (VFSM) is a concept promoted by [http://www.stateworks.com SW Software] and implemented in their StateWORKS product. A VFSM is a finite state machine (FSM) defined in a virtual environment. The VFSM concept… …   Wikipedia

  • Finite state machine — A finite state machine (FSM) or finite state automaton (plural: automata ) or simply a state machine, is a model of behavior composed of a finite number of states, transitions between those states, and actions. A finite state machine is an… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”