I have a language where each string in the language has even amount of 0's as 1's (eg. 0101, 1010, 1100, 0011, 10 are all in the language). I was hoping to define a context-free grammar that describes this language. After defining a context-free grammar I want to formally prove that this context-free grammar describes this language.
I've came up with the context-free grammar production rules:
S->0S1S
S->1S0S
S->ε
Is this the correct context free grammar to define this language?
Im kind of stumped for the proving part. I'm guessing I will need some sort of induction?