Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
State-transition table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == An example of a state-transition table together with the corresponding [[state diagram]] for a finite-state machine that accepts a string with an even number 0s is given below: :{| class="wikitable" style="text-align: center; display: inline-table; vertical-align:top;" |+ State-transition table ! {{diagonal split header|<small>Current state</small>|<small>Input</small>}} ! 0 !! 1 |- ! S<sub>1</sub> | S<sub>2</sub> || S<sub>1</sub> |- ! S<sub>2</sub> | S<sub>1</sub> || S<sub>2</sub> |} {| style="text-align: center; display: inline-table; vertical-align:top;" |+ '''State diagram''' |- | [[File:FSM state diagram.png|200px|FSM state diagram]] |} In the state-transition table, all possible inputs to the finite-state machine are enumerated across the columns of the table, while all possible states are enumerated across the rows. If the machine is in the state S<sub>1</sub> (the first row) and receives an input of 1 (second column), the machine will stay in the state S<sub>1</sub>. Now if the machine is in the state S<sub>1</sub> and receives an input of 0 (first column), the machine will transition to the state S<sub>2</sub>.<br> In the state diagram, the former is denoted by the arrow looping from S<sub>1</sub> to S<sub>1</sub> labeled with a 1, and the latter is denoted by the arrow from S<sub>1</sub> to S<sub>2</sub> labeled with a 0. This process can be described statistically using [[Markov Chains]]. For a [[Nondeterministic finite automaton|nondeterministic finite-state machine]], an input may cause the machine to be in more than one state, hence its [[Nondeterministic programming|non-determinism]]. This is denoted in a state-transition table by the set of all target states enclosed in a pair of braces {}. An example of a state-transition table together with the corresponding state diagram for a nondeterministic finite-state machine is given below: :{| class="wikitable" style="text-align: center; display: inline-table; vertical-align:top;" |+ State-transition table ! {{diagonal split header|<small>Current state</small>|<small>Input</small>}} ! 0 !! 1 |- ! S<sub>1</sub> | S<sub>2</sub> || S<sub>1</sub> |- ! S<sub>2</sub> | {S<sub>1</sub>, S<sub>2</sub>} || S<sub>2</sub> |} {| style="text-align: center; display: inline-table; vertical-align:top;" |+ '''State diagram''' |- | [[File:NFSM state diagram.png|200px|NFSM state diagram]] |} If the machine is in the state S<sub>2</sub> and receives an input of 0, the machine will be in two states at the same time, the states S<sub>1</sub> and S<sub>2</sub>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)