GATE Computer ScienceHardGATE CS

The majority function of five variables (f = 1 when at least three inputs are 1) is represented as a reduced ordered BDD with the natural variable order (the function is symmetric, so any order gives the same size). How many non-terminal nodes does it have?

  1. A. 9
  2. B. 10
  3. C. 15
  4. D. 11

Correct answer: A. 9

After reading k variables the only relevant information is the number of 1s so far (capped at the useful range), so each level holds only a few distinct nodes: 1, 2, 3, 2, 1 for the five levels, 9 in all.

More Digital Logic questions

Exams that ask this topic