0 0 votes Let sigma = { a,b }.Find the grammar which generates the language, where na(w) and nb(w) denote the number of a's in w and number of b's in w respectively. Theory of Computation theory-of-computation grammar + – Vicky rix 954 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 1 1 vote S-> AA A-> aSb | bSa | epsilon Thats it. Ahwan answered Mar 31, 2017 • selected Apr 1, 2017 by Vicky rix Ahwan comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes is this correct .....? S -> aSb / bSa / epsilon Vicky rix answered Mar 31, 2017 Vicky rix comment Share Follow See 1 comment 1 1 comment reply Ahwan commented Mar 31, 2017 reply Follow flag No. abaabb is not generated by your grammar. 0 0 replyShare Please log in or register to add a comment.
0 0 votes This can be the grammar Rameez Raza answered Mar 31, 2017 • edited Mar 31, 2017 by Rameez Raza Rameez Raza comment Share Follow See all 4 Comments 4 4 Comments reply Ahwan commented Mar 31, 2017 reply Follow flag Wrong. abaabb is not generated by your grammar. 1 1 replyShare Rameez Raza commented Mar 31, 2017 reply Follow flag Yes abaabb was not generating 0 0 replyShare Ahwan commented Mar 31, 2017 reply Follow flag The edited answer might be right. 0 0 replyShare Vicky rix commented Apr 1, 2017 reply Follow flag @Ahwan thanks ... 0 0 replyShare Please log in or register to add a comment.