Data Structures & AlgorithmsModerateTCS NQT · CAT · MBA placement

In how many ways can 6 distinct people be divided into 3 unordered pairs (every person is in exactly one pair, and the pairs are not labelled)?

  1. A. 720
  2. B. 15
  3. C. 90
  4. D. 30

Correct answer: B. 15

Pick the partner of the first person (5 ways), then pair the remaining four (3 ways), then the last two: 5 × 3 × 1 = 15. Counting orderings of all 6 people (720) ignores that the pairs are unlabelled and that order inside a pair does not matter.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic