Maths Olympiad Prep

Library / /24 of 128

Combinatorics Difficulty 5.0 AIME Prove it Philippines

Problem:

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

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.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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