Ten pirates find a buried treasure of 100 pieces of gold.
The pirates have a strict ranking in their group: Pirate 1 is the lead pirate, Pirate 2 is second-in-command, Pirate 3 is the third most powerful pirate, and so on.
Based on this ranking, the pirates decide on a system to determine how to split up the 100 pieces of gold. The lead pirate (Pirate 1) will propose a way to divy it up. Then all the pirates (including the lead pirate) will vote on that proposal. If 50% or more of the pirates agree on the system, then that is how the gold will be divied up. However, if less than 50% of the pirates vote for the proposal, then the lead pirate will be be killed. The next-most powerful pirate will then become the lead pirate, and they'll restart the process (Pirate 2 will suggest a way to divy up the gold and it will be voted on by the rest of the pirates). This will keep going on until finally a proposal is agreed upon.
All of the pirates are very smart and very greedy. Each pirate will vote against a proposal if they know that they would end up with more gold if that proposal were to fail. A pirate also will never vote for a proposal that gives him 0 pieces of gold.
You are Pirate 1. You must come up with a proposal that will give you as much gold as possible, without getting yourself killed. Keep in mind that the rest of the pirates all know that if your proposal fails, then Pirate 2 will succeed at coming up with a plan that benefits him the most while not getting him killed.
What's your proposal?
You should keep 96 pieces of gold for yourself, and give 1 piece of gold each to Pirate 3, Pirate 5, Pirate 7, and Pirate 9.
To see why, let's look at the situation where there are only two pirates, and you're the lead pirate. Your proposal would be to give yourself all 100 pieces gold. Pirate 2 would vote against this and you would vote for it, giving you 50% of the vote and letting it pass. And you would get 100 pieces of gold.
What about for 3 pirates, with you as the lead pirate? Well, Pirates 2 and 3 know that if your proposal fails, then they will find themselves in the situation described above for 2 pirates, in which Pirate 2 will get all the gold, and Pirate 3 will get none. Pirate 2 would love this situation, but Pirate 3 would hate it. So you just propose to give Pirate 3 one piece of gold, while giving Pirate 2 no gold. Pirate 2 will vote against this, but Pirate 3 will vote for it because he knows that if this proposal fails, he'll get no gold. So your proposal will pass, you'll get 99 pieces of gold, and Pirate 3 gets 1 piece.
For 4 pirates, the situation is similar again. Pirates 2 and 4 would love your proposal to fail since they know that with only 3 pirates, they'll both get gold, whereas Pirate 3 will get none. So you just give Pirate 3 one piece of gold and keep the other 99 for yourself, and this proposal will hold up with 50% of the votes (from you and Pirate 3).
We can follow this same logic all the way up to 10 pirates, where you give one piece of gold each to Pirates 3, 5, 7, and 9, and keep the rest for yourself. You know these four pirates will support your proposal because they know they'll each get 0 pieces of gold if your proposal fails.