0
votes

I've been doing some problems from my textbook to practice for finals and I ran into one question I couldn't quite figure out. Basically it was for

Let L = {w | w contains more 0's than 1's}

And it says as a hint that the pumping lemma for regular languages should help.

While it's easy to prove a language non-regular when there is some pattern, such as 0's first followed by 1's or palindromes since you can break the pattern by pumping, the only requirement here is that the word, which can contain 0's and 1's in any order, have more 0's.

I was trying to think of some cases, the obvious one being if y=0, you could pump y until you have more 0's than 1's. But we have to consider every possible case for the pumping lemma to be proven false and it just seems like y can be any string as long as |xy| < p (where p is the pumping length). y could contain 0's and 1's, or only 1's. Am I missing something obvious here? Thanks ahead of time.

1

1 Answers

0
votes

you can choose a word like so:
given a number n, the word is z=0^(2n)1^n, which is in L.
z=uvw, and |uv|<=n, so uv contains only zeros.
therefore, v also contains only zeros, and |v|>=1.
if we assume that L is regular, then because of the lemma uv^0w is in L.
but v=0^k (k>=1), so uv^0w=0^(2n-k)1^n, which is not in L because k>0.