CH-1 IntroToAutomataTheory
CH-1 IntroToAutomataTheory
Theory
Reading: Chapter 1
1
Material / Resources
Text Books
1. John Hopcroft and Jeffrey Ullman, Introduction to
Automata Theory, Languages and Computation, 3Ed,
2000, Addison-Wesley.
2. Automata, Computability and Complexity: Theory and
Applications, Elaine A. Rich Prentice Hall; 1Ed, 2011.
3. Introduction to Computer Theory, by Daniel I. Cohen,
John Wiley and Sons, Inc., 2005, 2Ed.
4. Introduction to Languages and Theory of
Computation, by J. C. Martin, McGraw Hill Book Co.,
2003, 3Ed.
Any other good book on Automata Theory
Course Outlines
Introduction to Formal Proof and Inductive Proofs. The Central Concepts of Automata Theory.
Overview of Formal Languages. Finite Automata. Transition Graphs. Deterministic & Nondeterministic
Finite Automata. Finite Automata With Epsilon Transitions. Conversion from NFA to DFA. Kleene’s
Theorem. Regular Expression and Languages. Finite Automata and Regular Expressions. Applications
of Regular Expressions. Algebraic Laws for Regular Expressions. Properties of Regular Languages.
Proving Languages Not to Be Regular (Pumping Lemma). Closure Properties of Regular Languages.
Decision Properties of Regular Languages. Finite State Machines with Output, Transducers (Moore and
Mealy machines). Context-Free Grammars and Languages. Parse Trees. Applications of Context-Free
Grammars. Ambiguity in Grammars and Languages. Properties of Context-Free Languages. Normal
Forms for Context-Free Grammars. Closure Properties of Context-Free Languages. Chomsky Normal
Form. Pushdown Automata (PDA). Definition of the Pushdown Automaton. The Languages of a PDA,
Equivalence of PDAs and CFGs. Introduction to Turing Machines. The Extension of Turing Machine.
Programming Techniques for Turing Machines Post Turing Machine. Variations on Turing Machine.
Turing Machine Encoding. Universal Turing Machine Defining Computers by Turing Machines.
3
Mathematics of Theory of
Automata
The mathematics employed in the theory of computation is rather
different from the mathematics used in other applied disciplines.
It is generally discrete, in that the emphasis is not on real
numbers and continuous variables, but on finite sets and
sequences.
It is based on very few and elementary concepts, and draws its
power and depth from the careful, extensive, layer-by-layer
manipulation of these concepts-just like the computer.
4
What is Automata Theory?
It is the plural of automation, and it means
“something that works automatically”.
Automata theory is the study of abstract
computational devices and the computational
problems that can be solved using them.
Abstract devices are (simplified) models of real
computations.
In automata we will simulates parts of
computers.
5
Helps in design and construction of different
software's and what we can expect from our
software's.
Automata play a major role in theory of
computation, compiler design, artificial
intelligence.
6
Abstract Machine
A procedure for executing a set of
instructions in some formal language
It is not intended to be constructed as
hardware but are is used in thought
experiments about computability
E.g. Finite State Machine, Turing
Machine
7
Components of Finite State
Machine
8
(A pioneer of automata theory)
English mathematician
9
Theory of Computation: A
Historical Perspective
1930s • Alan Turing studies Turing machines
• Decidability
• Halting problem
11
Programming Languages
Dependency
Both the design and the implementation of
modern programming languages rely heavily
on the theory of context-free languages.
Context-free grammars are used to document
the languages‘ syntax and they form the
basis for the parsing techniques that all
compilers use.
12
Languages & Grammars
Languages: “A language is a
Or “words” collection of sentences of
finite length all constructed
from a finite alphabet of
symbols”
Grammars: “A grammar can
be regarded as a device that
enumerates the sentences
of a language” - nothing
more, nothing less
Regular Context-
(DFA) Context- Recursively-
free
sensitive enumerable
(PDA)
(LBA) (TM)
14
Alphabet
An alphabet is a finite, non-empty set of symbols
We use the symbol ∑ (sigma) to denote an
alphabet
Examples:
Binary: ∑ = {0,1}
All lower case letters: ∑ = {a,b,c,..z}
Alphanumeric: ∑ = {a-z, A-Z, 0-9}
DNA molecule letters: ∑ = {a,c,g,t}
…
15
Valid/In-valid alphabets
While defining an alphabet, an alphabet may contain letters
consisting of group of symbols for example Σ1= {B, aB, bab,
d}.
The BababB (string) can be tokenized in two different ways for
Σ2= {B, Ba, bab, d}:
(Ba), (bab), (B)
(B), (abab), (B)
19
Powers of an alphabet
Let ∑ be an alphabet.
∑* = ∑0 U ∑1 U ∑2 U …
∑ + = ∑ 1 U ∑ 2 U ∑3 U …
20
Defining Languages
The languages can be defined in different ways ,
such as
1. Descriptive definition,
2. Recursive definition,
3. using Regular Expressions(RE) and
4. using Finite Automation(FA) etc.
Example:
Let w = 100011
Q) Is w the language of strings with
equal number of 0s and 1s?
23
Finite State Automata in
Modeling
Systems as diverse as
Parity checkers,
Vending machines,
Communication protocols,
24
Finite Automata : Examples
action
On/Off switch
H
state
ITC
SW
BATTERY
given conclusion
(there are other ways of writing this).
28
Example: Deductive proof
Let Claim 1: If y≥4, then 2y≥y2.
30
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
31
Proving techniques…
By counter-example
Show an example that disproves the claim
32
Different ways of saying the same
thing
“If H then C”:
i. H implies C
ii. H => C
iii. C if H
iv. H only if C
v. Whenever H holds, C follows
33
“If-and-Only-If” statements
“A if and only if B” (A <==> B)
(if part) if B then A ( <= )
(only if part) A only if B ( => )
(same as “if A then B”)
“If and only if” is abbreviated as “iff”
i.e., “A iff B”
Example:
Theorem: Let x be a real number. Then floor of x = ceiling
of x if and only if x is an integer.
Proofs for iff have two parts
One for the “if part” & another for the “only if part”
34
Summary
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
35