2
$\begingroup$

I'm trying to understanding using the pumping lemma to prove that a language is not regular. I sort of understand how it works when the language describes strings with a particular form, like in this example, but what do you set w to if there isn't a particular form.

The particular problem I'm trying to prove isn't regular: The language is the set of strings that is composed of 60% or more As and Bs with the alphabet {A, B, C, D}

Because the form of the strings is indeterminate (i.e. it doesn't follow a pattern like a^i b^i, I'm not sure how to divide the strings into a w and x, y, z.

$\endgroup$
  • 1
    $\begingroup$ You have to consider all possible ways of dividing $w$ into $x,y,z$. That's how the pumping lemma works. $\endgroup$ – Yuval Filmus Mar 17 '16 at 8:01
  • 1
    $\begingroup$ Picking w is always a creative step; there is no general recipe. Be careful with words like "indeterminate form" because these have other meaning; you are overstating the issue here in the sense that you have come to rely on features of writing down languages that have nothing to do with the task at hand (overfitting!). That said, can you come up with a sublanguage that has a useful "form"? $\endgroup$ – Raphael Mar 17 '16 at 8:22
2
$\begingroup$

I think your confusion lies in the fact that the language is not given in more "structured" form. Even if the language is not given as such, you are free to choose any string from the language which is more "structured" and allows you to disprove that language is regular.

Take $w=C^{2N}A^{3N}$ (or $A^{3N}C^{2N}$) where $N$ is the pumping length and $w$ is a string in your language, and then follow the proof in similar lines as in How to prove that a language is not regular?.

You should prove by yourself that above string $w$ can not be pumped.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.