Professional Documents
Culture Documents
MTH-352
Discrete Mathematics
FSM
• An Information-Processing machine is a
device/system that
– Accepts input
– Produce output
Information
INPUT Processing OUTPUT
Machine
Examples:
• 9 7 16
Examples:
t=0
Finite State Machine (FSM)
• State Tables
- Table giving information of transitions of
states
• State diagrams
– Are labeled digraphs
Diagraph Notation
Initial state
q
Transition (on input q) :The transitions are represented
by arcs. The arcs are labeled with the input that
initiates the transition.
Types of FSM
Finite State Machine with Output
c
Non-Deterministic Finite Automaton (NDFA)
c
Example
c
Example
c
FINITE STATE MACHINES AS MODELS OF
PHYSICAL SYSTEMS
State 00 10 01 11 output
S0 S0 S1 S1 S2 0
S1 S0 S1 S1 S2 1
S2 S1 S2 S2 S3
0c
S3 S1 S2 S2 S3 1c
Example: BINARY ADDITION
State 00 10 01 11 output
S0 S0 S2 S2 S1 0
S1 S2 S1 S1 S3 0c
S2 S0 S2 S2 S1 1
S3 S2 S1 S1 S3 1c
Example: BINARY ADDITION
• The first symbol seen by the head is a 0, and the instructions say
that when reading a 0, it should write a 1 and move left.
• Moving left, it then reads a 1, which according to the instructions
means it should write a 0 and move left.
• It then reads another 1, writes a 0 and moves left, and finally reads
a blank at which point the program halts.
• So this Turing machine is designed to flip bits. It changes 0s to 1s
and 1s to 0s.
• The instructions for this Turing machine only had one state, but
more complex Turing machines can be built using multiple states.
•
Example: A Turing Machines
Explain the Turing machine with three states and explain the
instructions of working
Definition of Turing Machines
(s1, 1, s2, 0, L)
(s2, 1, s3, 0, R)
Not defined
.