100 greedy pirates and division of treasure
A band of 100 pirates attacked a precious cargo and looted a huge treasure from it. Now they want to divide it among themselves. They all agreed with the following approach
Pirates will be numbered based on seniority and there are no two pirates with the same seniority. Senior most pirate will be numbered 1 and junior most pirate is numbered 100.
Senior most pirate will divide the treasure and one can assume that he will actually divide it equally
All pirates will vote if they feel that division is fair. If half or more pirates disagree then the senior most pirate who divided the treasure will be killed and the process will repeat with the next senior most pirate.
Here we need to note few points
Pirates are greedy so they would like others to get killed so their share becomes bigger
Pirates are intelligent enough to make the decision to avoid getting themselves killed
Tell me how many pirates will be left on the ship at the end.
Hint 1
Pirate will vote yes only if they feel that a no will start a chain which will kill them as well
Hint 2
Start thinking for scenario where only 1 pirate was on ship initially. Then try for 2, 3, 4 and so on
Hint 3
If there are 3 pirates numbered 1,2,3 where 1 is senior most, 1 will vote fair, even 2 will vote fair as if he don't do that then in next turn he will be killed.
Hint 4
If you have 4 pirates to start and let's number them 1,2,3,4 where 1 being senior most. 1 will vote yes else he will be killed. 2,3,4 will vote no as they know that voting will stop once there are 3 pirates
Solution
If 1 pirate then no problems -the answer is 1
If 2 pirates then other pirate will always vote unfair as in equal vote also the senior pirate will be killed leaving entire treasure to only 1 pirate - the answer is 1
if 3 pirate numbered 1,2,3 where 1 is senior most, 1 will vote fair, even 2 will vote fair as if he don't do that then in next turn (with 2 pirates) he will also be killed so voting will stop here - the answer is 3
If you have 4 pirates to start and let's number them 1,2,3,4 where 1 being senior most. 1 will vote fair else he will be killed, however 2,3,4 will vote unfair as they know that voting will stop once there are 3 pirates and hence killing senior most is beneficial without putting themselves on risk - the answer is 3
Same goes for 5 and 6 pirates as 3 vote will continue to be unfair hence pirate dividing treasure will be killed - the answer is 3
However things changes as soon as 7 pirates are there where 3 junior most pirates will still say unfair but all 4 senior most will always say fair else they will be killed subsequently - the answer is 7
You will notice that answer can be 1, 3, 7..... where voting will stop
This is 2n − 1
so next possible answers are 15, 31, 63, 127.....
As we have 100 pirates, voting will stop once there are 63 pirates