The pumping lemma states that for a regular language L: for all strings s greater than p there exists a subdivision s=xyz such that: For all i, xyiz is in L; |y|>0; and |xy|<p. Now the claim that y can only contain a's or b's originates from the first item....

regular-language,finite-automata,dfa,pumping-lemma

A perhaps easier way to proof this is first modifying the language. Since regular languages are closed under complement and the intersection with another regular expression. This means that you can proof L is not a regular language by proving complement(L) is not a regular language, because if L' is...

Here's a hint: if you consider any power of two greater than k (say, 2k), then 2k + k is not a power of two, since 2k + k < 2k + 2k = 2k+1 See if that can guide you to choose the right string and find your choice...