0 votes 0 votes wha first one is not regular since c is not part of the alphabets we can extend c till w1 and w2 be either a or b. so it can be like first and last alphabet should be different which can be accepted by FA . so why 1st one is wrong please explain garimanand asked Oct 19, 2018 garimanand 814 views answer comment Share Follow See all 17 Comments See all 17 17 Comments reply Show 14 previous comments Abbas2131 commented Oct 19, 2018 reply Follow Share @verma Ashish I am sorry, I misread the ques, but still S2 is DCFL, let me explain 1. Start pushing in a, 2. Start popping for b 3.i. if b's get over, and there is still a on top of stack, then pop atleast 3 a's, ACCEPT, (for a^n+k b^n) ii. if all a's get popped, and there are still b's remainng in the input, then Read atleast 1 b, if read successful then ACCEPT (for a^n b^n+k). Hope it helps, bdw i thought instead of >=3 it was >=0 :P 3 votes 3 votes Verma Ashish commented Oct 19, 2018 reply Follow Share Well explained..☺☻ 0 votes 0 votes Hemanth_13 commented Oct 19, 2018 reply Follow Share cool Thx @abbas @verma Ashish 0 votes 0 votes Please log in or register to add a comment.