SlideShare a Scribd company logo
1 of 63
THEORY OF COMPUTATION
Lecture One:
Automata Theory
1Er. Deepinder KaurAutomata Theory
Theory of Computation
In theoretical computer science and mathematics,
the theory
of computation is the branch that deals with how efficiently
problems can be solved on a model of computation, using an
algorithm. The field is divided into three major branches:
• automata theory,
• computability theory
• computational complexity theory.
Er. Deepinder Kaur 2Automata Theory
Automata theory
• The word “Automata“ is the plural of “automaton" which
simply means any machine.
• automata theory is the study of abstract machines and
problems they are able to solve.
• Automata theory is closely related to formal language
theory as the automata are often classified by the class of
formal languages they are able to recognize.
Er. Deepinder KaurAutomata Theory 3
Abstract Machine
• An abstract machine, also called an abstract computer, is a
theoretical model of a computer hardware or software system
used in Automata theory.
Er. Deepinder KaurAutomata Theory 4
Applications of Automata
• A variety of properties concerning the models, grammars, and
languages will be proven.
• These algorithms form the basis of tools for processing languages,
e.g., parsers, compilers, assemblers, etc.
• Other algorithms will form the basis of tools that automatically
construct language processors, e.g., yacc, lex, etc.
– Note that our perspective will be similar to, yet different from a compiler
class.
• Additionally, some things will be proven to be non-computable,
e.g., the enhanced compiler.
Automata Theory 5Er. Deepinder Kaur
Automaton
• An automaton is an abstract model of a digital
computer
• It has a mechanism to read input (string over a given
alphabet, e.g. strings of 0’s and 1’s on Σ = {0,1})
written on an input file.
• A finite automaton has a set of states
• Its control moves from state to state in response to
external “inputs”
Automata Theory 6Er. Deepinder Kaur
Automaton
• With every automaton, a transition function is
associated which gives the next state in terms of
the current state
• An automaton can be represented by a graph in
which the vertices give the internal states and the
edges transitions
• The labels on the edges show what happens (in
terms of input and output) during the transitions
Automata Theory 7Er. Deepinder Kaur
Components of an automaton
• Input file : Contains strings of input symbols
• Storage unit: consists of an unlimited number of
cells, each capable of holding a single symbol
from an alphabet
• Control unit : can be in any one of a finite
number of internal states and can change states
in defined manner
Automata Theory 8Er. Deepinder Kaur
Some Terms used in automaton theory
• Alphabets-Everything in mathematics is based on symbols. This
is also true for automata theory. Alphabets are
defined as a finite set of symbols. An example of
alphabet is a set of decimal numbers
∑={0,1,2,3,4,5,6,7,8,9}
• Strings- A string is a finite sequence of symbols selected from some
alphabet
If ∑ {a,b} is an alphabet then abab is string over alphabet ∑. A
string is generally denoted by w. The length of string is denoted by |
w|
• Empty string is string with zero occurrence of symbols . This string is
represented by є
Automata Theory 9Er. Deepinder Kaur
• The set of strings, including empty, over an alphabet ∑ is
denoted by ∑*.
• ∑+
= ∑* -{є}
• Languages-A set of strings which are chosen from some ∑*,
where ∑ is a particular alphabet, is called a language . If ∑ is
an alphabet, and L subset of ∑*, then L is said to be
language over alphabet ∑. For example the language of all
strings consisting of n 0’s followed by n 1’s for some n>=0:
{є,01,0011,000111,-------}
Automata Theory 10Er. Deepinder Kaur
• Langauge in set forms-
{w|some logical view about w}
e.g {an
bn
|n>=1}
• Kleene closure- Given an alphabet, a language in
which any string of letters from ∑ is a word, even
the null string, is called closure of the alphabet . It is
denoted by writing a star, after the name of
alphabet as a superscript ∑*.
Automata Theory 11Er. Deepinder Kaur
Finite Automaton
• One of the powerful models of computation which
are restricted model of actual computer is called
finite automata. These machines are very similar to
CPU of a computer .They are restricted model as
they lack memory.
• Finite automation is called finite because number of
possible states and number of letter in alphabet are
both finite and automation because the change of
state is totally governed by the input.
Automata Theory 12Er. Deepinder Kaur
2.2 Deterministic Finite Automata
– graphic model for a DFA
13Automata Theory Er. Deepinder Kaur
Main parts of pictorial representation of Finite
machine
• Strings are fed into device by means of an input tape which is
divided into square with each symbol in each square.
• Main part of machine is a black box which serve that what symbol is
written at any position on input tape by means of a movable
reading head
• P0,p1,p2,p3,p4 are the states in finite control system and x and y
are input symbols.
• At regular intervals, the automation reads one symbol from input
tape and then enters in a new state that depends only on current
state and the symbol just read.
Automata Theory 14Er. Deepinder Kaur
Main parts of pictorial representation of Finite
machine
• After reading an input symbol, reading head moves one square to
the right on input tape so that on next move, it will read the symbol
in next tape square. This process is repeated again and again
• Automation then indicates approval or disapproval
• If it winds up in one of the final states, the input string is considered
to be accepted. The language accepted by the machine is the set of
strings it accepts.
Automata Theory 15Er. Deepinder Kaur
DFA:
Deterministic Finite Automaton
• An informal definition (formal version later):
– A diagram with a finite number of states represented
by circles
– An arrow points to one of the states, the unique start
state
– Double circles mark any number of the states as
accepting states
– For every state, for every symbol in Σ, there is exactly
one arrow labeled with that symbol going to another
state (or back to the same state)
Automata Theory
Er. Deepinder Kaur
Finite Automata FA
• Its goal is to act as a recognizer for specific a
language/pattern.
• Any problem can be presented in form of
decidable problem that can be answered by
Yes/No.
• Hence FA (machine with limited memory) can
solve any problem.
17Automata Theory Er. Deepinder Kaur
Deterministic Finite Automata DFA
FA = “a 5-tuple “ (Q, Σ, , q0, F)
1. Q: {q0, q1, q2, …} is set of states.
2. Σ: {a, b, …} set of alphabet.
3. (delta): represents the set of transitions that FA can
take between its states.
 : Q x Σ→Q
