GATE CS 2025 Set 1 | Question 30
Discrete Mathematics › Combinatorics · NAT · 1 mark · Answer: 195
- Question 30Discrete Mathematicsnat1 markLet be the set of all ternary strings defined over the alphabet . Consider all strings in that contain at least one occurrence of two consecutive symbols, that is, "aa", "bb" or "cc". The number of such strings of length 5 that are possible is _______. (Answer in integer)
Answer: 195
Solution
Answer: 195 Use complementary counting. - Total strings of length 5: . - Strings with no two consecutive equal symbols: the first symbol has choices, each later symbol has choices (anything except the previous one): . Strings with at least one "aa"/"bb"/"cc"
More GATE PYQ on Combinatorics
All GATE CS Discrete Mathematics PYQ →Attempt GATE CS 2025 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →