GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A 4-bit cyclic Gray code is a cyclic sequence through all sixteen 4-bit words in which consecutive words, including the last and the first, differ in exactly one bit. How many such sequences start with 0000, counting the two directions of traversal as different?
- A. 1344
- B. 2688
- C. 5376
- D. 384
Correct answer: B. 2688
This is the number of directed Hamiltonian cycles of the 4-cube through a fixed start vertex. Exhaustive search gives 2688 (1344 undirected cycles). For 3 bits the same count is 12. 384 = 4!·16 counts only the reflected codes obtained by relabelling and complementing bits, which miss most cycles.
More Digital Logic questions
- F(A,B,C,D) = (A ⊕ B)(B ⊕ C) + (A ⊙ C)·B' + ABCD, where ⊙ is XNOR. What is the minimal sum-of-products of F?
- Which of the following identities hold for all A, B, C? I. A + (B ⊕ C) = (A + B) ⊕ (A + C) II. A·(B ⊕ C) = AB ⊕ AC III. A ⊕ (B + C) = (A ⊕…
- In IEEE 754 single precision with round-to-nearest, ties-to-even, what is the smallest positive single-precision number x for which the…
- The partial products of an 8 × 8 unsigned multiplier (one AND gate per bit pair) are reduced by a Dadda tree, whose stage height limits…
- A mod-60 counter is built in three ways: (i) a single binary counter reset at 60, (ii) a mod-6 binary counter cascaded with a BCD (mod-10)…
- A serial detector outputs 1 whenever the last four input bits are 1101 or 1011 (overlapping occurrences count). What are the minimum…