Q x Σ to Q, this function:
 Takes a state and input symbol as arguments.
 Returns a single state.
 : Q x Σ→Q
4. q0 Q is the start state.
5. F Q is the set of final/accepting states.
18
∈
⊂
Automata Theory Er. Deepinder Kaur
Transition function 
: Q x Σ→Q
Maps from domain of (states, letters) to range
of states.
19
(q0, a)
(q2, b)
(q1, b)
q1
q2
q3
Automata Theory Er. Deepinder Kaur
Transition function 
• : Q x Σ→Q
• Maps from domain of (states, letters) to range
of states.
20
(q0, a)
(q2, b)
(q1, b)
q1
q2
q3
Automata Theory Er. Deepinder Kaur
How does FA work?
1. Starts from a start state.
2. Loop
Reads a sequence of letters
1. Until input string finishes
2. If the current state is a final state then
Input string is accepted.
1. Else
Input string is NOT accepted.
• But how can FA be designed and represented?
21Automata Theory Er. Deepinder Kaur
Transition System
FA = “a 5-tuple “ (Q, Σ, , q0, F)
1. Q: {q0, q1, q2, …} is set of states.
2. Σ: {a, b, …} set of alphabet.
3. (delta): represents the set of transitions that FA can
take between its states.
 : Q x Σ→Q
Q x Σ to Q, this function:
 Takes a state and input symbol as arguments.
 Returns a single state.
 : Q x Σ→Q
