CSE 309 Theory of Automata, Spring 2022 Exercises 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CSE 309 Theory of Automata, Spring 2022

Exercises 4

1. Common Mistakes in the Pumping Lemma The following incorrect proofs show common
mistakes in using the pumping lemma. In each case try to find the most serious problems
with the argument.
Claim: The language L = {ai bi | i 0} is not a regular language.

(a) Attempt One. Suppose that L is regular. Thus the Pumping Lemma for Regular
Languages holds. Let n by the constant from the pumping lemma and consider the
string w = an bn . It is easy to see, by the definition of L, that w 2 L. Furthermore,
|w| = 2n n. By the definition of the Pumping Lemma for Regular Languages, there
must exist x, y, z such that the last three conditions of the Pumping Lemma are satisfied.
Let x = , y = a, and z = an 1 bn . Then y y 6= and |xy| = |a| = 1  n, so that the
first two conditions for x, y and z are satisfied. However,

xy 2 z = a2 an 1 n
b = an+1 bn 2
/ L,

so that the third condition is not satisfied. We therefore have a contradiction. It follows
that the language L is nnoto regular.
(b) Another Attempt. To reach a contradiction, assume that L is a regular language.
Consider w = an bn . Clearly w 2 L and |w| n. Since |xy|  n, y contains only a’s
and y = a for some 1  p  n (since |y| > 0). Now consider xy 2 z = an+p bn and since
p

p > 0, xy 2 z 2
/ L. We have a contradiction. Hence the assumption that L is regular must
be false.

2. NFAs and Regular Expressions. Attempt the Chapter 1 Exercise Questions 1.16 to 1.18
in the class text book Introduction to the Theory of Computation by Michael Sipser, third
edition, Pages 86.

3. Pumping Lemma Use the Pumping Lemma for Regular Languages to prove that each of
the following languages over the alphabet ⌃ = {a, b} is not a regular language.

(a) {www | w 2 ⌃⇤ }
(b) {w | |w| is a power of 2}

4. Counting symbols implies non-regularity We know that the language Lbase = {ai bi | i
0} is non-regular. Use closure properties to conclude that each of the following language in
non-regular.

(a) L1 = {ai bj | 0  i  j}
(b) L2 = {w 2 {a, b, c}⇤ | |w| = 3|w|a }.

You might also like