Lecture 1 - Chapter 1-Introduction
Lecture 1 - Chapter 1-Introduction
4
Theory of computation: A historical
perspective
(10)*
(0 + 10*) L = { 0, 1, 10, 100, 1000, 10000, … }
(0*10*) L = {1, 01, 10, 010, 0010, …}
(a+b)*abb L={abb, aabb, babb, aaabb, ababb,
…………..}
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
• N. Chomsky, information and
control, vol 2, 1959
8
The central concepts of automata theory
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}
• …
9
Cont….
Strings
A string or word is a finite sequence of symbols
chosen from ∑
• Empty string is (or “epsilon”)
• Length of a string w, denoted by “|w|”, is equal to
the number of (non- ) characters in the string
• E.G., X = 010100 |x| = 6
• X = 01 0 1 00 |x| = ?
11
CONT….
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,…}
DEFINITION:
• A language, L, is a collection of strings over a given alphabet
with some rules known as grammars. It may or may not be
finite.
• A language may be thought of as a subset of all possible strings
(L z Σ*)
• Σ+ =
LANGUAGES
• P = Production Rules
• (Finite set of non-empty rules to makes a string of
Language)
• i.e. P = { S → aSb , S → bSa , S → ∈ }
• 4. S = Start symbol
• Start symbol is used to start the production rule represented
by S.
GRAMMAR
EXAMPLE
Grammar G1: Consider the Grammar 1 (G1) with following
production Rules.
S → aSb
S→∈
Grammar G2: Consider the Grammar 2 (G2) with following
production Rules.
S → aAb / ∈
A → aAb / ∈
GRAMMAR
Regular Context-
(DFA) free Context-
Recursively-
(PDA) sensitive
enumerable
(LBA)
(TM)
Types of Grammars
• Type 3 grammars - regular grammars - is a grammar which is
either left-linear or right-linear
• Left linear – all production have the form A -> bx, A -> x where A
& B are non-terminals and x is any string of terminals
• Right linear – all production have the form A -> xb, A -> x where
A & B are non-terminals and x is any string of terminals
• Type 2 grammars - context free grammars
• Productions are of the form X–> v where v is an
arbitrary string of symbols in V, and X is a single non-terminal.
Types of Grammars
• Type 1 grammars - context-sensitive grammars
• Productions are of the form uXw –> uvw where u, v and w are
arbitrary strings of symbols in V, with v non-null, and X a single
non-terminal.
• In other words, X may be replaced by v but only when it is
surrounded by u and w. (i.e. in a particular context).
• Type 0 Grammars - Free or unrestricted grammars
• These are the most general productions which have the form u –> v
where both u and v are arbitrary strings of symbols in V,
with u non-null.
• There are no restrictions on what appears on the left or
right- hand side other than the left-hand side must be non-empty.
Summary
Grammar Language Automata
33
WHAT IS AUTOMATA THEORY?
• Automata theory is the study of abstract computational devices
• Abstract devices are (simplified) models of real computations
• Computations happen everywhere: on your laptop, on your cell
phone, in nature, …
• An automata is an abstract model of a digital computer (= it is a self
operating machine).
• Every automaton includes some essential features.
• Mechanism for reading input – the input is a string over a given
alphabet written on an input file
• Produce an output in some form
• Have no temporary storage device – the storage cells can be
read and changed.
A SIMPLE COMPUTER
SWITCH
BATTERY
Input: switch
Output: light bulb
Actions (control unit): flip switch
States (storage): on, off
AUTOMATA
^
PROCEDURES OF DEFINING A DFA/NFA
• Defining input alphabet and initial state
• Draw the transition diagram
• Check
• Do all states have out-going arcs labeled with all the input symbols
(DFA)
• Any missing final states?
• Any duplicate states?
• Can all strings in the language can be accepted?
• Are any strings not in the language accepted?
41
WHAT DOES A DFA DO ON
READING AN INPUT STRING?
• Input: a word w in ∑*
• Question: is w acceptable by the DFA?
• Steps:
• Start at the “start state” q0
• For every input symbol in the sequence w do
• Compute the next state from the current state, given
the current input symbol in w and the transition
function
• If after all symbols in w are consumed, the current state is
one of the accepting states (F) then accept w;
• Otherwise, reject w. 42
TRANSITION GRAPH
• A labeled directed graph with designed node as a start node and one
or more final/accept nodes describes a finite automata.
• Notations
1 0
q1 q2 q3
Accepting state
A SIMPLE AUTOMATON (1)
0 1
1 0
q1 q2 q3
start
0,1
accept
q1 q2 q3
0,1
q1 q2 q3
0
1
q0 q2
0, 1
q1
Exercise. Draw transition diagram for the following DFA
• M=({q0, q1, q2, q3 }, , {a, b}, q0, {q3}) where is given as (q0,
a)=
q1, (q0, b) =q2, (q1, a) = q1, (q2, b) = q2, (q1, a) = q3, (q2,
b) = q3
TRANSITION TABLE
• A transition table is a good way to implement a FSA
• One row for each state, S
• One column for each symbol, A
• Entry in cell (S,A) gives the state or set of states can be reached from
state S on input A.
• A deterministic finite automaton (DFA) has a singe state in every cell
(a|b)*abb
INPUT
STATES a b
:QX Σ->Q
{A, B, C} X {a, b}->{A, B,
C}
For every input on a
state there is exactly
one transition.
REVISIT EXAMPLE #1:
1
Q = {Q0, Q1}
Σ = {0, 1} 0
q0 q1 1
START STATE IS Q0
0
F = {Q0}
δ: 0 1
q0 q1 q0
q1 q0 q1
REVISIT EXAMPLE #2:
F = {Q2} b b
δ: a b c
q0 q0 q0 q1
q1 q1 q1 q2
q2 q2 q2 q2
δ^ : (Q x Σ*) –> Q
Formally:
1) δ^(q, Σ) = q, and
2) For all w in Σ* and a in Σ
δ^(q,wa) = δ (δ^(q,w), a)
1
0
q0 q1 1
0
• Is 10 accepted? No, since δ(q0, 10) = q1 is not a final state. The fact
that δ(q1, 10) = q2 is irrelevant, q1 is not the start state!
DEFINITIONS RELATED TO DFAS
- Scan the entire string and if we reach g final state from initial
state.
Acceptance of a language by a FA:
q2
a
• b)
i) *(q0, abbb) = *(T(q0,a), bbb)
= *(q1, bbb)
= *(T(q1,b), bb)
= *(q1, bb)
= *(T(q1,b), b)
= (q1, b)
= q1
So, abbb is accepted by M because q1 e {q1, q2}
• Following the same step as above it can be proved that (ii) abba
is accepted and (iii) bab is rejected
• Construct a DFA that accept all strings over the
alphabets {a, b} where the string length is at
least 2.
- w {a,b} and |w|>2
- Σ = {a, b}
EXAMPLES
• Example: Find a deterministic finite accepter that
recognizes the set of all strings on  = {a, b} starting with the
prefix ab.
• Answer:
LOGIC:
IN START STATE (Q0): B’S AND C’S: IGNORE – STAY IN SAME STATE
b/c a a/b/c
a a
b
q0 q1 q2 q3
c
b/c
Logic: acceptance is straight forward, progressing on each
expected symbol. However, rejection needs special care, in
each state (for DFA, we will see this becomes easier in NFA,
non-deterministic machine)
67
• Give a DFA M such that: L(M) = {x | x is a string of a’s and b’s such
that x contains both aa and bb}
first do, for a language where ‘aa’ comes before ‘bb’
then do its reverse; and then parallelize them. remember, you may have
multiple “final” states, but only one “start” state
a
a b
q1 q2 q3
a b a/b
a
q0 a b q7
b
b b a a
q4 q5 q6
b
EXAMPLE
• Construction of a DFA for the set of string over {a, b} such that length of
the string |w| is divisible by 2 i.e., |w| mod 2 = 0.
Here q0 is a start state and the final state also. Note carefully that a symmetry of 0's
and 1's is maintained. We can associate meanings to each state as:
q0: state of even number of 0's and even number of 1's.
q1: state of odd number of 0's and even number of 1's.
q2: state of odd number of 0's and odd number of 1's.
q3: state of even number of 0's and odd number of 1's.
• Construct DFA for the language accepting strings starting with ‘101’
• All strings start with substring “101”.
• Then the length of the substring = 3.
• Therefore, minimum number of states in the DFA = 3 + 2 = 5.
• The minimized DFA has five states.
• The language l= {101,1011,10110,101101,.........}
• The transition diagram is as follows −
• Let ς = {0, 1}. Give DFAs for {}, {Σ}, Σ*, and Σ+.
0/1
0/1
FOR {}: FOR {Ε}: 0/1
q0 q0 q1
0/1
0/1
0/1
1 0/1 0/1
q0 q1 q2 q3
Is this a DFA?
73
• EXAMPLE #1:
0
q0 q1 1
0
1 0 0 1 1
q0 q0 q1 q0 q0 q0
1 • F = {q2}
start 0
q0 q1 q2 • Transition table
Accepting
state symbols
0 1
• What if the language allows
q0 q1 q0
empty strings?
states
q1 q1 q2
*q2 q2 q2
• Example: empty string or start and end with 0 0/1
0
q0 q1
Q = {q0, q1} 0
Σ = {0, 1}
start state is q0
F = {q0}
δ:
{q1}0 {}1
q0
{q0, q1} {q1}
q1
76
Example
• To construct the DFA for the set of strings containing 011:
78
Non-deterministic finite automata (NFA)
1 qj
qi … • Each transition function therefore
1 maps to a set of states
qk
DEFINITIONS FOR NFAS
• An NFA is a five-tuple:
M = (q, σ, δ, q0, f)
Q a finite set of states
Σ A finite input alphabet
Q0 the initial/starting state, q0 is in Q
F A set of final/accepting states, which is a subset of Q
Δ A transition function, which is a total function from Q x Σ to 2 Q
Δ : (q x σ) –> 2q :2q is the power set of q, the set of all subsets of q
δ(q,s) : The set of all states p such that there is a transition Labeled s from
q to p
Δ(q,s) is a function from q x s to 2q (but not only to q)
HOW TO USE AN NFA?
• Input: a word w in ∑*
• Question: is w acceptable by the NFA?
• Steps:
• Start at the “start state” q0
• For every input symbol in the sequence w do
• Determine all possible next states from all current states, given the
current input symbol in w and the transition function
• If after all symbols in w are consumed and if at least one of the
current states is a final state then accept w;
• Otherwise, reject w.
TRANSITION DIAGRAM
• FA can be represented using transition diagram.
• Corresponding to FA definition, a transition diagram has:
• States represented by circles;
• An alphabet (Σ) represented by labels on edges;
• Transitions represented by labeled directed edges between states. The
label is the input symbol;
• One start state shown as having an arrow head;
• One or more final state(s) represented by double circles.
• Example transition diagram to recognize (a|b)*abb
a b q2 b
q0 q1 q3
b
• Example #1: one or more 0’s followed by one or more 1’s
Σ = {0, 1} 1 0/1
0
START STATE IS Q0 0
q0 q1 1 q2
f = {q2}
δ:
{q0, q01} {}1
q0
{} {q1, q2}
q1
{q2} {q2}
q2
EXAMPLES
• Q = {q0,q1,q2}
• Σ = {0,1}
• start state = q0
• f = {q2}
Transition table
• Example #2: pair of 0’s or pair of 1’s as substring
Q = {q0, q1, q2 , q3 , q4} 0/1 0/1
Σ = {0, 1} 0 0
q0 q3 q4
START STATE IS q0
1 0/1
f = {q2, q4}
1 q2
δ: 0 1 q1
q1 {} {q2}
{q2} {q2}
q2
{q4} {}
q3
{q4} {q4}
q4
Example
Obtain an NFA to accept the following language L = {w | w abab n or
aban where n> 0} The machine to accept either ababn or aban where n
0 is shown below:
b a a
q0 a q1 q2 q3 a
q4
a a
q5 b a
q6 q7
• let Σ = {a, b, c}. give an NFA m that accepts:
L = {x | x is in Σ* and x contains ab}
a/b/c a/b/c
a b
q0 q1 q2
w h i l e
q0 q1 q2 q3 q4 q5
w h i l e
q0 q1 q2 q3 q4 q5 93
94
EQUIVALENCE OF DFAS AND NFAS
• Do DFAs and NFAs accept the same class of languages?
• Is there a language l that is accepted by a DFA, but not by
any NFA?
• Is there a language l that is accepted by an NFA, but not by
any DFA?
• Observation: every DFA is an NFA, DFA is only restricted NFA.
• Therefore, if l is a regular language then there exists an NFA m
such that l = l(m).
• It follows that nfas accept all regular languages.
• But do NFAs accept more? 95
• Lemma 2: let m be an NFA. Then there exists a DFA M’ such that
L(M) = L(M’).
• Proof: (sketch)
Let m = (q, σ, δ,q0,f).
Q’0 = [q0]
96
-->q0
δ for dfa: 0 1 q1
{q1} {}
write as write as
->q0 [q1] []
[q1]
[]
97
• Example of creating a DFA out of an NFA (as per the
constructive proof): 0/1
0
q0 q1
0
δ: 0 1
{q1} {}
->q0 write as
[q1]
{q0,q1} {q1}
[q1] write as
[q01]
[]
[q01] 98
• EXAMPLE OF CREATING A DFA OUT OF AN NFA (AS PER THE
CONSTRUCTIVE PROOF): 0/1
0
q0 q1
0
δ: 0 1
{q1} {}
->q0 write as
[q1]
{q0,q1} {q1}
[q1] write as
[q01]
[] []
[] 99
[q01]
• Example of creating a DFA out of an NFA:
0/1
0
q0 q1
δ: 0 1
0
->q0
{q1} {}
[q1]
{q0,q1 {q1}
}
[]
[] []
[q01] [q01] [q1]
100
• Construct DFA M’ as follows:
1
0/1
1 [q0]
0 [q1]
[]
• Let N = {qn,∑,δn,q0,fn}
102
EXAMPLE 1
Step-01: Step-02:
Let Q’ be a new set of states of Add transitions of start state q0
the Deterministic Finite Automata to the transition table T’.
(DFA). State /
0 1
Let T’ be a new transition table of Alphabet
Step-04:
State / Alphabet 0 1
New state present in state Q’ is {q0, q1,
q2}. →q0 q0 {q1, q2}
Add transitions for set of states {q0, q1, {q1, q2} {q0, q1, q2} {q1, q2}
q2} to the transition table T’.
{q0, q1, q2} {q0, q1, q2} {q1, q2}
Cont…
• Step-05:
• Since no new states are left to be added in the transition table t’, so we stop.
• States containing q2 as its component are treated as final states of the DFA.
• Finally, transition table for deterministic finite automata (DFA) is-
State / Alphabet 0 1
• L = {W | W ENDS IN 01} 1 0
NFA: DFA: 0 1
0,1 [q0] [q0,q1] [q0,q2]
0
0 1 1
q0 q1 q2
δD 0 1 δD 0 1
δN 0 1
Ø Ø Ø [q0] [q0,q1] [q0]
q0 {q0,q1} {q0}
[q0] {q0,q1} {q0} [q0,q1] [q0,q1] [q0,q2]
q1 Ø {q2}
[q1] Ø {q2} *[q0,q2] [q0,q1] [q0]
*q2 Ø Ø *[q2] Ø Ø
[q0,q1] {q0,q1} {q0,q2}
*[q0,q2] {q0,q1} {q0} 0. Enumerate all possible subsets
*[q1,q2] Ø {q2} 1. Determine transitions
112
*[q0,q1,q2] {q0,q1} {q0,q2}
2. Retain only those states
reachable from {q0}
Cont…
• L = {W | W ENDS IN 01} 1 0
NFA: DFA: 0 1
0,1 [q0] [q0,q1] [q0,q2]
0
0 1 1
q0 q1 q2
δN 0 1
δD 0 1
q0 {q0,q1} {q0} [q0] [q0,q1] [q0]
q1 Ø {q2} [q0,q1] [q0,q1] [q0,q2]
*q2 Ø Ø *[q0,q2] [q0,q1] [q0]
Main Idea:
Introduce states as you
113 go
0,1
0 1 • -Closure of a state q,
q0 q1 q2
eclose(q), is the set of all
start q’0 states (including itself) that
can be reached from q by
δE 0 1 repeatedly making an
arbitrary number of -
ECLOSE(q’0)
*q’0 Ø Ø {q’0,q0}
q0 {q0,q1} {q0} {q0} ECLOSE(q0)
ECLOSE(q1) transitions. 115
q1 Ø {q2} {q1}
*q2 Ø Ø {q2} ECLOSE(q2)
EXAMPLE OF AN -NFA
To simulate any transition:
Step 1) Go to all immediate destination states.
Step 2) From there go to all their -closure states as well.
L = {w | w is empty, or if non-empty will end in 01}
0,1
0 1
SIMULATE FOR W=101:
q0 q1 q2
q 0’
start q’0
q 0’ q0
1 1
q0
δE 0 1 Ø
x 0
ECLOSE(q’0)
*q’0 Ø Ø {q’0,q0} q1
q0 {q0,q1} {q0} {q0} ECLOSE(q0) 1
q2 116
q1 Ø {q2} {q1}
*q2 Ø Ø {q2}
EXAMPLE OF ANOTHER -NFA
To simulate any transition:
Step 1) Go to all immediate destination states.
Step 2) From there go to all their -closure states as well.
0 1 ?
q0 q1 q2
1
start q’0 q3
δE 0 1
*q’0 Ø Ø {q’0,q0,q3}
q0 {q0,q1} {q0} {q0,q3}
q1 Ø {q2} {q1}
*q2 Ø Ø {q2}
q3 Ø {q2} {q3}
117
Converting ε-NFA to DFA
Solution:
Let us obtain ε-closure of each state.
1.ε-closure {q0} = {q0, q1, q2}
2.ε-closure {q1} = {q1}
3.ε-closure {q2} = {q2}
4.ε-closure {q3} = {q3}
5.ε-closure {q4} = {q4}
Now, let ε-closure {q0} = {q0, q1, q2} be state A.
Hence
Example
3
Convert the given NFA into its equivalent DFA.
Solution: Let us obtain the ε-closure of each state.
Minimization of DFA
Suppose there is a DFA D < Q, Σ, q0, δ, F > which recognizes a language L.
Then the minimized DFA D < Q’, Σ, q0, δ’, F’ > can be constructed for
language L as:
Step 1: We will divide Q (set of states) into two sets. One set will contain
all final states and other set will contain non-final states. This partition is
called P0.
Step 2: Initialize k = 1
Step 3: Find Pk by partitioning the different sets of Pk-1. In each set of Pk-1,
we will take all possible pair of states. If two states of a set are
distinguishable, we will split the sets into different sets in P k.
Applications of interest
• Comparing two DFAs:
• L(DFA1) == l(DFA2)?
130
Cont…
Step 4: Stop when Pk=Pk-1 (No change in partition)
Step 5: All states of one set are merged into one. No. of states in
minimized DFA will be equal to no. of sets in Pk.
How to find whether two states in partition Pk are distinguishable ?
Two states ( qi, qj ) are distinguishable in partition Pk if for any input
symbol a, δ ( qi, a ) and δ ( qj, a ) are in different sets in partition P k-1.
Example
Consider the following DFA shown in figure.
Cont…
Step 1. P0 will have two sets of states. One set will contain q1, q2, q4 which
are final states of DFA and another set will contain remaining states. So P0
= { { q1, q2, q4 }, { q0, q3, q5 } }.
Step 2. To calculate P1, we will check whether sets of partition P0 can be
partitioned or not:
i) For set { q1, q2, q4 } :
δ ( q1, 0 ) = δ ( q2, 0 ) = q2 and δ ( q1, 1 ) = δ ( q2, 1 ) = q5, So q1 and q2
are not distinguishable.
P
W
And
Q
ii) Any string w rejected by starting at p is also rejected by starting
at q.
P
W
136
Q
P≡q
Computing equivalent states in a DFA
Table filling algorithm
A =
0 1
B = =
0 1 0
A C E G C x x =
1 0 1
0 1 D x x x =
B 1
D 1
F 0
H E x x x x =
1 0 F x x x x x =
0
Pass #0 G x x x = x x =
1. Mark accepting states ≠ non-accepting states
H x x = x x x x =
Pass #1
2. Compare every pair of states A B C D E F G H
3. Distinguish by one symbol transition
4. Mark = or ≠ or blank(tbd)
Pass #2
5. Compare every pair of states 137
6. Distinguish by up to two symbol transitions (until different or same or tbd)
….
(keep repeating until table complete)
Cont…
A =
0 1
B =
0 1 0
A C E G C =
1 0 1
0 1 D =
B 1
D 1
F 0
H E =
1 0 F =
0
G =
H =
A B C D E F G H
138
Cont.…
A =
0 1
B =
0 1 0
A C E G C =
1 0 1
0 1 D =
1 1 0 E X X X X =
B D F H
1 0 F X =
0
G X =
1. Mark X between accepting vs. non-accepting state H X =
A B C D E F G H
139
Cont…
A =
0 1
B =
0 1 0
A C E G C X =
1 0 1
0 1 D X =
1 1 0 E X X X X =
B D F H
1 0 F X =
0
G X X =
140
Cont…
A =
0 1
B =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X =
1 1 0 E X X X X =
B D F H
1 0 F X =
0
G X X X =
141
Cont…
A =
0 1
B =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
1 1 0 E X X X X =
B D F H
1 0 F X X =
0
G X X X X =
142
TABLE FILLING ALGORITHM -
STEP BY STEP
A =
0 1
B =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
1 1 0 E X X X X =
B D F H
1 0 F X X X =
0
G X X X = X =
143
Cont…
A =
0 1
B =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
B 1
D 1
F 0
H E X X X X =
1 0 F X X X =
0
G X X X = X X =
144
Cont…
A =
0 1
B =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
B 1
D 1
F 0
H E X X X X =
1 0 F X X X =
0
G X X X = X X =
145
Cont…
A =
0 1
B = =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
B 1
D 1
F 0
H E X X X X =
1 0 F X X X X X =
0
G X X X = X X =
. Mark X between accepting vs. non-accepting state H X X = X X X X =
. Pass 1: A B C D E F G H
Look 1- hop away for distinguishing states or strings
. Pass 2:
Look 1-hop away again for distinguishing states or strings
continue…. 146
Cont…
A =
0 1
B = =
0 1 0
A C E G C X X =
1 0 1
0 1 D X X X =
B 1
D 1
F 0
H E X X X X =
1 0 F X X X X X =
0
G X X X = X X =
0 1 0 1
0 1 0 0 1
A C E G A C E
1 0 1 1 0
0 1 0
1 1 0 1
B D F H D F
1 0 1 0
0
Equivalences:
• A=B 148
• C=H
• D=G
EXERCISE
A 0 B 1 D
1 1
0 0
C E
1
1
APPLICATIONS
• Text indexing
• Inverted indexing
• For each unique word in the database, store all locations
that contain it using an NFA or a DFA
• Find pattern P in text example: google querying
• Extensions of this idea:
• PATRICIA tree, suffix tree
150
PROPERTIES OF DFAS AND NFAS
151
SUMMARY
• DFA
• Definition
• Transition diagrams & tables
• Regular language
• NFA
• Definition
• Transition diagrams & tables
• DFA vs. NFA
• NFA to DFA conversion using subset construction
• Equivalency of DFA & NFA
• Removal of redundant states and including dead states
• -Transitions in NFA
• Pigeon hole principles
• Text searching applications 152