Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Finite Automata

Course Code: CSE 3143-0611


Outline:

✓ Finite Automata
✓ Deterministic Finite Automata (DFA)
Finite Automaton
Finite automata is an abstract computing device. It is a mathematical model of
a system with discrete inputs, outputs, states and a set of transitions from state
to state that occurs on input symbols from the alphabet Σ.
Finite Automaton cont.
• Two types of automata:
1. Deterministic: The automaton cannot be in more than one state at any
one time.
2. Non-deterministic: the automaton may be in several states at once.

If the internal state, input and contents of the storage are known,
it is possible to predict the future behaviour of the automaton.
This is said to be deterministic automata otherwise it is
nondeterminist automata.
Deterministic Finite Automata (DFA)
❑ Formal Definition of DFA: A DFA is a collection of 5-tuples same as we
described in the definition of FA.

Q: finite set of states


∑: finite set of the input symbol
Q0: initial state
F: final state
δ: Transition function

Where Transition function can be defined as:


δ: Q x ∑→Q
❑ Graphical Representation of DFA
➢A DFA can be represented by digraphs called state diagram. In which:

I. The state is represented by vertices.


II. The arc labeled with an input character show the transitions.
III. The initial state is marked with an arrow.
IV. The final state is denoted by a double circle
❑ Example:
Q = {q0, q1, q2} ∑ = {0, 1} q0 = {q0} F = {q2}
❑ Example: DFA with ∑ = {0, 1} accepts all starting with 0.
Solution:

Explanation: In the above diagram, we can see that on given 0 as input to DFA in
state q0 the DFA changes state to q1 and always go to final state q1 on starting
input 0. It can accept 00, 01, 000, 001....etc. It can't accept any string which starts
with 1, because it will never go to final state on a string starting with 1.
DFA Example:
DFA Example:
DFA Example
DFA Example
Acceptance

You might also like