GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many distinct arrangements of the letters of ABRACADABRA have no two identical letters adjacent?

  1. A. 3084
  2. B. 3204
  3. C. 2892
  4. D. 8316

Correct answer: A. 3084

Place the 6 non-A letters (6!/(2!·2!) = 180 orderings) with the 5 A's in 5 of the 7 gaps: but the equal B's and R's can still end up adjacent when no A separates them, so the gap argument alone overcounts. A direct enumeration of the 83160 distinct arrangements keeping those with no two equal neighbours gives 3084.

More Discrete Mathematics questions

Exams that ask this topic