GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A Boolean function is monotone if f(x) ≤ f(y) whenever x ≤ y bitwise, and self-dual if f(x̄) = f(x)' for every x. There are 12 functions of four variables that are both. How many functions of five variables are both monotone and self-dual?

  1. A. 7581
  2. B. 168
  3. C. 81
  4. D. 24

Correct answer: C. 81

A monotone self-dual function on n variables is the same as a 'maximal intersecting family' of subsets. One way: f(x5 = 0) = g and f(x5 = 1) = h must satisfy g ≤ h (monotone) and h = g^d (the dual of g, by self-duality), so the count equals the number of 4-variable monotone g with g ≤ g^d. Enumerating the 168 monotone 4-variable functions gives 81 (the sequence runs 1, 2, 4, 12, 81 for n = 1..5). 168 counts monotone 4-variable functions; 7581 counts monotone 5-variable functions.

More Digital Logic questions

Exams that ask this topic