4. q0 Q is the start state.
5. F Q is the set of final/accepting states.
22
∈
⊂
Automata Theory Er. Deepinder Kaur
Transition System
Transition Diagrams Transition Tables
23Automata Theory Er. Deepinder Kaur
Transition Diagram Notations
• If any state q in Q is the starting state then
it is represented by the circle with arrow as
• Nodes corresponding to accepting states
are marked by a double circle
q
Automata Theory 24Er. Deepinder Kaur
Transition Diagram
Can be represented by directed labeled graph/Transition table
Vertex is a state
States= nodes
Starting/Initial state denoted by circle and arrow/-
Final state(s) denoted by two concentric circles/+
Other states with circle
Transition function  =directed arrows connecting states.
25
S1
S2
b
a a,b
Automata Theory Er. Deepinder Kaur
Alternative Representation: Transition
Table
26
0 1
A A B
B A C
C C C
Rows = states
Columns =
input symbols
Final states
starred
*
*Arrow for
start state
Automata Theory Er. Deepinder Kaur
Acceptability of a string
A string is accepted by a transition system if
• There exist a path from initial state to final
state
• Path traversed is equal to w
27Automata Theory Er. Deepinder Kaur
Example1.1
• Build an FA that accepts only aab
28
S1
-
S3
a
S2
a b
+
S4
a b
S1 S2 ?
S2 S3 ?
S3 ? ?
S4 ? ?
Automata Theory Er. Deepinder Kaur
Example withTransition Table
29
0 1
A C B
B D A
C A D
D B C
*
Check for 110101
Automata Theory Er. Deepinder Kaur
Example withTransition Table
30
Solution:-
(A,110101)= (B,10101)
(A,0101)
(C,101)
(D,01)
(B,1)
A*Automata Theory Er. Deepinder Kaur
Automata Theory 31
Properties of transition function
1. (q,λ)=q
• It comes back to same state
• It requires an input symbol to change the
state of a system.
2. (q,aw)=((q,a),w)
(q,w,a)=((q,w),a)
Er. Deepinder Kaur
Facts in designing FA
First of all we have to analyze set of strings.
Make sure that every state is check for output state
and for every input symbol from given set.
No state must have two different outputs for single
input symbol
There must be one initial and atleast one final state
in FA
32Automata Theory Er. Deepinder Kaur
Language of a DFA
• Automata of all kinds define languages.
• If A is an automaton, L(A) is its language.
• For a DFA A, L(A) is the set of strings
labeling paths from the start state to a final
state.
• Formally: L(A) = the set of strings w such
that δ(q0, w) is in F.
33Automata Theory Er. Deepinder Kaur
Language
• A language is a set of strings.
For example, {0, 1}, {all English words}, {0, 0, 0, ...} are
all languages.
Automata Theory 34Er. Deepinder Kaur
Example #8:
• Let Σ = {0, 1}. Give DFAs for {}, {ε}, Σ*
, and Σ+
.
For {}:
For Σ*
: For Σ+
:
Er. Deepinder Kaur
0/1
q0
0/1
q0
0/1
q0 q1
0/1
Automata Theory 35
Example: Design a FA that accepts set of strings such that every string
ends in 00, over the alphabet
{0,1} i,e ∑={0, 1}
Inorder to design any FA, first try to fulfill the
minimum condition.
Start 0 0 0
Being DFA, we must check every input symbol for
output state from every state. So we have to decide
output state at symbol 1 from q0,q1 and q2. Then it
will be complete FA
q0 q1 q2
Automata Theory 36Er. Deepinder Kaur
• 1 0 0
start 0
1 1
q0 q1 q2q2
Automata Theory 37Er. Deepinder Kaur
Ex 2 –
• Construct a DFA that accepts a’s and b’s and
‘aa’ must be substring
38Automata Theory Er. Deepinder Kaur
Example: String in a Language
39
Start
a
20 1
a
Minimal condition : aa
Automata Theory Er. Deepinder Kaur
Example: String in a Language
40
Start
There may be aabbaa.bbbbaa,aa,aab,aabb,….
a
20 1
a
b
Automata Theory Er. Deepinder Kaur
Example: String in a Language
41
Start
a
b
A CB
a
b a,b
.
Automata Theory Er. Deepinder Kaur
Ex : (0+1)*00(0+1)*
• Idea: Suppose the string x1x2 ···xn is on
the tape. Then we check x1x2, x2x3, ...,
xn-1xn in turn.
• Step 1. Build a checker
0 0
Automata Theory 42Er. Deepinder Kaur
• Step 2. Find all edges by the following
consideration:
Consider x1x2.
• If x1=1, then we give up x1x2 and continue to
check x2x3. So, we have δ(q0, 1) = q0.
• If x1x2 = 01, then we also give up x1x2 and
continue to check x2x3. So,
δ(q1, 1) = δ(q0, 1) =q0.
• If x1x2 = 00, then x1x2··· xn is accepted for any
x3···xn. So, δ(q2,0)=δ(q2,1)=q2.
Automata Theory 43Er. Deepinder Kaur
(0+1)*00(0+1)*
0 0
0
1
1
1
Automata Theory 44Er. Deepinder Kaur
Ex 1
All words that start with “a” over the alphabet
{a,b}
a(a+b)*
Automata Theory 45
1
2b
a 3
a,b
a,b3
Er. Deepinder Kaur
Ex3
• All words that start with triple letter
(aaa+bbb)(a+b)*
Automata Theory 46Er. Deepinder Kaur
Ex3
Automata Theory 47
1-
2a 3
a,b
4
b 5
b
6+
b
a a
Er. Deepinder Kaur
Ex4
• All words with even count of letters having “a” in an
even position from the start, where the first letter is
letter number one. (a+b)a((a+b)a)*
Automata Theory 48Er. Deepinder Kaur
Ex4
Automata Theory 49
-
a,b
Er. Deepinder Kaur
EX5:Construct DFA to accept (0+1)*
0
1
Automata Theory 50Er. Deepinder Kaur
Ex 6:Construct DFA to accept 00(0+1)*
0 0
0
11
1
0 1
Automata Theory 51Er. Deepinder Kaur
(0+1)*(00+01)
0 0
1
1
1
0
0
1
Automata Theory 52Er. Deepinder Kaur
Construct a FA that accepts set of strings where the number of 0s in
every string is multiple of 3 over alphabet ∑={0,1}
1 1 1
start 0 0
0
As 0 existence of 0 is also multiple of 3, we have to consider starting
state as the final state.
q1 q2q0
Automata Theory 53Er. Deepinder Kaur
Design FA which accepts set of strings containing exactly four
1s in every string over alphabet ∑={0,1}
1
q2q4q0 q1 q2
1 1
q3
1
0 0 0
0 0
q5
0/1
star
t
1
q5 is called the trap state or dead state.
Dead states are those states which
transit to themselves for all input
symbols.
Automata Theory 54Er. Deepinder Kaur
Design a FA that accepts strings containing exactly one 1 over alphabet
{0,1}. Also draw the transition table for the FA generated
q2q2q1
1
0 0
q3
0/1
1
start
q3 is the dead state
Automata Theory 55Er. Deepinder Kaur
Transition table for previous problem
δ/∑ 0 1
q1 q1 q2
*q2 q2 q3
q3 q3 q3
Non final state that transit in
self loop for all inputs
Automata Theory 56Er. Deepinder Kaur
Design an FA that accepts the language
L={w ϵ (0,1)*/ second symbol of w is ‘0’ and fourth input is ‘1’}
q0 q3q1 q2
0 1
1/0
1
1/0
0
1/0
q5
0/1
start
q4
Automata Theory 57Er. Deepinder Kaur
Design DFA for the language
L={w ϵ (a,b)*/nb(w) mod 3 > 1}
As given in the language, this can be interpreted that number of b mod 3 has to be
greater than 1 and there is no restriction on number of a’s. Thus it will accept string with
2 bs,5 bs, 8bs and so on.
q0 q1 q2
b b
a a
a
b
star
t
Q={q0,q1,q2}
F={q2}
Automata Theory 58Er. Deepinder Kaur
Design FA over alphabet ∑= {0,1} which accepts the set of strings either
start with 01 or end with 01
q0 q1
q3
q4
q2
0 1
1/0
q5
1
0
1
0
1
0
0
1
start
Automata Theory 59Er. Deepinder Kaur
Example #4:
• Give a DFA M such that:
L(M) = {x | x is a string of 0’s and 1’s and |x| >= 2}
Er. Deepinder Kaur
q1
q0
q2
0/1
0/1
0/1
Automata Theory 60
Example #5:
• Give a DFA M such that:
L(M) = {x | x is a string of (zero or more) a’s and b’s such
that x does not contain the substring aa}
Er. Deepinder Kaur
q2q0
a
a/b
a
q1
b
b
Automata Theory 61
Example #6:
• Give a DFA M such that:
L(M) = {x | x is a string of a’s, b’s and c’s such that x
contains the substring aba}
Er. Deepinder Kaur
q2q0
a
a/b
b
q1
b a
b
q3
a
Automata Theory 62
DFA Practice
• Design a FA which accepts the only input 101
over input set {0,1}
• Strings that end in ab
• Strings that contain aba
• String start with 0 and ends with 1 over {0,1}
• Strings made up of letters in word ‘CHARIOT’
and recognize those strings that contain the
word ‘CAT’ as a substringEr. Deepinder Kaur 63Automata Theory

