1 votes 1 votes Give a context-free grammar for the set of all strings over the alphabet {a, b} with exactly twice as many a’s as b’s. Explain the working of the grammar by characterizing the strings generated by each non-terminal. Theory of Computation theory-of-computation context-free-grammar + – rsansiya111 asked Sep 17, 2022 • retagged Sep 17, 2022 by makhdoom ghaya rsansiya111 274 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes $S\rightarrow aSaSb|aSbSa|bSaSa|SS|\varepsilon$ It's from Sipser afroze answered Sep 17, 2022 afroze comment Share Follow See all 0 reply Please log in or register to add a comment.