Maths Olympiad Prep

Library / /42 of 397

, 2018

Combinatorics Difficulty 4.9 AIME Prove it Taiwan

There are nn sheep and one wolf disguised in sheep's clothing. Some of the sheep are good friends (friendship is mutual). The wolf's goal is to eat all the sheep. First, it selects some of the nn sheep to establish friendships with. On each subsequent day, it picks one of its friend sheep and eats it. Whenever it eats a sheep AA:
(i) if a friend sheep of AA was originally a friend of the wolf, it breaks off friendship with the wolf;
(ii) if a friend sheep of AA was not originally a friend of the wolf, it establishes friendship with the wolf.
This process is repeated until the wolf no longer has any friends.
Find the largest positive integer mm (in terms of nn) satisfying the following condition:
There exists a friendship relation among the nn sheep such that the wolf has a total of mm different ways of choosing its initial friend sheep, such that the wolf has a method to eat all the sheep.

Solution

The answer is: 2n12^{n-1}.

We first prove the upper bound. Let aa be the number of friends of the wolf, and let bb be the number of pairs of friend sheep. Note that each time the wolf eats a sheep, the parity of a+ba+b changes. Therefore, if the wolf is able to eat all the sheep, it must be the case that a+b+n11(mod2)a+b+n-1 \equiv 1 \pmod{2} (after the wolf has eaten n1n-1 sheep, it must then be able to eat the last sheep). Hence, among the 2n2^n ways the wolf can choose its initial friend sheep, at most 2n12^{n-1} of them have a chance of allowing it to eat all the sheep.

Below we construct a sheep friendship configuration that achieves this upper bound. Number the sheep from 11 to nn, and let sheep ii and i+1i+1 be friends (i=1,2,,n1)(i = 1, 2, \dots, n-1), with no other friendships. We will prove by mathematical induction that, under this friendship configuration, as long as the number of the wolf's initial friend sheep is odd, the wolf can always eat all the sheep:

(i) The case n=1n=1 is obvious.

(ii) When n>1n > 1, let kk be the largest number among the wolf's initial friend sheep. Note that the wolf can first eat sheep k,k+1,,nk, k+1, \dots, n in order, after which the situation becomes identical to the case n=kn=k (note that the wolf has eaten nk+1n-k+1 sheep, and the number of pairs of friend sheep has also decreased by nk+1n-k+1, so the parity of the number of the wolf's friend sheep is preserved). Thus, by the induction hypothesis, the claim is proved.

Moreover, there are 2n12^{n-1} ways for the wolf to choose an odd number of friend sheep, so the above example achieves the upper bound.

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 translated into English from zh; metadata (topic, difficulty) added by this project.