You are on page 1of 2

Finite State Machine Automaton (FSA)

 Theoretical way of thinking about how a computer works


◦ it relies on discrete mathematics.

 It can keep track of its history

 There are many states a PC can have


◦ but at any give time it is in exactly one state.

 When the PC gets an input or its program meets some requirement it can transition to a different
state.

 An FSA is defined by:


◦ its initial state
◦ how it transitions
▪ (i.e., the conditions that must be met. Following rules causes it to change its status or
something to happen (e.g., output (this is optional))
◦ synopsis of all of its states.

 [Deterministic finite state machine basically gives us an exact answer


◦ it can accept or reject stings of a finite length and it only give UNIQUE calculation for each
input.

 Non-deterministic FSA basically doesn’t give an exact answer]


◦ Non-deterministic: it has probabilities for each state transition.
▪ i.e., for a particular input you can be sure which state the FSA will move to because Try
mathematically it can in theory move to any combination of states
◦ Finite: limited number of states

 Both types of FSAs are equivalent


◦ i.e., you can make a DFSA that is equivalent to a NDFSA.

In class exercise 1
Now try to think of some examples of FSA in your group.
What is the initial state?
What are the states?
What are the rules to transition?

Once you’ve done that you can look at this link for more examples:
https://www.cs.montana.edu/webworks/projects/oldjunk/theory/theoryOld2/contents/chapter002/sectio
n002/green/page004.html
In class exercise 2
An example of a FSA is a traffic light. Consider one that has five states, the time it is active is shown in
square brackets. What should the time for 5 be?
1.Solid Green + Adv. Left (Green) [15 sec.]
2.Solid Green + Adv. Left (Amber) [5 sec.]
3.Solid Green only [40 sec.]
4.Solid Amber only [10 sec.]
5.Solid Red only [ ? sec.]

You might also like