Finite State Machine by M. Arokiasamy

348 views 24 slides Feb 18, 2020
Slide 1
Slide 1 of 24
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24

About This Presentation

Power point presentation on Finite state machine by M. Arokiasamy.


Slide Content

Introduction
to

1.Information-Processing Machine (IPM)
2.Examples.
3.Machines withmemory.
4.Machines withoutmemory.
5.What is a state?
6.Definition of Finite State machines(FSM).
7.Binary Devices and States.
8.Digital Computers-Are they FSM?
9.Properties of FSM.
10.Graphical representation of states.
11.Representation of FSM.

INFORMATION -PROCESSING MACHINE
ByanInformation-ProcessingMachine(IPM)we
meanadevicethatreceivesasetofinputsignalsand
producesacorrespondingsetofoutputsignalsas
illustratedinfigure.
IPM
Input Output
Signal Signals

Example
A (Table) lamp is an Information
Processing Machine
Input Signal : UP or DOWN position
of the switch
Output Signal: LIGHT or DARK.

In general, the input signals to an IPM change
with time.
In that case, the output signals will also
change with time accordingly.
i.e., in general an IPM receives a (time)
sequence of input signals and produces a
corresponding(time) sequence of output
signals.

In the example of Table lamp, the corresponding to the
sequence of input signals
UP DOWN DOWN UP DOWN UP UP…
There is a sequence of output signals
LIGHT DARK DARK LIGHT DARK LIGHT LIGHT…

Theoutputsignalatanyinstantdependsonlyon
theinputsignalatthetime,anddoesnotdepend
ontheinputsignalsbeforethatinstant.
Ontheotherhand,inthecaseofcalculator
(scientific)orcomputertheoutputsignalatany
instantdependsNOTonlyontheinputsignalat
thatinstantbutalsointheprecedinginput
signals.

MACHINES
1.Machines withmemory.
2. Machines withoutmemory

.
For a machine without memory its output at any
instant depends ONLY on the input at that instant.
The Table lamp is an example of machine without
memory.
Machines without memory

For a machine with memory, its output at any instant
depends on the input at that instant as well as on the input
at previous instants because the machine can remember
“what has happened in the past”
Clearly a Calculator and a Computer can remember what
had happened in the past.
Machines with memory

To describe past events, we introduce the notion of a
STATE.
A STATErepresents a summary of the past
history of the machine
Further more, as additional input signals arrive, the
machine will go from one state to another(NEXT
STATE) since it needs to update the summary of its
history.

A machine with a finite number of states is
called a finite state machine.

Wethinkofamachineasasystemthatcan
acceptinput,possiblyproducesoutput,and
havesomesortofinternalmemorythatkeep
trackofcertaininformationaboutprevious
inputs.
Thecompleteinternalconditionofthe
machineandallofitsmemory,atany
particulartime,issaidtoconstitutetheSTATE
ofthemachineatthattime.

Thedevicessuchasmechanicalswitches,diodes,
magneticdipoles,andtransistorsaretwostate(or
binary)devices.
Thetwostatesmayberealizedascurrentorno
current,magnetizedornotmagnetized,high
potentialorlowpotential,closedoropen,andonor
off.
Normallycurrentissimplydenotedby1anno
currentisdenotedby0.
Fromamathematicalstandpoint,wemaythinkthat
anytwostatedeviceconsistsofonlytwostates
namely0or1.

Sofarwehavelearnedtheconceptswhichispurely
mathematicalinnature.
EgSets,Relations,Functions,productofsets,
Graphsetc..
Nowweencounterthenotionthatwouldbeusedto
characterizemathematicallythefunctioningofthe
digitalcomputers.

Althoughtherearemanykindsofdigital
computers,theyareallFinite-state
machines(Finiteautomata)inthesenseof
havingthefollowingproperties
PropertiesofFiniteMachines-ASSIGNMENT!
[Reference:ModernAppliedAlgebrabyGarrettBirkhoff&
ThomasC.Bartee(pg.64-65)]

Almostalldigitalcomputers(digitalmachinesofanysort)
arecomposedofCircuitsandotherdeviceswhichare
bistableintheiroperation.
Justastheelectronicalsignalsusedindigitalcomputers,
thecircuitsarealsodesignedsothattheyarestablein
onlytwostables.
Thestateofanymachine(automation)consistingofa
finitenumberofbistabledevices.

Definition:
A Finite State machineor Finite State Automatonis specified
by the following six things:
(i)A finite set of states S={s
0, s
1, s
2,..}.
(ii)A special element of the set S, s
ois referred to as the initial
state.
(iii) A finite set of input letters I={i
1, i
2, i
3 ,…} .
(iv) A finite set of output letters O={o
1, o
2, o
3,…}.
(v) A function ƒ : SxI S , referred to as the TRANSITION
function.
(vi) A function g : SxI O , referred to as the OUTPUTfunction.

Atanyinstant,aFSMisinoneofits
states.
Uponthearrivalofaninputletter,the
machinewillgotoanotherstate
accordingtothetransitionfunction.
Furthermore,ateachstatethemachine
producesanoutputletteraccordingto
theoutputfunction.
Attheverybeginning,themachineisin
itsinitialstateS
0.

AFSMisthereforedefined
mathematicallybythreesetsS,I,and
Oandtwofunctionsfandg.
Itactsby‘reading’or‘accepting’a
sequenceorstringofinputsymbols
(theprogram)andthen‘printing’or
‘delivering’,outputsymbols.

i
k
S
0
o
k
s
j
A FSM starts in some internal state S
0(initial state)
then it reads the first input symbol i
k.
ThecombinationofS
0andi
kcausesanoutput
symbolo
ktobeproducedthroughtheoutput
functiongandthemachinegoestothenewstateS
j
asdirectedbythetransitionfunctionf.
Afterthis,themachinereadsthenextinputsymbol,
andsoonuntilitfinishesthestring.

i
k
S
0
o
k
s
j
The above diagram can be redrawn as:
S
0 s
j
I
k , o
k
OR
Initial
State
Next
State
Input, output

Representation of FSM
There are two ways of representing a FSM
1. State Table.
2. State Diagram
Tags