I've a problem. I have to write right linear context free grammar with alphapet={0,1} where the numbers of 0 will be even and the numbers od 1 will be odd. I tried write sth. but it's doesn't work.
s --> [1],a.
s --> [0],b.
a --> [].
a --> [1],c.
a --> [0],b.
c --> [1],k.
c --> [0],b.
b --> [0],k.
b --> [1],d.
d --> [1],b.
d --> [0],c.
k --> [].
k --> s.
Grammar should accept even amount of 0s and odd amount of 1s. Grammar context free is right linear when A->wB or A->w where w is any word under our alphabet and A,B is no terminals