1

Please help me understand the following

$L = \{ a | a ∈ \{0, 1\}^∗, |a| = k ≥ 4, a = a_1a_2...a_{k−1}a_k, ∃i ∈ N, 1 ≤ i < k : a_i = a_{i+1} \}$

To prove: The language $L$ has regular pumping property

My argumentation:

Let $p = 4 $. Let $z$ in $L$, with $z$ $\geq $ $p$. Set $u$ to $\epsilon$. Than $x$ is the first letter, and $w$ the rest.

$x$ $\neq$ $\epsilon$

For all $i$ $\geq $0$: ux^iw$ is in $L$

But if i set i to 0 the word is not in the language? And therefor does not have the regular pumping property? What am i missing? Example $0010$, after pumping $4$ $\geq $ $010$?

John L.
  • 39,205
  • 4
  • 34
  • 93

2 Answers2

1

I assume that you want to show that the language $L$ does satisfy the Pumping Lemma, as it indeed is regular. In words your language consists of all strings that have length at least 4 and contain two consecutive symbols that are the same. The position of a pair of equal letters letters is indicated here with $i$. (Note $i$ in general is not unique.)

So we need to explain that all strings in the language (above a certain length) can be pumped within the language. You must realize that your division into $uxw$ can actually depend on the string $a$ itself.

So if $a$ starts with a repeated letter, e.g., $a = 00\dots$, we can pump the third letter. Otherwise if the repeated pair is assumed to be not in the first position, we can then pump the first symbol and we keep the repetition in the string while pumping.

Hendrik Jan
  • 31,459
  • 1
  • 54
  • 109
0

It suffices to show that the language is regular.

The language $L_1$ of all words on $\{0,1\}^*$ with at least two identical consecutive symbols is regular (since it can be described be the following regular expression: $(0\mid1)^*(00\mid11)(0\mid1)^*$).

The language $L_2$ of all words on $\{0,1\}^*$ of length at least $4$ is clearly regular (a regular expression is $(0 \mid 1)(0 \mid 1)(0 \mid 1)(0 \mid 1)(0 \mid 1)^*$).

By the closure properties of regular languages, $L = L_1 \cap L_2$ must also be regular.

Steven
  • 29,724
  • 2
  • 29
  • 49