0 votes 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 asked Aug 24, 2018 aditi19 710 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply SHUBHAM SHASTRI commented Aug 24, 2018 reply Follow Share 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 votes 1 votes Tesla! commented Aug 24, 2018 reply Follow Share It is possible Number of "b" > number of "ac" 0 votes 0 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes 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 See all 10 10 Comments reply Show 7 previous comments Verma Ashish commented Aug 25, 2018 reply Follow Share How can you give pda for a^n b^n c^n ?? it is not context free lang. Please clear your concept.. 0 votes 0 votes Tesla! commented Aug 27, 2018 reply Follow Share 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 votes 0 votes navya n commented Aug 31, 2018 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.