What you have written does not make much sense to me. Can you show, for example, how you would generate 02 with your grammar ?
The Question :
Prove that the following languages are context-free by giving grammars that accept them.
S = { | i=k and j=l }
I felt like I could just substitute i = k and j = l, int the expression thus having to show that has some CFG.
Is that enough? This is the result I got from doing that :
Let T=
A→1S2 | ϵ
B→0B3 | A |ϵ
Then the CFG that accepts S is T.
Truthfully, I didn't bother because I am trying to get this homework completed. But I did try it a little, and it seems as
if there is no CFG that recognizes that set. But thats just an intuition. I will try this for practice later, I guess. Thanks again.