Let b1b2b3b4 be a 4-element permutation with bi∈{1,2,…,100} for 1≤i≤4 and bi=bj for i=j, such that either b1,b2,b3 are consecutive integers or b2,b3,b4 are consecutive integers. Then the number of such permutations b1b2b3b4 is equal to\_\_\_
Answer: 18915
Solutions · 1
Official solution
Let A = set of permutations where b1,b2,b3 are consecutive (in some order), B = set where b2,b3,b4 are consecutive.
For A: choose the starting value of the consecutive triple (1 to 98: 98 choices), arrange the triple in 3!=6 ways, and choose/arrange b4 from the remaining 97 numbers: ∣A∣=98×6×97.
Similarly ∣B∣=98×6×97.
A∩B: both triples consecutive means all 4 values are consecutive; ∣A∩B∣=97× (arrangements consistent with both conditions).
\[|A\cup B| = |A|+|B|-|A\cap B| = 18915\]