Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9902

Re: (Maybe off topic) Can someone explain what a finite state machine is?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; 'received:verizon.net': 0.07; 'sadly': 0.07; 'terry': 0.07; 'closed,': 0.09; 'machines.': 0.09; 'mentions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'switches': 0.09; 'variables.': 0.09; 'am,': 0.13; 'wrote:': 0.15; 'alarm': 0.16; 'confusing.': 0.16; 'd2,': 0.16; 'example).': 0.16; 'helpful,': 0.16; 'pushes': 0.16; 'reedy': 0.16; 'said.': 0.16; 'stationary': 0.16; 'subject: \n ': 0.16; 'subject:topic': 0.16; 'switching': 0.16; 'two.': 0.16; 'possibly': 0.16; 'have,': 0.17; 'stick': 0.19; 'jan': 0.19; 'input': 0.21; 'maybe': 0.22; 'header :In-Reply-To:1': 0.22; 'settings': 0.22; 'assume': 0.23; '(on': 0.23; 'hey': 0.26; 'bit': 0.28; 'server': 0.29; 'finite': 0.30; 'subject:?': 0.31; 'does': 0.32; 'anyone': 0.33; 'actually': 0.33; 'to:addr:python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'it?': 0.34; 'there': 0.34; 'light': 0.34; '(as': 0.34; 'lamp': 0.35; 'switch': 0.35; '(for': 0.36; 'explain': 0.36; 'familiar': 0.36; 'useful': 0.37; 'engineering,': 0.37; 'everyone.': 0.37; 'opposed': 0.37; 'unless': 0.37; 'model': 0.37; 'but': 0.37; 'several': 0.37; 'another': 0.38; 'received:org': 0.38; 'two': 0.38; 'common': 0.39; 'header:Mime- Version:1': 0.39; 'sets': 0.39; 'client': 0.39; 'either': 0.39; 'to:addr:python.org': 0.39; 'did': 0.40; 'background': 0.40; 'love': 0.62; 'car': 0.62; 'back': 0.63; 'states': 0.65; 'cause': 0.69; 'engine': 0.71; 'automatic': 0.73; 'door': 0.73; 'hand,': 0.76; 'article': 0.76; 'products,': 0.78; 'states,': 0.80; 'complication': 0.84; 'computers.': 0.84; 'flagged': 0.84; 'ignition': 0.84; 'machines,': 0.84; 'settings:': 0.84; 'temperature,': 0.84; 'cars': 0.91; 'hooked': 0.91; 'open,': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: (Maybe off topic) Can someone explain what a finite state machine is?
Date Tue, 19 Jul 2011 13:49:02 -0400
References <CAHUGJcHXYxM0zn5shFbhht_DOkkAFYK9ymt6nNeAYxwpD25Xcw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-74-109-121-73.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11
In-Reply-To <CAHUGJcHXYxM0zn5shFbhht_DOkkAFYK9ymt6nNeAYxwpD25Xcw@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1264.1311097758.1164.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1311097758 news.xs4all.nl 23957 [2001:888:2000:d::a6]:37576
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9902

Show key headers only | View raw


On 7/19/2011 9:32 AM, Matty Sarro wrote:
> Hey everyone. I am currently reading through an RFC, and it mentions
> that a client and server half of a transaction are embodied by finite
> state machines. I am reading through the wikipedia article for finite

That was going to be my first suggestion, but I see that it is flagged 
as possibly confusing. You *might* find the article on Turing machines 
more helpful, as they are finite-state machines that compute, and the 
base model for digital (as opposed to analog) computers.

> state machines, and sadly it's going a bit above my head. I don't
> really have a background in engineering, and would really love to
> understand what is being said. Does anyone have a simple way to
> explain it?

You did not say what background you do have, so I will assume you are 
familiar with cars and light switches. The piston chamber in a car 
engine has several continuous variables. Temperature, pressure, 
concentration of nitrogen, oxygen, fuel, and combustion products, and 
position and velocity of the piston. It is a continuous-state machine.

A lamp switch, on the other hand, is the simplest-possible useful finite 
state machine. It has two states (on and off) and just one input 
(rotate) that switches between the two. A vertically mounted wall light 
switch has two inputs (push-up and push-down) that each either switch 
the state or leave it the same.

Back to cars. The transmission is a finite-state machine. It has a small 
finite set of gear settings: P, R, N, D, D2, L (for one example). The 
inputs are pushes (push right-left, up-down, or maybe both) on a gear 
stick that either switches to another state or stays in the original 
state. Ignition key settings are similar. In modern cars, the two are 
interlinked. For automatic transmissions, there is the additional 
complication that switching from N to D while stationary actually 
switches from N to L, and gear switch inputs are generated by the car as 
well as by the driver.

The common feature of finite state machines are finite sets of states, 
inputs, and outputs. Inputs may cause a switch to another state and an 
output. Another everyday example: a house door can be open, closed, 
locked, dead-bolted, or both, and maybe barred. There are input actions 
but no outputs, unless the door is hooked to an alarm system, which is 
another finite-state system.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: (Maybe off topic) Can someone explain what a finite state machine is? Terry Reedy <tjreedy@udel.edu> - 2011-07-19 13:49 -0400

csiph-web