02.01.2013 Views

Internet Protocol - Research by Kirils Solovjovs

Internet Protocol - Research by Kirils Solovjovs

Internet Protocol - Research by Kirils Solovjovs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Finite-state machine 107<br />

Finite-state machine<br />

A finite-state machine (FSM) or finite-state automaton (plural: automata), or simply a state machine, is a<br />

mathematical model of computation used to design both computer programs and sequential logic circuits. It is<br />

conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a<br />

time; the state it is in at any given time is called the current state. It can change from one state to another when<br />

initiated <strong>by</strong> a triggering event or condition, this is called a transition. A particular FSM is defined <strong>by</strong> a list of its<br />

states, and the triggering condition for each transition.<br />

The behavior of state machines can be observed in many devices in modern society which perform a predetermined<br />

sequence of actions depending on a sequence of events they are presented with. Simple examples are vending<br />

machines which dispense products when the proper combination of coins are deposited, elevators which drop riders<br />

off at upper floors before going down, traffic lights which change sequence when cars are waiting, and combination<br />

locks which require the input of combination numbers in the proper order.<br />

Finite-state machines can model a large number of problems, among which are electronic design automation,<br />

communication protocol design, language parsing and other engineering applications. In biology and artificial<br />

intelligence research, state machines or hierarchies of state machines have been used to describe neurological<br />

systems and in linguistics—to describe the grammars of natural languages.<br />

Considered as an abstract model of computation, the finite state machine is weak; it has less computational power<br />

than some other models of computation such as the Turing machine. [1] That is, there are tasks which no FSM can do<br />

but a Turing machine can do. This is because the FSM has limited memory. The memory is limited <strong>by</strong> the number of<br />

states.<br />

FSMs are studied in the more general field of automata theory.<br />

Example: a turnstile<br />

An example of a very simple mechanism that can<br />

be modeled <strong>by</strong> a state machine is a turnstile. [2][3] A<br />

turnstile, used to control access to subways and<br />

amusement park rides, is a gate with three rotating<br />

arms at waist height, one across the entryway.<br />

Initially the arms are locked, barring the entry,<br />

preventing customers from passing through.<br />

Depositing a coin or token in a slot on the turnstile<br />

unlocks the arms, allowing them to rotate <strong>by</strong><br />

one-third of a complete turn, allowing a single<br />

customer to push through. After the customer<br />

passes through, the arms are locked again until<br />

another coin is inserted.<br />

The turnstile has two states: Locked and<br />

Unlocked. [2] There are two inputs that affect its<br />

state: putting a coin in the slot (coin) and pushing<br />

the arm (push). In the locked state, pushing on the<br />

arm has no effect; no matter how many times the<br />

input push is given it stays in the locked state.<br />

State diagram for a turnstile [2]<br />

A turnstile

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!