Question:medium

The following CFG generates strings of terminals that have

Show Hint

For CFG questions, generate a few sample strings and look for a pattern. If every recursive step preserves a relationship such as \[ n_a=n_b, \] then the language generated by the grammar consists of strings having equal numbers of \(a\)'s and \(b\)'s.
Updated On: Jun 25, 2026
  • Equal number of \(a\)'s and \(b\)'s
  • Odd number of \(a\)'s and \(b\)'s
  • Even number of \(a\)'s and \(b\)'s
  • Odd number of \(a\)'s and even number of \(b\)'s
Show Solution

The Correct Option is A

Solution and Explanation

Was this answer helpful?
0