More Related Content

What's hot

LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxAkhilJoseph63
 
Chomsky & Greibach Normal Forms
Chomsky & Greibach Normal FormsChomsky & Greibach Normal Forms
Chomsky & Greibach Normal FormsRajendran
 
Context free langauges
Context free langaugesContext free langauges
Context free langaugessudhir sharma
 
Context free grammars
Context free grammarsContext free grammars
Context free grammarsRonak Thakkar
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languagesparmeet834
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite AutomataShiraz316
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2shah zeb
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataMohammad Imam Hossain
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free GrammarAkhil Kaushik
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarMdImamHasan1
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFAkunj desai
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingHemantha Kulathilake
 

What's hot (20)

LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptx
 
Chomsky & Greibach Normal Forms
Chomsky & Greibach Normal FormsChomsky & Greibach Normal Forms
Chomsky & Greibach Normal Forms
 
Finite automata
Finite automataFinite automata
Finite automata
 
Context free langauges
Context free langaugesContext free langauges
Context free langauges
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
TOC 7 | CFG in Chomsky Normal Form
TOC 7 | CFG in Chomsky Normal FormTOC 7 | CFG in Chomsky Normal Form
TOC 7 | CFG in Chomsky Normal Form
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous Grammar
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Chomsky Normal Form
Chomsky Normal FormChomsky Normal Form
Chomsky Normal Form
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 

Similar to Automata Theory Lecture on Finite Automata

Patterns, Automata and Regular Expressions
Patterns, Automata and Regular ExpressionsPatterns, Automata and Regular Expressions
Patterns, Automata and Regular ExpressionsDarío Garigliotti
 
Regular expression automata
Regular expression automataRegular expression automata
Regular expression automata성욱 유
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computationprasadmvreddy
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptxRaviMuthamala1
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationnarayan dudhe
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdfFariyaTasneem1
 
Finite automata
Finite automataFinite automata
Finite automataPusp Sunar
 
linear algebra in control systems
linear algebra in control systemslinear algebra in control systems
linear algebra in control systemsGanesh Bhat
 
Finite state automaton
Finite state automatonFinite state automaton
Finite state automatonAmmAr mobark
 
introduction-190804060837.pptx
introduction-190804060837.pptxintroduction-190804060837.pptx
introduction-190804060837.pptxshumPanwar
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyserArchana Gopinath
 

Similar to Automata Theory Lecture on Finite Automata (20)

TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Patterns, Automata and Regular Expressions
Patterns, Automata and Regular ExpressionsPatterns, Automata and Regular Expressions
Patterns, Automata and Regular Expressions
 
Regular expression automata
Regular expression automataRegular expression automata
Regular expression automata
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
Lexical
LexicalLexical
Lexical
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptx
 
Toc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computationToc 1 | gate | Theory of computation
Toc 1 | gate | Theory of computation
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
Finite automata
Finite automataFinite automata
Finite automata
 
Transition System
Transition SystemTransition System
Transition System
 
linear algebra in control systems
linear algebra in control systemslinear algebra in control systems
linear algebra in control systems
 
Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
 
Automata
AutomataAutomata
Automata
 
5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
 
introduction-190804060837.pptx
introduction-190804060837.pptxintroduction-190804060837.pptx
introduction-190804060837.pptx
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
 
CS 5th.pptx
CS 5th.pptxCS 5th.pptx
CS 5th.pptx
 

Recently uploaded

Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 

Automata Theory Lecture on Finite Automata

  • 1. THEORY OF COMPUTATION Lecture One: Automata Theory 1Er. Deepinder KaurAutomata Theory
  • 2. Theory of Computation In theoretical computer science and mathematics, the theory of computation is the branch that deals with how efficiently problems can be solved on a model of computation, using an algorithm. The field is divided into three major branches: • automata theory, • computability theory • computational complexity theory. Er. Deepinder Kaur 2Automata Theory
  • 3. Automata theory • The word “Automata“ is the plural of “automaton" which simply means any machine. • automata theory is the study of abstract machines and problems they are able to solve. • Automata theory is closely related to formal language theory as the automata are often classified by the class of formal languages they are able to recognize. Er. Deepinder KaurAutomata Theory 3
  • 4. Abstract Machine • An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory. Er. Deepinder KaurAutomata Theory 4
  • 5. Applications of Automata • A variety of properties concerning the models, grammars, and languages will be proven. • These algorithms form the basis of tools for processing languages, e.g., parsers, compilers, assemblers, etc. • Other algorithms will form the basis of tools that automatically construct language processors, e.g., yacc, lex, etc. – Note that our perspective will be similar to, yet different from a compiler class. • Additionally, some things will be proven to be non-computable, e.g., the enhanced compiler. Automata Theory 5Er. Deepinder Kaur
  • 6. Automaton • An automaton is an abstract model of a digital computer • It has a mechanism to read input (string over a given alphabet, e.g. strings of 0’s and 1’s on Σ = {0,1}) written on an input file. • A finite automaton has a set of states • Its control moves from state to state in response to external “inputs” Automata Theory 6Er. Deepinder Kaur
  • 7. Automaton • With every automaton, a transition function is associated which gives the next state in terms of the current state • An automaton can be represented by a graph in which the vertices give the internal states and the edges transitions • The labels on the edges show what happens (in terms of input and output) during the transitions Automata Theory 7Er. Deepinder Kaur
  • 8. Components of an automaton • Input file : Contains strings of input symbols • Storage unit: consists of an unlimited number of cells, each capable of holding a single symbol from an alphabet • Control unit : can be in any one of a finite number of internal states and can change states in defined manner Automata Theory 8Er. Deepinder Kaur
  • 9. Some Terms used in automaton theory • Alphabets-Everything in mathematics is based on symbols. This is also true for automata theory. Alphabets are defined as a finite set of symbols. An example of alphabet is a set of decimal numbers ∑={0,1,2,3,4,5,6,7,8,9} • Strings- A string is a finite sequence of symbols selected from some alphabet If ∑ {a,b} is an alphabet then abab is string over alphabet ∑. A string is generally denoted by w. The length of string is denoted by | w| • Empty string is string with zero occurrence of symbols . This string is represented by є Automata Theory 9Er. Deepinder Kaur
  • 10. • The set of strings, including empty, over an alphabet ∑ is denoted by ∑*. • ∑+ = ∑* -{є} • Languages-A set of strings which are chosen from some ∑*, where ∑ is a particular alphabet, is called a language . If ∑ is an alphabet, and L subset of ∑*, then L is said to be language over alphabet ∑. For example the language of all strings consisting of n 0’s followed by n 1’s for some n>=0: {є,01,0011,000111,-------} Automata Theory 10Er. Deepinder Kaur
  • 11. • Langauge in set forms- {w|some logical view about w} e.g {an bn |n>=1} • Kleene closure- Given an alphabet, a language in which any string of letters from ∑ is a word, even the null string, is called closure of the alphabet . It is denoted by writing a star, after the name of alphabet as a superscript ∑*. Automata Theory 11Er. Deepinder Kaur
  • 12. Finite Automaton • One of the powerful models of computation which are restricted model of actual computer is called finite automata. These machines are very similar to CPU of a computer .They are restricted model as they lack memory. • Finite automation is called finite because number of possible states and number of letter in alphabet are both finite and automation because the change of state is totally governed by the input. Automata Theory 12Er. Deepinder Kaur
  • 13. 2.2 Deterministic Finite Automata – graphic model for a DFA 13Automata Theory Er. Deepinder Kaur
  • 14. Main parts of pictorial representation of Finite machine • Strings are fed into device by means of an input tape which is divided into square with each symbol in each square. • Main part of machine is a black box which serve that what symbol is written at any position on input tape by means of a movable reading head • P0,p1,p2,p3,p4 are the states in finite control system and x and y are input symbols. • At regular intervals, the automation reads one symbol from input tape and then enters in a new state that depends only on current state and the symbol just read. Automata Theory 14Er. Deepinder Kaur
  • 15. Main parts of pictorial representation of Finite machine • After reading an input symbol, reading head moves one square to the right on input tape so that on next move, it will read the symbol in next tape square. This process is repeated again and again • Automation then indicates approval or disapproval • If it winds up in one of the final states, the input string is considered to be accepted. The language accepted by the machine is the set of strings it accepts. Automata Theory 15Er. Deepinder Kaur
  • 16. DFA: Deterministic Finite Automaton • An informal definition (formal version later): – A diagram with a finite number of states represented by circles – An arrow points to one of the states, the unique start state – Double circles mark any number of the states as accepting states – For every state, for every symbol in Σ, there is exactly one arrow labeled with that symbol going to another state (or back to the same state) Automata Theory Er. Deepinder Kaur
  • 17. Finite Automata FA • Its goal is to act as a recognizer for specific a language/pattern. • Any problem can be presented in form of decidable problem that can be answered by Yes/No. • Hence FA (machine with limited memory) can solve any problem. 17Automata Theory Er. Deepinder Kaur
  • 18. Deterministic Finite Automata DFA FA = “a 5-tuple “ (Q, Σ, , q0, F) 1. Q: {q0, q1, q2, …} is set of states. 2. Σ: {a, b, …} set of alphabet. 3. (delta): represents the set of transitions that FA can take between its states.  : Q x Σ→Q Q x Σ to Q, this function:  Takes a state and input symbol as arguments.  Returns a single state.  : Q x Σ→Q 4. q0 Q is the start state. 5. F Q is the set of final/accepting states. 18 ∈ ⊂ Automata Theory Er. Deepinder Kaur
  • 19. Transition function  : Q x Σ→Q Maps from domain of (states, letters) to range of states. 19 (q0, a) (q2, b) (q1, b) q1 q2 q3 Automata Theory Er. Deepinder Kaur
  • 20. Transition function  • : Q x Σ→Q • Maps from domain of (states, letters) to range of states. 20 (q0, a) (q2, b) (q1, b) q1 q2 q3 Automata Theory Er. Deepinder Kaur
  • 21. How does FA work? 1. Starts from a start state. 2. Loop Reads a sequence of letters 1. Until input string finishes 2. If the current state is a final state then Input string is accepted. 1. Else Input string is NOT accepted. • But how can FA be designed and represented? 21Automata Theory Er. Deepinder Kaur
  • 22. Transition System FA = “a 5-tuple “ (Q, Σ, , q0, F) 1. Q: {q0, q1, q2, …} is set of states. 2. Σ: {a, b, …} set of alphabet. 3. (delta): represents the set of transitions that FA can take between its states.  : Q x Σ→Q Q x Σ to Q, this function:  Takes a state and input symbol as arguments.  Returns a single state.  : Q x Σ→Q 4. q0 Q is the start state. 5. F Q is the set of final/accepting states. 22 ∈ ⊂ Automata Theory Er. Deepinder Kaur
  • 23. Transition System Transition Diagrams Transition Tables 23Automata Theory Er. Deepinder Kaur
  • 24. Transition Diagram Notations • If any state q in Q is the starting state then it is represented by the circle with arrow as • Nodes corresponding to accepting states are marked by a double circle q Automata Theory 24Er. Deepinder Kaur
  • 25. Transition Diagram Can be represented by directed labeled graph/Transition table Vertex is a state States= nodes Starting/Initial state denoted by circle and arrow/- Final state(s) denoted by two concentric circles/+ Other states with circle Transition function  =directed arrows connecting states. 25 S1 S2 b a a,b Automata Theory Er. Deepinder Kaur
  • 26. Alternative Representation: Transition Table 26 0 1 A A B B A C C C C Rows = states Columns = input symbols Final states starred * *Arrow for start state Automata Theory Er. Deepinder Kaur
  • 27. Acceptability of a string A string is accepted by a transition system if • There exist a path from initial state to final state • Path traversed is equal to w 27Automata Theory Er. Deepinder Kaur
  • 28. Example1.1 • Build an FA that accepts only aab 28 S1 - S3 a S2 a b + S4 a b S1 S2 ? S2 S3 ? S3 ? ? S4 ? ? Automata Theory Er. Deepinder Kaur
  • 29. Example withTransition Table 29 0 1 A C B B D A C A D D B C * Check for 110101 Automata Theory Er. Deepinder Kaur
  • 30. Example withTransition Table 30 Solution:- (A,110101)= (B,10101) (A,0101) (C,101) (D,01) (B,1) A*Automata Theory Er. Deepinder Kaur
  • 31. Automata Theory 31 Properties of transition function 1. (q,λ)=q • It comes back to same state • It requires an input symbol to change the state of a system. 2. (q,aw)=((q,a),w) (q,w,a)=((q,w),a) Er. Deepinder Kaur
  • 32. Facts in designing FA First of all we have to analyze set of strings. Make sure that every state is check for output state and for every input symbol from given set. No state must have two different outputs for single input symbol There must be one initial and atleast one final state in FA 32Automata Theory Er. Deepinder Kaur
  • 33. Language of a DFA • Automata of all kinds define languages. • If A is an automaton, L(A) is its language. • For a DFA A, L(A) is the set of strings labeling paths from the start state to a final state. • Formally: L(A) = the set of strings w such that δ(q0, w) is in F. 33Automata Theory Er. Deepinder Kaur
  • 34. Language • A language is a set of strings. For example, {0, 1}, {all English words}, {0, 0, 0, ...} are all languages. Automata Theory 34Er. Deepinder Kaur
  • 35. Example #8: • Let Σ = {0, 1}. Give DFAs for {}, {ε}, Σ* , and Σ+ . For {}: For Σ* : For Σ+ : Er. Deepinder Kaur 0/1 q0 0/1 q0 0/1 q0 q1 0/1 Automata Theory 35
  • 36. Example: Design a FA that accepts set of strings such that every string ends in 00, over the alphabet {0,1} i,e ∑={0, 1} Inorder to design any FA, first try to fulfill the minimum condition. Start 0 0 0 Being DFA, we must check every input symbol for output state from every state. So we have to decide output state at symbol 1 from q0,q1 and q2. Then it will be complete FA q0 q1 q2 Automata Theory 36Er. Deepinder Kaur
  • 37. • 1 0 0 start 0 1 1 q0 q1 q2q2 Automata Theory 37Er. Deepinder Kaur
  • 38. Ex 2 – • Construct a DFA that accepts a’s and b’s and ‘aa’ must be substring 38Automata Theory Er. Deepinder Kaur
  • 39. Example: String in a Language 39 Start a 20 1 a Minimal condition : aa Automata Theory Er. Deepinder Kaur
  • 40. Example: String in a Language 40 Start There may be aabbaa.bbbbaa,aa,aab,aabb,…. a 20 1 a b Automata Theory Er. Deepinder Kaur
  • 41. Example: String in a Language 41 Start a b A CB a b a,b . Automata Theory Er. Deepinder Kaur
  • 42. Ex : (0+1)*00(0+1)* • Idea: Suppose the string x1x2 ···xn is on the tape. Then we check x1x2, x2x3, ..., xn-1xn in turn. • Step 1. Build a checker 0 0 Automata Theory 42Er. Deepinder Kaur
  • 43. • Step 2. Find all edges by the following consideration: Consider x1x2. • If x1=1, then we give up x1x2 and continue to check x2x3. So, we have δ(q0, 1) = q0. • If x1x2 = 01, then we also give up x1x2 and continue to check x2x3. So, δ(q1, 1) = δ(q0, 1) =q0. • If x1x2 = 00, then x1x2··· xn is accepted for any x3···xn. So, δ(q2,0)=δ(q2,1)=q2. Automata Theory 43Er. Deepinder Kaur
  • 45. Ex 1 All words that start with “a” over the alphabet {a,b} a(a+b)* Automata Theory 45 1 2b a 3 a,b a,b3 Er. Deepinder Kaur
  • 46. Ex3 • All words that start with triple letter (aaa+bbb)(a+b)* Automata Theory 46Er. Deepinder Kaur
  • 47. Ex3 Automata Theory 47 1- 2a 3 a,b 4 b 5 b 6+ b a a Er. Deepinder Kaur
  • 48. Ex4 • All words with even count of letters having “a” in an even position from the start, where the first letter is letter number one. (a+b)a((a+b)a)* Automata Theory 48Er. Deepinder Kaur
  • 50. EX5:Construct DFA to accept (0+1)* 0 1 Automata Theory 50Er. Deepinder Kaur
  • 51. Ex 6:Construct DFA to accept 00(0+1)* 0 0 0 11 1 0 1 Automata Theory 51Er. Deepinder Kaur
  • 53. Construct a FA that accepts set of strings where the number of 0s in every string is multiple of 3 over alphabet ∑={0,1} 1 1 1 start 0 0 0 As 0 existence of 0 is also multiple of 3, we have to consider starting state as the final state. q1 q2q0 Automata Theory 53Er. Deepinder Kaur
  • 54. Design FA which accepts set of strings containing exactly four 1s in every string over alphabet ∑={0,1} 1 q2q4q0 q1 q2 1 1 q3 1 0 0 0 0 0 q5 0/1 star t 1 q5 is called the trap state or dead state. Dead states are those states which transit to themselves for all input symbols. Automata Theory 54Er. Deepinder Kaur
  • 55. Design a FA that accepts strings containing exactly one 1 over alphabet {0,1}. Also draw the transition table for the FA generated q2q2q1 1 0 0 q3 0/1 1 start q3 is the dead state Automata Theory 55Er. Deepinder Kaur
  • 56. Transition table for previous problem δ/∑ 0 1 q1 q1 q2 *q2 q2 q3 q3 q3 q3 Non final state that transit in self loop for all inputs Automata Theory 56Er. Deepinder Kaur
  • 57. Design an FA that accepts the language L={w ϵ (0,1)*/ second symbol of w is ‘0’ and fourth input is ‘1’} q0 q3q1 q2 0 1 1/0 1 1/0 0 1/0 q5 0/1 start q4 Automata Theory 57Er. Deepinder Kaur
  • 58. Design DFA for the language L={w ϵ (a,b)*/nb(w) mod 3 > 1} As given in the language, this can be interpreted that number of b mod 3 has to be greater than 1 and there is no restriction on number of a’s. Thus it will accept string with 2 bs,5 bs, 8bs and so on. q0 q1 q2 b b a a a b star t Q={q0,q1,q2} F={q2} Automata Theory 58Er. Deepinder Kaur
  • 59. Design FA over alphabet ∑= {0,1} which accepts the set of strings either start with 01 or end with 01 q0 q1 q3 q4 q2 0 1 1/0 q5 1 0 1 0 1 0 0 1 start Automata Theory 59Er. Deepinder Kaur
  • 60. Example #4: • Give a DFA M such that: L(M) = {x | x is a string of 0’s and 1’s and |x| >= 2} Er. Deepinder Kaur q1 q0 q2 0/1 0/1 0/1 Automata Theory 60
  • 61. Example #5: • Give a DFA M such that: L(M) = {x | x is a string of (zero or more) a’s and b’s such that x does not contain the substring aa} Er. Deepinder Kaur q2q0 a a/b a q1 b b Automata Theory 61
  • 62. Example #6: • Give a DFA M such that: L(M) = {x | x is a string of a’s, b’s and c’s such that x contains the substring aba} Er. Deepinder Kaur q2q0 a a/b b q1 b a b q3 a Automata Theory 62
  • 63. DFA Practice • Design a FA which accepts the only input 101 over input set {0,1} • Strings that end in ab • Strings that contain aba • String start with 0 and ends with 1 over {0,1} • Strings made up of letters in word ‘CHARIOT’ and recognize those strings that contain the word ‘CAT’ as a substringEr. Deepinder Kaur 63Automata Theory