Alice and Bob are candidates for a presidential election in Brilliant Club. There are 1001 voters in the club, who will vote for either Alice or Bob, but never both. After they decide their ideal candidate, they queue up in front of a stage. Then, the voter at the head of the queue, say , will follow the plan:
This process continues until the queue is empty. In the end, the people on the stage vote for Alice. Who receives the majority votes?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The trick is to notice that the number of people on stage is simply the difference between people voting for Alice and for Bob, and those on stage are voting for whichever is greater. Once we notice this, the answer immediately follows; since people on stage are voting for Alice, this means Alice wins.
At any time, suppose that there have been a voters for Alice and b voters for Bob. We will show that the number of people on stage is ∣ a − b ∣ , and they are all voting for Alice if a > b and for Bob if a < b . (And if a = b , then there's nobody on stage.) We will prove this by induction on a + b .
For a + b = 0 , we have a = b = 0 , and the statement is obvious. Suppose we have proven the claim for a + b = k , and we will now prove the claim for a + b = k + 1 .
Suppose the next voter votes for Alice. Before this, there were a − 1 voters for Alice and b voters for Bob. Then,
In all cases, we have proven the claim. If the next voter votes for Bob, it goes in a very similar way. Thus we have proven the claim for a + b = k + 1 , and by induction, for all a , b .
Now, there are people on stage, and they are voting for Alice. Among the possible outcomes we have, the only way this is achieved is if a > b . Thus there are more people voting for Alice than Bob; this means Alice has majority.