0 votes 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 asked Mar 31, 2017 Vicky rix 434 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes S-> AA A-> aSb | bSa | epsilon Thats it. Ahwan answered Mar 31, 2017 • selected Apr 1, 2017 by Vicky rix Ahwan comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes is this correct .....? S -> aSb / bSa / epsilon Vicky rix answered Mar 31, 2017 Vicky rix comment Share Follow See 1 comment See all 1 1 comment reply Ahwan commented Mar 31, 2017 reply Follow Share No. abaabb is not generated by your grammar. 0 votes 0 votes Please log in or register to add a comment.
0 votes 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 See all 4 4 Comments reply Ahwan commented Mar 31, 2017 reply Follow Share Wrong. abaabb is not generated by your grammar. 1 votes 1 votes Rameez Raza commented Mar 31, 2017 reply Follow Share Yes abaabb was not generating 0 votes 0 votes Ahwan commented Mar 31, 2017 reply Follow Share The edited answer might be right. 0 votes 0 votes Vicky rix commented Apr 1, 2017 reply Follow Share @Ahwan thanks ... 0 votes 0 votes Please log in or register to add a comment.