GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A Boolean function is symmetric if its value depends only on the number of 1s in the input. If S(n) is the number of symmetric self-dual functions of n variables, what is S(4) + S(5)?

  1. A. 8
  2. B. 24
  3. C. 12
  4. D. 18

Correct answer: A. 8

Self-duality pairs weight w with n − w. For n = 5 the 3 pairs are free: S(5) = 2³ = 8; for n = 4 weight 2 pairs with itself (f(w) = ¬f(w)), so S(4) = 0. Sum 8.

More Discrete Mathematics questions

Exams that ask this topic