GATE Computer ScienceVery hardGATE CS (PYQ pattern)

L₁ is the set of strings over {a, b} containing aa and L₂ the set containing bb. How many strings of length at most 6 lie in the symmetric difference L₁ Δ L₂ (in exactly one of them)?

  1. A. 80
  2. B. 86
  3. C. 72
  4. D. 126

Correct answer: A. 80

Count strings of each length 0..6 containing aa xor bb. Enumeration over the 127 strings gives 80.

More Theory of Computation questions

Exams that ask this topic