Pumping Lemma for Regular Languages

2 min read Updated Fri Apr 24 2026 03:46:02 GMT+0000 (Coordinated Universal Time)

A property that all regular languages must satisfy. A necessary (not sufficient) condition for regular languages.

Any sufficiently long string in a regular language can be divided into parts that can be repeated (pumped) any number of times and still remain in the language.

Used to prove a language is not regular.

Versions

Version 1

Suppose LL is a language recognized by an FA with pp states. Any string wLw \in L with wp\lvert w \rvert \ge p can be written as w=xyzw = xyz where the following conditions hold:

  • xyp\lvert xy \rvert \le p
    The substring xyxy lies within the first pp characters.
  • y>0\lvert y \rvert \gt 0
    The substring yy must not be empty.
  • xyizLxy^iz \in L for all i0i \ge 0
    The substring yy can be repeated 0 or more times and the resulting string must still belong to LL.

Version 2

For a regular language LL, there exists a integer constant pp (called the pumping length) such that:

Any string wLw \in L with wp\lvert w \rvert \ge p can be written as w=xyzw = xyz where the version 1’s conditions hold.

More common than version 1.