finite state machines. what is "abstraction"? abstraction unifies multiple and different...

8
Finite State Machines

Upload: sheryl-carr

Post on 04-Jan-2016

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Finite State Machines

Page 2: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

What is "abstraction"? Abstraction unifies multiple and different objects into

one concept describes the common properties of those objects

common properties that are exclusive to those objects.

Examples: Vehicle is an abstraction of car, truck, motorcycle Bird is an abstraction of duck, chicken, dove, eagle etc. Emotion is an abstraction of anger, love, fear, sadness

etc. Abstraction is an essential process in science

It helps identify commonalities and differences It helps focus on important properties a model is an abstraction.

Page 3: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Finite State Machines(automata) A Finite State Machine is an

abstraction of a computing system that consists of States of the system Events (or triggers) that happen

to the system Actions performed by the system Transitions between states

A FSM is usually depicted by its state transition diagram. Also, by the state transition

table.

State(another)

state

S1: Sitting

S2: Standing

S3: Walking

E1: hear "go"

Stand and walk, S3 walk, S3 S3

E2: hear "stop"

(no action), S1 sit, S1

Stop walking, S2

Page 4: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Finite State Machines:Examples A traffic light A soda dispenser A gum ball machine An elevator An ATM

Page 5: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Traffic light FSM

Greenstate

Yellowstate

Redstate

(Event) one-minute timer expired / (Actions) turn off green light,

turn on yellow light set 10-second timer

(Event) 10-second timer expired / (Actions) turn off yellow light,

turn on red light set 1:10 minute timer

(Event) 1:10 min timer expired / (Actions) turn off yellow light,

turn on red light set 1:10 minute timer

Page 6: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Abstraction of a computing machine Finite State Machines cannot abstract all

computers or all that they can do There is another model of a computer that

can solve any problem that any other computer can Alan Turing's Universal Computing Machine

Known as "Universal Turing Machine" or "Turing machine"

Page 7: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of

Universal Turing Machine UTM consists of

A tape of discrete positions The tape is readable and writable Each position contains one symbol

from a set of symbols A head that reads and writes on

the tape A control unit that controls the

tape and the head, and consists of A finite state machine, where:

Every event is about reading a certain symbol

Every action is about writing a symbol and moving forward or backward along the tape

Page 8: Finite State Machines. What is "abstraction"? Abstraction unifies multiple and different objects into one concept  describes the common properties of