UNIT 1 TOC Sem5 RGPV
UNIT 1 TOC Sem5 RGPV
UNIT 1 TOC Sem5 RGPV
Automata
The term “Automata” is derived from the Greek word ““αὐτόματα”” which means “self-
“self
acting”. An automata is an abstract computing device (or machine). There are different
varities of such abstract machines (also called models of computation) which can be
defined mathematically. Some of them are as powerful in principle as today's real
computers, while the simpler ones are less powerful.
The main motivation behind developing the automata theory was to develop methods to
describe and analyse thee dynamic behaviour of discrete systems.
This automaton consists of states and transitions. The State is represented by circles, and
the Transitions is represented by arrows.
Automata is the kind of machine which takes some string as input and this input goes
through a finite number of states and may enter in the final state.
An automaton with a finite number of states is called a Finite Automaton (FA) or Finite
State Machine (FSM).
Example of Automata:
1|Page
Traffic Lights: The optimization of traffic light controllers in a city is a
systematic representation of handling the instructions of traffic rules. Its
process depends on a set of instruction works in a loop with switching among
instruction to control traffic.
Video Games: Video games levels represent the states of automata. In which a
sequence of instructions are followed by the players to accomplish the task.
Text Parsing: Text parsing is a technique which is used to derive a text string
using the production rules of a grammar to check the acceptability of a string.
Finite Automata
Finite automata are used to recognize patterns. It takes the string of symbol as input and
changes its state accordingly. When the desired symbol is found, then the transition
occurs. At the time of transition, the automata can either move to the next state or stay in
the same state. Finite automata have two states, Accept state or Reject state. When the
input string is processed successfully, and the automata reached its final state, then it will
accept.
Related Terminologies
Alphabet
Example − ∑ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’ are symbols.
2|Page
String
Length of a String
Examples −
If S = ‘cabcad’, |S|= 6
Language
Example − If the language takes all possible strings of length 2 over ∑ = {a, b}, then L
= { ab, bb, ba, bb}
Types of Automata:
3|Page
There are two types of finite automata:
1. DFA
In DFA, for each input symbol, one can determine the state to which the machine will move.
Hence, it is called Deterministic Automaton
Automaton.. As it has a finite number of states, the
machine is called Deterministic Finite Machine or Deterministic tic Finite Automaton.
q0 is the initial state from where any input is processed (q0 ∈ Q).
4|Page
2. NFA
In NDFA, for a particular input symbol, the machine can move to any combination of the
states in the machine. In other words, the exact state to which the machine moves cannot
be determined. Hence, it is called Non-deterministic Automaton. As it has finite number
of states, the machine is called Non-deterministic Finite Machine or Non-deterministic
Finite Automaton.
(Here the power set of Q (2Q) has been taken because in case of NDFA, from a state,
transition can occur to any combination of Q states)
q0 is the initial state from where any input is processed (q0 ∈ Q).
Problem :- Draw a DFA for the language accepting strings ending with ‘abba’ over
input alphabets ∑ = {a, b}
Solution-
5|Page
Thus, Minimum number of states required in the DFA = 4 + 1 = 5.
It suggests that minimized DFA will have 5 states.
Step-02:
We will construct DFA for the following strings
strings-
abba
aabba
ababba
abbabba
abbaabba
Step-03:
The required DFA is-
6|Page
Mealy Machines: Mealy machines are also finite state machines with output value and
its output depends on present state and current input symbol. It can be defined as
(Q, q0, ∑, O, δ, λ’) where:
7|Page
Difference between Mealy machine and Moore machine
Solution:
8|Page
o For state q1, there is only one incident edge with output 0. So, we don't need to
split this state in Moore machine.
o For state q2, there is 2 incident edge with output 0 and 1. So, we will split this state
into two states q20( state with output 0) and q21(with output 1).
o For state q3, there is 2 incident edge with output 0 and 1. So, we will split this state
into two states q30( state with output 0) and q31( state with output 1).
o For state q4, there is only one incident edge with output 0. So, we don't need to
split this state in Moore machine.
9|Page
Transition diagram for Moore machine will be:
Example 2:
Solution:
10 | P a g e
The state q1 has only one output. The state q2 and q3 have both output 0 and 1. So we
will create two states for these states. For q2, two states will be q20(with output 0) and
q21(with output 1). Similarly, for q3 two states will be q30(with output 0) and q31(with
output 1).
11 | P a g e
We hope you find these notes useful.
useful
Contribute study material and get list
listed on Hall of Fame and win
cash prize every week.
50 Points : Contributing Per Video.
50 Points : Contributing Per Page Notes Hand Written/ Typed.
50* Points : Contributing Project(If Project is Large then more Points
will be issued).
50 Points : Contributing Other material
NOTE:- Points will be issued only if the material provided by you is approved.
approved
If you have any queries or you want to submit your study notes
please write us at
[email protected]
or
[email protected]
And Fill this form
FORM