computation-theorycomputer-science-theory

Regularity of a language With pumping Lemma


Interprete strings as numbers in Z ≥0 in binary (possibly with leading zeros, there is no modulo operation here). The following language over {0, 1} is regular {xyz : |x| = |y| = |z| and x + y = z}?

I think to prove the non regularity of this language, I should apply Pumping Lemma and show that there exists no possible setting such that all three conditions of pumping lemma are satisfied.


Solution

  • Consider the string (0^p)1(0^p)1(0^p-1)10 of length 3p + 3. This is a string in the language because choosing |x| = |y| = |z| means that x = (0^p)1, y = (0^p)1 and z = (0^p-1)10, and 1 + 1 = 10. Now, the pumping lemma says that this can be written as rst where:

    Note that in our case, s must consist entirely of leading 0 from our component x. Suppose we choose k = 0. There are several cases to consider:

    Therefore, there is no choice for m = |s| such that choosing k = 0 gives us r(s^k)t in the language. This is a contradiction and therefore our implied assumption that the language is regular must be false.