A common mistake in Q5 of the midterm (pumping lemma) was to choose the word 0^p#0^p.

Here is an explanation why this is not a valid choice:

ecall that the pumping lemma states that:

"For every CFL L, there exists a constant p,

such that for every word w with |w|>=p,

there exists a subdivision w = uvxyz such that

|vy| > 0

|vxy| <= p

for every i it holds that u v^i x y^i z is in L"

Now to prove that a language is not a CFL we need to find

some word w with |w|>=p,

such that for EVERY subdivision w = uvxyz such that

|vy| > 0

|vxy| <= p

there EXISTS an i such that u v^i x y^i z is NOT in L

Now, take the word w = 0^p # 0^p which is indeed in L.

Take the subdivision w = uvxyz where:

u = 0^(p-1)

v = 0

x = #

y = 0

z = 0^(p-1)

Now, for every i that you take

u v^i x y^i z is in L…

So this word does not help to prove that L is not a CFL