the first 4 steps of these are my own work - however the following steps are from my book, and I don't understand what it's saying, and I have not found any resources. Could someone clarify this?
Show C = {w|w has an equal number of 0s and 1s} is not regular. Show by contradiction.
1) Assume C is regular, and thus the Pumping Lemma conditions hold.
2) Assume a pumping length of p
.
3) Let the string s =
$0^p$$1^p$.
4) s = xyz
and let x
and z
be the empty string. Therefor for i > 0, x$y^i$z always has an equal number of 0s and 1s, so it seems like it can be pumped.
5) But since condition 3 of the pumping lemma says that |xy| <= p
, then y
must consist of only 0s.
How does step 5 justify y
consisting of only zeros? If we said ealrier that x
and z
are the empty strings, then doesn't that imply that s = y
= $0^p$ $1^p$?
How does this make y only zeros?
Thanks!