GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many words of length 8 over the alphabet {a, b, c} contain each of the letters a, b and c an even number of times (zero allowed)?
- A. 1641
- B. 1640
- C. 2190
- D. 1094
Correct answer: A. 1641
The exponential generating function is cosh³x, so the count is the average of the 8 sign patterns of (ε₁ + ε₂ + ε₃)⁸: (1/8)(3⁸ + 3·1⁸ + 3·(−1)⁸ + (−3)⁸) = (6561 + 3 + 3 + 6561)/8 = 1641.
More Discrete Mathematics questions
- How many binary search trees on the keys 1, 2, …, 9 have 4 at the root and 7 as the right child of the root?
- How many permutations of {1, …, 8} have no cycle of length 1 or 2 (every cycle has length ≥ 3)?
- How many permutations π of {1, …, 8} satisfy π² = identity with none of 1, 2, 3 being a fixed point?
- In an election A gets 10 votes and B gets 6. Votes are counted one at a time (votes for the same candidate indistinguishable). In how many…
- T(0) = T(1) = 1 and T(n) = T(n − 1) + T(n − 2) + n for n ≥ 2. What is T(12)?
- In how many ways can 16 be written as an ordered sum (a composition) of parts each equal to 1, 3 or 4?