0 votes 0 votes L={w∣na(w)=nb(w)}L={w∣na(w)=nb(w)} is deterministic context free language, but not linear. HOW THIS Language is not linear S-->aA/bB A-->Sb/b B-->Sa/a i think this grammar is correct for this language? how this grammar is not linear? pream sagar asked Dec 19, 2018 pream sagar 741 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments shreyansh jain commented Dec 19, 2018 i edited by shreyansh jain Dec 19, 2018 reply Follow Share @pream sagar Grammar is incomplete actually, try to generate the strings starting and ending with same symbol and still having equal number of a's and b's something like $abba$. Your grammar can only derive strings of the form: $a^n(b^na^n)b^n$ and $b^n(a^nb^n)a^n$ 0 votes 0 votes pream sagar commented Dec 19, 2018 reply Follow Share i got it thank u 0 votes 0 votes Ram Swaroop commented Dec 19, 2018 reply Follow Share https://en.m.wikipedia.org/wiki/Linear_grammar 0 votes 0 votes Please log in or register to add a comment.