Thursday, April 19, 2018

mathematics - Pirates and gold coins


A group of N pirates has come by a chest containing 200 gold coins. Their rules require that the coins be distributed by the following approach. The pirates are ranked from fiercest to meekest and all pirates know the ranking. The fiercest must propose a division, which is put to majority vote with the fiercest voting and winning ties. If the proposal wins, it is implemented. If not, the fiercest is fed to the sharks and the responsibility falls to the (newly promoted) fiercest. The pirates are selfish and quite rational, with the following priorities:



  1. Stay alive

  2. Get as much gold as possible, as long as 1 is satisfied

  3. If 1 is satisfied and two options are equivalent in terms of gold, feed somebody to the sharks by preference.



Depending on N, what happens? To be complete, your answer should deal with large values of N. Source: I first saw it in a Martin Gardner column.



Answer



Let's put the number of coins at c and see what happens if we increase n. We'll number the pirates from meekest (1) to fiercest (n).


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote11cyes210no2cyesbreaks tie311yes20no3c1yes410no21yes30no4c1yesbreaks tie511yes20no31yes40no5c2yes...2c10no21yes30no...n1yesbreaks tie


If we define a solution as stable if nobody gets fed to the sharks, we can say that all solutions so far have been stable. This is because for each n, there are more or at least as much (in which case the tie is broken) pirates who would be worse off in the solution for n1.


But now, we're at n=2c+1. Are we getting ready for carnage? Not quite:


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+111yes20no31yes...n10non0yes


Here, the fiercest pirate can escape alive, but without gold.


Okay, but now surely the sharks are getting fed? Let's see.


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+210no21yes30no...n21yesn10non0yesbreaks tie



The fiercest pirate now broke the tie to stay alive.


How about n=2c+3 then?


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+311yes20no31yes...n30non20non10non0yesshark bait


Here, finally, at n=2c+3, we reach our first unstable solution. The fiercest pirate can buy c votes, adds his own vote for a total of c+1, but the opposition has c+2 votes.
Note that here, pirate n3 is pirate n2 from the solution before it. Voting no yields a coin. Pirates n2 and n1 get no gold by voting against this proposal, but as per the third rule, vote to feed the sharks.


But does that mean that from now on, all pirates get their feet wet? Not at all.


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+411yes20no31yes...n40non30non20non10yespotential shark baitn0yesbreaks tie


Now both the fiercest pirate and the almost-as-fierce pirate are voting for their lives, since the solution with one pirate less is unstable and will see the almost-as-fierce pirate being fed to the sharks. The fiercest pirate breaks the tie and this solution is stable.


Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+510no21yes30no...n51yesn40non30non20non10non0yesshark bait2c+610no21yes30no...n61yesn50non40non30non20non10yesn0yesshark bait2c+710no21yes30no...n71yesn60non50non40non30non20yesn10yesn0yesshark bait2c+810no21yes30no...n81yesn70non60non50non40non30yespotential shark baitn20yespotential shark baitn10yespotential shark baitn0yesbreaks tie


And we've found a stable one again.



Nr. of piratesPiratemeekest to fiercestNr. of coinsVote2c+911yes20no31yes...n90non80non70non60non50non40non30non20non10non0yesshark bait


And so on.


When n>2c, we'll see more and more large runs of downvoting pirates, until the number of pirates upvoting to save their lives becomes equal to the number of downvoters and we find a stable solution again.




This yields the following formula for stable solutions: n2cn=2c+2z|zZ0


The procedure by which to distribute the coins is based on the fact that a pirate can only buy votes if coins are given to the opposite pirates from the next stable solution.
It is as follows:



  • For n2c give a coin to every pirate with the same parity as n, with any left over coins going to the fiercest pirate.

  • For 2c+2z1<n2c+2z|zZ0 start with the meekest pirate with the opposite parity of z and move up in ferocity.





‡: I prefer to think of the pirates as kind hearted people who care for the sharks and don't want them to go hungry.
†: It can be argued that if a solution is known to be unstable, all other pirates will vote no, since it doesn't matter who gets the coins — they won't get to keep them. But for the stable solution, it is necessary to distribute the coins like this.


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...