Zigman66
Android Enthusiast
Ok... times up!
Think of it from the view of the lowest-ranked pirate and work up from there.
The lowest ranked pirate (we’ll call him P10 and work our way up to the captain, who’s P1) would love to have every other pirate die so he can take all 10 gold pieces for himself. He also has no threat to his life, because by the time he’s promoted to captain, it means everyone else is dead.
P9 would also love to have all pirates above him killed, because if it gets down to just himself and P10, he can allot all 10 gold pieces to himself and none to P10. The vote will end up 1-1 (P9 will vote in favor and P10 will vote against), and since half of the members voted for the plan, it’ll be enacted and P9 will not be killed. So he, too, has no threat to his life.
P8 knows all this. He knows that if it gets down to the final two pirates, it’ll end up as:
P9: 10 pieces
P10: 0 pieces
And he knows that P10 and P9 know this, so if it ends up getting to the point where there only three pirates left and he’s captain, he’ll have that in mind. He could allot the gold pieces like this:
P8: 10
P9: 0
P10: 0
That’s much worse for P9 than the outcome if P8 is killed, so P9 will vote against the plan. But P10 is in the same position as he’ll be if P8 is killed: zero gold pieces. This is when rule #3 kicks in: the pirates are bloodthirsty. If it won’t put either a pirate’s life or bounty at stake, “a pirate always votes to kill.” In this case, P10 will vote to kill because it won’t affect his life or bounty either way. So if P8 wants to win P10’s vote, he needs to give him one gold piece. Then rule #2 kicks in—greed. P10 will understand that he should vote in favor of the plan, because if he doesn’t, he’ll get nothing after P8 is killed, so he’ll vote for the plan and it’ll be enacted. P8’s life will be spared and he’ll make off with an awesome nine gold pieces. So P8 will allot the pieces like this:
P8: 9
P9: 0
P10: 1
In the case where there are four pirates left and P7 is captain, P7 knows all of the above and he knows that the other three pirates all know all of the above—and he only needs one of the three other pirates to vote in favor of his plan for it to be enacted in order to spare his life. So he’ll allot them like this:
P7: 9
P8: 0
P9: 1
P10: 0
He knows P8 and P10 will vote against it, because if he dies, they’ll be in the above situation where P8 gets nine pieces and P10 gets one, and his plan has them both getting zero. But he’ll get P9’s vote, because P9 knows that if he votes against it, P8 will enact his plan and P9 will get nothing. One piece is better than zero pieces, so P7’s plan will be enacted.
You can continue this logic upwards through the ranks. In each case, if the highest-ranked pirate allots one piece to all pirates who will be getting zero pieces should he be killed, his plan will be enacted, so it’ll go like this:
If it gets down to the final five pirates, the plan will be:
P6: 8
P7: 0
P8: 1
P9: 0
P10: 1
If it gets down to the final six pirates, the plan will be:
P5: 8
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
If it gets down to the final seven pirates, the plan will be:
P4: 7
P5: 0
P6: 1
P7: 0
P8: 1
P9: 0
P10: 1
If it gets down to the final eight pirates, the plan will be:
P3: 7
P4: 0
P5: 1
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
If it gets down to the final nine pirates, the plan will be:
P2: 6
P3: 0
P4: 1
P5: 0
P6: 1
P7: 0
P8: 1
P9: 0
P10: 1
But no one will die at all, because the original captain will allot them like this:
P1: 6
P2: 0
P3: 1
P4: 0
P5: 1
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
He’ll get votes from P3, P5, P7, P9, and himself to create a 5-5 split—and his plan will be enacted.
So the solution is: 6, 0, 1, 0, 1, 0, 1, 0, 1, 0
Think of it from the view of the lowest-ranked pirate and work up from there.
The lowest ranked pirate (we’ll call him P10 and work our way up to the captain, who’s P1) would love to have every other pirate die so he can take all 10 gold pieces for himself. He also has no threat to his life, because by the time he’s promoted to captain, it means everyone else is dead.
P9 would also love to have all pirates above him killed, because if it gets down to just himself and P10, he can allot all 10 gold pieces to himself and none to P10. The vote will end up 1-1 (P9 will vote in favor and P10 will vote against), and since half of the members voted for the plan, it’ll be enacted and P9 will not be killed. So he, too, has no threat to his life.
P8 knows all this. He knows that if it gets down to the final two pirates, it’ll end up as:
P9: 10 pieces
P10: 0 pieces
And he knows that P10 and P9 know this, so if it ends up getting to the point where there only three pirates left and he’s captain, he’ll have that in mind. He could allot the gold pieces like this:
P8: 10
P9: 0
P10: 0
That’s much worse for P9 than the outcome if P8 is killed, so P9 will vote against the plan. But P10 is in the same position as he’ll be if P8 is killed: zero gold pieces. This is when rule #3 kicks in: the pirates are bloodthirsty. If it won’t put either a pirate’s life or bounty at stake, “a pirate always votes to kill.” In this case, P10 will vote to kill because it won’t affect his life or bounty either way. So if P8 wants to win P10’s vote, he needs to give him one gold piece. Then rule #2 kicks in—greed. P10 will understand that he should vote in favor of the plan, because if he doesn’t, he’ll get nothing after P8 is killed, so he’ll vote for the plan and it’ll be enacted. P8’s life will be spared and he’ll make off with an awesome nine gold pieces. So P8 will allot the pieces like this:
P8: 9
P9: 0
P10: 1
In the case where there are four pirates left and P7 is captain, P7 knows all of the above and he knows that the other three pirates all know all of the above—and he only needs one of the three other pirates to vote in favor of his plan for it to be enacted in order to spare his life. So he’ll allot them like this:
P7: 9
P8: 0
P9: 1
P10: 0
He knows P8 and P10 will vote against it, because if he dies, they’ll be in the above situation where P8 gets nine pieces and P10 gets one, and his plan has them both getting zero. But he’ll get P9’s vote, because P9 knows that if he votes against it, P8 will enact his plan and P9 will get nothing. One piece is better than zero pieces, so P7’s plan will be enacted.
You can continue this logic upwards through the ranks. In each case, if the highest-ranked pirate allots one piece to all pirates who will be getting zero pieces should he be killed, his plan will be enacted, so it’ll go like this:
If it gets down to the final five pirates, the plan will be:
P6: 8
P7: 0
P8: 1
P9: 0
P10: 1
If it gets down to the final six pirates, the plan will be:
P5: 8
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
If it gets down to the final seven pirates, the plan will be:
P4: 7
P5: 0
P6: 1
P7: 0
P8: 1
P9: 0
P10: 1
If it gets down to the final eight pirates, the plan will be:
P3: 7
P4: 0
P5: 1
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
If it gets down to the final nine pirates, the plan will be:
P2: 6
P3: 0
P4: 1
P5: 0
P6: 1
P7: 0
P8: 1
P9: 0
P10: 1
But no one will die at all, because the original captain will allot them like this:
P1: 6
P2: 0
P3: 1
P4: 0
P5: 1
P6: 0
P7: 1
P8: 0
P9: 1
P10: 0
He’ll get votes from P3, P5, P7, P9, and himself to create a 5-5 split—and his plan will be enacted.
So the solution is: 6, 0, 1, 0, 1, 0, 1, 0, 1, 0