0 0 votes L(G)={$a^nb^nc^n$ | n>=1} S->aAc A->bA | b can someone tell me what is wrong with this approach? Theory of Computation theory-of-computation context-free-grammar + – aditi19 1.5k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply SHUBHAM SHASTRI commented Aug 24, 2018 reply Follow flag consider that is S->aAc now put A->bA so string becomes abAc ..now for again A we can put bA... so strings we got is "abbc" which is not in the Language..so its wrong .. 1 1 replyShare Tesla! commented Aug 24, 2018 reply Follow flag It is possible Number of "b" > number of "ac" 0 0 replyShare Please log in or register to add a comment.
Best answer 1 1 vote it can't be expressed by context free grammar. CSG is possible.☺ Verma Ashish answered Aug 24, 2018 • selected Aug 27, 2018 by Tesla! Verma Ashish comment Share Follow See all 10 Comments 10 10 Comments reply Show 7 previous comments Verma Ashish commented Aug 25, 2018 reply Follow flag How can you give pda for a^n b^n c^n ?? it is not context free lang. Please clear your concept.. 0 0 replyShare Tesla! commented Aug 27, 2018 reply Follow flag If I push 3a in stack then 7 b then 3c your PDA will accept it so there is flaw, A^n B^n C^n is CSG not cfg 0 0 replyShare navya n commented Aug 31, 2018 reply Follow flag If u give like that it accept any number of b's but number of a's b's and c's should be equal as per the given condition 0 0 replyShare Please log in or register to add a comment.