You are on page 1of 15

FINITE AUTOMATA

Chap-2
FINITE AUTOMATA
 A finite state machine (FSM) or finite state automaton
(plural: automata), or simply a state machine, is a
model of behavior composed of a finite number of states,
transitions between those states, and actions.
 It is similar to a "flow graph" where we can inspect the
way in which the logic runs when certain conditions are
met. A finite state machine is an abstract model of a
machine with a primitive (sometimes read-only) internal
memory.
FINITE AUTOMATA
 We will understand what kinds of things a device with
finite memory can do, and what it cannot do
 Introduce simulation: the ability of one device to
“imitate” another device
 Introduce non-determinism: the ability of a device to
make arbitrary choices
AUTOMATA
 Automata theory, the invention and study of automata,
includes the study of the capabilities and limitations of
computing processes, the manner in which systems
receive input, process it, and produce output, and the
relationships between behavioral theories and the
operation and use of automated devices.
 In theoretical computer science, automata theory is the
study of abstract machines and the problems which they
are able to solve. These abstract machines are called
automata.
AUTOMATA
 An automaton is an abstract model of a digital computer
 It has a mechanism of reading input (input string/file).
 Input string/file can not be change
 The input file is divided into cells, each cell can hold one
symbol at a time
 Automaton produces output which is stored in a temporary
storage device, consisting of an unlimited number of cells
 It has a control unit which can be in any of a finite number of
internal states.
DETERMINISTIC FINITE AUTOMATA
 On each input there is one and only one state to which
the automaton can transition from its current state
 Abbreviation - DFA.
DEFINITION
 A deterministic finite automaton consists of:
1. A finite set of states, often denoted Q
2. A finite set of input symbols, often denoted 
3. A transition function that takes as argument a state and an
input symbol and returns a state, often denoted d, where d:
Q×S→Q
 In graph representation, d was represented by arc
4. A start state q0, one of the states in Q.
5. A set of final or accepting states F. The set F is a subset of
Q.
 DFA in five-tuple notation
A = (Q,  , d , q0, F)
SIMPLER NOTATIONS FOR DFA’S
 There are two preferred notations for defining automata:
 Transition Diagram
 Transition table
TRANSITION DIAGRAMS
 Transition diagram for DFA A = (Q,  , d , q0, F) is a
graph defines as follows:
1. For each state in Q there is a node
2. For each state q in Q and each input symbol a in , let d(q, a)
= p. Then the transition diagram has an arc from node q to
node p, labeled a. If there are several input symbols that
cause transition from q to p, then the transition diagram can
have one arc, labeled by the list of these symbols.
3. There is an arrow into the start state q0, labeled start. This
arrow doesn’t originate at any node
4. Nodes corresponding to accepting states (those in F) are
marked by a double circle. States not in F have a single
circle.
TRANSITION TABLES
 It is a conventional, tabular representation of a function
like d that takes two argument as input & returns a value.
 Rows – states
 Columns – inputs

 Entry for the row corresponding to the state q & the


column corresponding to input a is the state d(q,a)
 Start state is marked with an arrow & accepting states
are marked with a star.
HOW A DFA PROCESSES STRINGS
 The language of the DFA is the set of all strings that the
DFA accepts
 Suppose

 a1, a2, a3, … an is a sequence of input symbols

 Start DFA from it starting state


 Consult transition function, say (q0 , a1) = q1
 Continue in this manner
 If qn is a member of F, then the input a1, a2,… , an is
“accepted” and if not then it is “rejected”
EXAMPLE-1 (TRANSITION DIAGRAM)

1 0 0,1

0 1
q0 q2 q1
EXAMPLE-1 (TRANSITION TABLE)

0 1
q0 q2 q0
*q1 q1 q1
q2 q2 q1
TRANSITION FUNCTION & ITS
EXTENSION
 d: Q × S → Q
 d(q, ) = q
 d (q, w) = d( d(q, x), a)
EXAMPLES
 Every block of five contain atleast 2 a’s – {a,b,c}
 L={ w | na (w) =2 and nb (w)>2 , w Є (a,b)* }

 The set of strings over ∑ (0,1) in which every pair of


adjacent 0’s appear before any pair of adjacent 1’s

You might also like