GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many Boolean functions f(a,b,c,d,e) are invariant under the cyclic shift of their inputs, f(a,b,c,d,e) = f(b,c,d,e,a), and are also self-dual (f(x̄) = f(x)' for every input x)?

  1. A. 256
  2. B. 16
  3. C. 8
  4. D. 32

Correct answer: B. 16

The 32 inputs fall into 8 rotation classes (00000 and 11111, one class each of weight 1 and 4, two each of weight 2 and 3, the last six of size 5). A cyclic-invariant f is constant on each class, giving 2^8 = 256. Complementing maps the class of weight k to one of weight 5 − k, and no class is mapped to itself (5 is odd), so the classes form 4 pairs whose values must be opposite: 2^4 = 16.

More Digital Logic questions

Exams that ask this topic