Pumping lemma Flashcards

(34 cards)

1
Q

What is the main purpose of the Pumping Lemma?

A

To prove that certain languages are not regular.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When can the pumping lemma be applied?

A

Only to prove that a language is not regular — not to prove that it is regular.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What must be shown to prove a language is regular?

A

That it is accepted by a DFA, NFA, or described by a regular expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Pumping Lemma state?

A

If L is regular, then there exists an n ≥ 1 such that every w ∈ L with |w| ≥ n can be split as w = xyz with |xy| ≤ n, y ≠ ε, and xyⁱz ∈ L for all i ≥ 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the significance of the condition |xy| ≤ n in the pumping lemma?

A

It ensures the loop y appears early — within the first n letters of the word.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why must y ≠ ε in the Pumping Lemma?

A

So that something is actually being repeated — y must be a non-empty loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does it mean to ‘pump’ the loop y in the Pumping Lemma?

A

To repeat the substring y any number of times and remain in the language: xyⁱz ∈ L for all i ≥ 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why does the pumping phenomenon occur in DFAs?

A

Because if the input word is longer than the number of states, the DFA must revisit a state — creating a loop (by the pigeonhole principle).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the intuition behind the loop y in DFA processing?

A

It’s a repeatable sequence of transitions that brings the DFA back to a previous state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is the pumping lemma not used to prove regularity?

A

Because it can only show that a language must have the pumping property if it’s regular — it can’t confirm regularity on its own.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Give an example of a language the pumping lemma shows is not regular.

A

L = { w ∈ {a,b}* | w has equal numbers of a’s and b’s }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is the language with equal numbers of a’s and b’s not regular?

A

Because tracking an arbitrary difference between a’s and b’s would require infinite states, which a finite automaton can’t provide.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does it mean if a word w violates the pumping lemma conditions?

A

It means the language L is not regular.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the first step in applying the pumping lemma to prove non-regularity?

A

Assume for contradiction that the language is regular and let n be the pumping length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the typical strategy in using the pumping lemma?

A

Choose a word w ∈ L with |w| ≥ n, show that all decompositions into xyz fail the pumping condition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the main use of the Pumping Lemma?

A

To prove that certain languages are not regular.

17
Q

Can the Pumping Lemma be used to prove regularity?

A

No — it can only be used to show a language is not regular.

18
Q

What is the form of the Pumping Lemma?

A

For a regular language L, there exists n ≥ 1 such that every word w ∈ L with |w| ≥ n can be split as w = xyz with |xy| ≤ n, y ≠ ε, and xyⁱz ∈ L for all i ≥ 0.

19
Q

What are the three conditions in the Pumping Lemma?

A

(1) |xy| ≤ n, (2) y ≠ ε, (3) xyⁱz ∈ L for all i ≥ 0.

20
Q

Why must the loop y appear early in the word?

A

Because |xy| ≤ n — pumping must occur within the first n characters.

21
Q

What is the proof strategy for using the Pumping Lemma?

A

Assume the language is regular, then find a word that violates the pumping conditions — leading to a contradiction.

22
Q

Why is a contradiction important in Pumping Lemma proofs?

A

It shows that the assumption of regularity must be false, so the language is not regular.

23
Q

What is a common mistake when applying the Pumping Lemma?

A

Not specifying n or not defining the decomposition xyz.

24
Q

Why must you carefully choose the word w in a Pumping Lemma proof?

A

Choosing a word that can be pumped will not create a contradiction — and won’t prove the language is non-regular.

25
Why are languages with related blocks (e.g. aⁿbⁿ) often non-regular?
Because they require tracking dependencies that finite automata can't remember.
26
In a contradiction-based proof
what do you first assume?
27
What is step 2 in a Pumping Lemma proof?
Choose a specific word w in the language with |w| ≥ n.
28
What is step 3 in a Pumping Lemma proof?
Decompose w = xyz with |xy| ≤ n and y ≠ ε.
29
What is step 4 in a Pumping Lemma proof?
Show that pumping y (e.g., using i = 0 or i = 2) leads to a word not in the language.
30
What is step 5 in a Pumping Lemma proof?
Conclude by contradiction that the language is not regular.
31
Give an example of a language proven non-regular using pumping.
L = { w ∈ {0,1}* | #0s = #1s }
32
Why can't DFAs recognize L = { w | #0s = #1s }?
Because they can’t track unbounded differences between numbers of symbols.
33
How is the language L = { aⁿ b a²ⁿ } shown to be non-regular?
By choosing w = aⁿ b a²ⁿ, pumping the first block of a’s breaks the 1:2 ratio.
34
How is L = { w | w is a palindrome } shown to be non-regular?
By choosing w = aⁿ b aⁿ, pumping the first block of a’s destroys the symmetry.