Skip to content

Five-letter strings with no repeats side by side

Question

Using letters from {a,b,c,d,e}\{a,b,c,d,e\}, how many 55-letter strings can be formed in which no letter occurs more than twice and no two neighbouring letters are equal?

Short answer

12001200. Without the 'at most twice' rule there are 5⋅44=12805\cdot4^4=1280 strings with no equal neighbours. A letter can appear 33 times without touching only in the pattern X_X_XX\_X\_X, giving 5⋅4⋅4=805\cdot4\cdot4=80 strings to remove, so 1280−80=12001280-80=1200.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Probability Fundamentals is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free