Intro To Automata Theory
Intro To Automata Theory
THEORY OF COMPUTATION
CST-352
Introduction to Automata
Theory
Objectives
3
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
• English mathematician
4
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Regular Context-
(DFA) Context- Recursively-
free
sensitive enumerable
(PDA)
(LBA) (TM)
8
Department of Computer and Communication Engineering (CCE)
Alphabet
9
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Strings
10
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Powers of an alphabet
Let ∑ be an alphabet.
– ∑* = ∑0 U ∑1 U ∑2 U …
– ∑+ = ∑1 U ∑2 U ∑3 U …
11
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Languages
L is a said to be a language over alphabet ∑, only if L ∑*
this is because ∑* is the set of all strings (of all possible length
including 0) over the given alphabet ∑
Examples:
1. Let L be the language of all strings consisting of n 0’s followed by n
1’s:
L = {,01,0011,000111,…}
2. Let L be the language of all strings of with equal number of 0’s and
1’s:
L = {,01,10,0011,1100,0101,1010,1001,…}
Example:
Let w = 100011
Q) Is w the language of strings with equal number of 0s
and 1s?
13
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Finite Automata
• Some Applications
– Software for designing and checking the behavior of
digital circuits
– Lexical analyzer of a typical compiler
– Software for scanning large bodies of text (e.g., web
pages) for pattern finding
– Software for verifying systems of all types that have a
finite number of states (e.g., stock market transaction,
communication/network protocol)
14
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
state
Structural expressions
• Grammars
• Regular expressions
– E.g., unix style to capture city names such as “Palo Alto CA”:
• [A-Z][a-z]*([ ][A-Z][a-z]*)*[ ][A-Z][A-Z]
16
University Institute of Engineering (UIE)
Formal Proofs
17
Department of Computer and Communication Engineering (CCE)
Deductive Proofs
given conclusion
Quantifiers
20
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Proving techniques
• By contradiction
– Start with the statement contradictory to the given statement
– E.g., To prove (A => B), we start with:
• (A and ~B)
• … and then show that could never happen
• By induction
– (3 steps) Basis, inductive hypothesis, inductive step
• By contrapositive statement
– If A then B ≡ If ~B then ~A
21
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Proving techniques…
• By counter-example
– Show an example that disproves the claim
22
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
23
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
“If-and-Only-If” statements
24
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
Outcomes
• Automata theory & a historical perspective
• Chomsky hierarchy
• Finite automata
• Alphabets, strings/words/sentences, languages
• Membership problem
• Proofs:
– Deductive, induction, contrapositive, contradiction, counterexample
– If and only if
25
University Institute of Engineering (UIE)
Department of Computer and Communication Engineering (CCE)
FAQ :
References :
• Martin J.C., “Introduction to Languages and Theory of
Computation”, Tata McGraw-Hill Publising Company
Limited, 3rd Edition.
• https://youtu.be/S3cOulqSAmU
• Https://en.wikipedia.org/wiki/Finite-state_machine
• https://www.safaribooksonline.com