1/31/2006
CSE 2001, Winter 2006
1
CSE 2001:
Introduction to Theory of Computation
Winter 2006
Suprakash Datta
datta@cs.yorku.ca
Office: CSEB 3043
Phone: 416-736-2100 ext 77875
Course page: http://www.cs.yorku.ca/course/2001
Some of these slides are adapted from Wim van Dam’s slides
(
www.cs.berkeley.edu/~vandam/CS172/
)
and from Nathaly Verwaal
(
cpsc.ucalgary.ca/~verwaal/313/F2005
/)
1/31/2006
CSE 2001, Winter 2006
2
Non-regular Languages §1.4
Which languages cannot be recognized by finite
automata?
Examples: L= {0
n
1
n
| n
∈
N
}
PAL = {w | w = w
R
}
• ‘Playing around’ with FA convinces you that the
‘finiteness’ of FA is problematic for “all n
∈
N
”
• The problem occurs between the 0
n
and the 1
n
• Informal:
cannot count arbitrary integers using
a fixed number of states
; the memory of a FA is
limited by the the number of states |Q|
1/31/2006
CSE 2001, Winter 2006
3
Proving non-regularity
• Simpler technique (not in the text)
-- less general
• Pumping Lemma (Sec 1.4)
– More difficult
– More general
1/31/2006
CSE 2001, Winter 2006
4
Distinguishing strings wrt L
• Define L/x = {z
∈Σ
* | xz
∈
L}
• x,y distinguishable with respect to L if
L/x
≠
L/y
•
∃
z xz
∈
L, yz
∉
L
• E.g. L = {w| w ends in 10}
x = 01, y = 00.
z = 0 distinguishes x,y
1/31/2006
CSE 2001, Winter 2006
5
Theorem
Suppose that for L
⊆Σ
* and for some
positive integer n, there are n strings in
Σ
* such that any two of them are
distinguishable with respect to (wrt) L.
Then every DFA recognizing L must
have at least n states.
Notation:
δ
*(q
0
,x
1
) – generalization of
transition function.
1/31/2006
CSE 2001, Winter 2006
6
Proof of Theorem
Suppose x
1
, …, x
n
are n strings, any two of
which are distinguishable wrt L. If M is a DFA
with fewer than n states, then by the
Pigeonhole
Principle
, the states
δ
*(q
0
,x
1
), …,
δ
*(q
0
,x
n
)are
not all distinct, and so for some i
≠
j,
δ
*(q
0
,x
i
) =
δ
*(q
0
,x
j
). Since x
i
, x
j
are distinguishable wrt L, it
follows that M cannot recognize L.