Vote

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 x x , will follow the plan:

  1. If the stage is empty, x x stands on the stage.
  2. If the people on the stage vote the same as x x , x x stands on the stage.
  3. If the people on the stage vote against x x , dismiss both x x and one person on the stage.

This process continues until the queue is empty. In the end, the people on the stage vote for Alice. Who receives the majority votes?

Alice Bob Insufficient information

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.

1 solution

Ivan Koswara
Oct 3, 2016

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 a voters for Alice and b b voters for Bob. We will show that the number of people on stage is a b |a-b| , and they are all voting for Alice if a > b a > b and for Bob if a < b a < b . (And if a = b a = b , then there's nobody on stage.) We will prove this by induction on a + b a+b .

For a + b = 0 a+b = 0 , we have a = b = 0 a = b = 0 , and the statement is obvious. Suppose we have proven the claim for a + b = k a+b = k , and we will now prove the claim for a + b = k + 1 a+b = k+1 .

Suppose the next voter votes for Alice. Before this, there were a 1 a-1 voters for Alice and b b voters for Bob. Then,

  • If the stage is currently voting for Alice, then we get one additional person on stage. There were ( a 1 ) b = a b 1 |(a-1)-b| = a-b-1 people on stage, and we have one more, so now there are a b = a b a-b = |a-b| people on stage, as claimed.
  • If the stage is currently voting for Bob, then one person from stage is lost. There were ( a 1 ) b = b a + 1 |(a-1)-b| = b-a+1 people on stage, and one person is lost, so now there are b a = a b b-a = |a-b| people on stage, as claimed.
  • If the stage is empty, then the stage now has one person. Since the stage was empty, we have a 1 = b a-1 = b or a = b + 1 a = b+1 , so now there is 1 = a b = a b 1 = a-b = |a-b| person on stage, as claimed.

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 a+b = k+1 , and by induction, for all a , b 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 a > b . Thus there are more people voting for Alice than Bob; this means Alice has majority.

I'm a bit confused. how is it known that alice gets the first vote. Isn't it equally possible for bob to be in alice's position.

Akira Kato - 4 years, 8 months ago

Log in to reply

Alice doesn't get the first vote, but Alice gets the majority of votes.

Ivan Koswara - 4 years, 8 months ago

Log in to reply

so it doesn't matter if alice gets the first vote, she will always get majority of the votes. how so?

Akira Kato - 4 years, 8 months ago

Log in to reply

@Akira Kato Because the people remaining on stage after all 1001 voters have decided are voting for Alice.

Ivan Koswara - 4 years, 8 months ago

Log in to reply

@Ivan Koswara omg sorry. Didn't read the question careful enough, that was embarrassing. Thanks.

Akira Kato - 4 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...