The Pirate Problem
I spent last night at the Swamp with a team of folks from Ultimate Software, a group from Weston, FL, and a few other prospective hires. They… read this blog (Hi!) and I have an interview with them in a few hours. At any rate, the last things we talked about last night were various logic puzzles and riddles. I offered to bring an entertaining one along to my interview with them this afternoon and I thought I’d post it here for your entertainment.
I’ll put up solutions in a few days. Note that “political” solutions aren’t valid answers since these are “logic” puzzles.
Also, googling for the answer isn’t a valid solution method, either.
These were given to the ACM Programming Team last year by Dave Small.
The Hard Problem
You have 1000 pirates who are all extremely greedy, heartless, bloodthirsty and perfectly rational. They’re also aware that all the other pirates share these characteristics. They’re all ranked by the order in which they joined the group, from pirate one down to a thousand.
They’ve stumbled across a huge horde of treasure and they have to decide how to split it up. Every day the lowest ranked pirate proposes a (not necessarily equal) way to divide the booty and then the other pirates vote on whether to follow this method. If more than 50% of them vote to split it the treasure gets split. Otherwise, they kill the lowest ranking pirate and repeat the process until more than half of the pirates decide to split the treasure.
The question is: if you are pirate N, what solution do you propose to ensure that you do not walk the plank?
The Easier Problem
You have 1000 pirates who are all extremely greedy, heartless and perfectly rational. They’re also aware that all the other pirates share these characteristics. They’re all ranked by the order in which they joined the group, from pirate one down to a thousand.
They’ve stumbled across a huge horde of treasure and they have to decide how to split it up. Every day they will vote to either kill the lowest ranking pirate or split the treasure up among the surviving pirates. If 50% or more of them vote to split it the treasure gets split. Otherwise, they kill the lowest ranking pirate and repeat the process until half or more of the pirates decide to split the treasure.
The question is: at what point will the treasure be split and what will the precise vote be?
2 Comments so far
Leave a reply
did you put solutions, or link to these, somewhere? Also, any idea about how old the problems are? the oldest link I have found was yet from XXIth century, 2001.
No, I neglected putting solutions online as I specified I would in the post.
Hard Version
Pirate N’s goal is to appease more than 50% of the other pirates thus ensuring her survival. Since pirate N is greedy, she also wants to save as much of the booty as she can, so the solution is… (for brevity I’ll assume coins, but this works with shares of rubies, interests in vorpal scimitars, idols of flying spaghetti monsters and other loot)
There are actually several other solutions for any arbitrary pirate N which are more optimal, but I believe this is the only general solution for N > 4.
The Easier Problem
488 pirates will die.
Looking at the problem in the reversed direction…