Pumping Lemma Theory

Definition

Any sufficiently long string can be split into x, y, z such that repeating y keeps the string valid.

|xy| ≤ p
|y| > 0
xykz ∈ L

String Breakdown (aaabbccc)

aaa bb ccc

Hover and notice how y stands out !

Pumping Process

k = 0 → aaaccc
k = 1 → aaabbccc
k = 2 → aaabbbbccc
k = 3 → aaabbbbbbccc

Increasing k repeats y.

Intuition

Finite automata have only a limited number of states, so they cannot remember long strings exactly. When they process a string longer than their number of states, they are forced to revisit some state, creating a loop. This loop corresponds to a part of the string called y. Since the automaton behaves the same each time it goes around this loop, repeating or removing y does not change whether the string is accepted. This is why in regular languages, the string can be “pumped” by repeating y any number of times.

Non-Regular Example

L = { aⁿbⁿ }
s = aaabbb
x = a, y = a, z = abbb
xy²z = aaaabbb ❌

Pumping breaks the condition → Not Regular ❌

p = 3