There are 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 sheep to establish friendships with. On each subsequent day, it picks one of its friend sheep and eats it. Whenever it eats a sheep :
(i) if a friend sheep of was originally a friend of the wolf, it breaks off friendship with the wolf;
(ii) if a friend sheep of 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 (in terms of ) satisfying the following condition:
There exists a friendship relation among the sheep such that the wolf has a total of different ways of choosing its initial friend sheep, such that the wolf has a method to eat all the sheep.
, 2018
Solution
The answer is: .
We first prove the upper bound. Let be the number of friends of the wolf, and let be the number of pairs of friend sheep. Note that each time the wolf eats a sheep, the parity of changes. Therefore, if the wolf is able to eat all the sheep, it must be the case that (after the wolf has eaten sheep, it must then be able to eat the last sheep). Hence, among the ways the wolf can choose its initial friend sheep, at most 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 to , and let sheep and be friends , 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 is obvious.
(ii) When , let be the largest number among the wolf's initial friend sheep. Note that the wolf can first eat sheep in order, after which the situation becomes identical to the case (note that the wolf has eaten sheep, and the number of pairs of friend sheep has also decreased by , 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 ways for the wolf to choose an odd number of friend sheep, so the above example achieves the upper bound.