Maths Olympiad Prep

Track / Stage 4 / 327 of 340 #1067 of 2444

Problem 1067

AMC 12 late, AIME early
Combinatorics Difficulty 5.0 Prove it Philippine Mathematical Olympiad · Philippines

How many permutations of the string "000011112222" contain the substring "2020"?

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:

Removing the string "2020", there are two 00's, four 11's, and two 22's remaining. There are 8!2!4!2!=420\frac{8!}{2!4!2!} = 420 ways to arrange these digits, multiplied to 99 possible placements for the string "2020", for a product of 37803780.

However, by PIE, we still need to subtract the number of arrangements with string "202020" and add back the number of arrangements with string "20202020", each of which account for 76!1!4!1!=2107 \cdot \frac{6!}{1!4!1!} = 210 and 54!0!4!0!=55 \cdot \frac{4!}{0!4!0!} = 5 arrangements, respectively. This gives us a total of 3780210+5=35753780 - 210 + 5 = 3575 possible permutations.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.