Nonregular Languages - PowerPoint PPT Presentation

About This Presentation
Title:

Nonregular Languages

Description:

Pumping Lemma (preliminary version): Suppose L is the language recognized by a DFA with p states, and ... Villa| 6. Proof idea. 1.4.b. V. i. l. l. n. o. v. V i ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 7
Provided by: giorgija
Category:

less

Transcript and Presenter's Notes

Title: Nonregular Languages


1
Nonregular Languages
CSC 4170 Theory of Computation
Section 1.4
2
Pumping Lemma
1.4.a
Pumping Lemma (preliminary version) Suppose
L is the language recognized by a DFA with p
states, and w is a string in L of length at
least p. Then w may be divided into three
parts, w xyz, so that 1. For each i?0, xyiz
?L 2. y gt 0 3. xy ?
p.
Example Suppose a DFA with 6 states accepts
Villanova. Then
Villanova xyz, e.g., with x Vi, y lla,
z nova,
V i l l a n o v a so that the DFA also
accepts
Vinova (xy0z) Villanova
(xy1z) Villallanova
(xy2z) Villallallanova
(xy3z) Villallallallanova (xy4z)
We also have lla gt 0, Villa ? 6.



3
Proof idea
1.4.b
l
V
i
v
l
a
o
n

V i l l a n o v a


4
An equivalent formulation of the pumping lemma
1.4.c
Pumping Lemma (Theorem 1.70) Suppose L is a
regular language. Then there is a number p,
called the pumping length, such that any string
w from L of length at least p can be divided
into three parts, w xyz, so that 1. For each
i?0, xyiz ?L 2. y gt 0
3. xy ? p.
Proof Suppose L is a regular language. Then we
know that there must be a DFA recognizing L. Take
the pumping length p to be the number of states
of this DFA. The rest of the theorem is then a
repetition of the previous formulation of the
pumping lemma.


5
Using the pumping lemma for proving
nonregularity Example 1
1.4.d
Example 1.73 Show the nonregularity of
B 0n1n n?0
Proof by contradiction Assume B is regular.
Let then p be its pumping length. Select w?B
with w ? p. By the pumping lemma, wxyz and y
can be pumped, so that we must also have xyyz?B.
Case 1 y only has 0s. But then xyyz has more 0s
than 1s and ?B.
Case 2 y only has 1s. But then xyyz has more 1s
than 0s and ?B.
Case 3 y has both 0s and 1s. But then xyyz has a
1 followed by a 0 and ?B.
The assumption that B is regular took us to a
contradiction. Hence the assumption was wrong,
i.e. B is not regular.


6
Using the pumping lemma for proving
nonregularity Example 2
1.4.e
Example 1.75 Show the nonregularity of
F ww w
?0,1
Proof by contradiction Assume F is regular.
Let then p be its pumping length. Observe that
0p10p1?F. By the pumping lemma, 0p10p1 xyz and
y can be pumped. By Condition 3, xy?p.
Therefore, y is entirely in the first
0p. Pumping y would produce a string that has
only 0s is the first half, and two 1s in the
second half. Obviously this string cannot be in
F, which contradicts with the pumping lemma.
The assumption that F is regular took us to a
contradiction. Hence the assumption was wrong,
i.e. F is not regular.

Write a Comment
User Comments (0)
About PowerShow.com