- Prepare
All Platforms Programming Aptitude Syllabus Interview Preparation Interview Exp. Off Campus - Prime Video
- Prime Mock

- Interview Experience
- Prime VideoNew
- Prime Mock
- Interview Prep
- Nano Degree
- Prime Video
- Prime Mock

# 5 Pirates Puzzle

**5 Pirates and 100 Gold Coins**

There are 5 pirates who want to distribute a 100 coins amongst themselves.
Following are the rules they set up for coins distribution:-
- The senior most amongst the 5 will propose a distribution.
- If he gets at least a 50% approval, then his idea will be accepted and the coins will be distributed accordingly.
- If he does not get a 50% approval, he will be thrown overboard and the next senior most pirate will give a distribution.
- Again his proposal will go through the same procedure as above.

- To survive
- To get the most coins
- To see the other pirates die

**5 Pirates and 100 Gold Coins**

There are 5 pirates who want to distribute a 100 coins amongst themselves.
Following are the rules they set up for coins distribution:-
- The senior most amongst the 5 will propose a distribution.
- If he gets at least a 50% approval, then his idea will be accepted and the coins will be distributed accordingly.
- If he does not get a 50% approval, he will be thrown overboard and the next senior most pirate will give a distribution.
- Again his proposal will go through the same procedure as above.

- To survive
- To get the most coins
- To see the other pirates die

**Solution**

Let us name the pirates A, B, C, D and E, such that A is the senior most pirate and from there the hierarchy goes down alphabetically.

Understanding all the facts, the following cases can arise for each pirate.

**Case:1-** Where pirates A , B and C are dead.

D will propose the following distribution

D = 100 , E = 0

between himself and E. Since there are only two pirates who are alive D gets 50% of the votes and his proposal is accepted. E won’t get any coins but will survive.

**Case 2:-** Where pirates A and B are dead,

C being next in line will propose the following distribution

C = 99 , D = 0 , E = 1

C will not give D any coin because if C dies, D can get all the coins(as seen in case 1).

E will vote in favor of this distribution because if C dies D will take all the coins and E will get nothing (case 1) here at least he is getting 1 coin.

**Case 3:-** Where pirate A is dead.

B will distribute the coins like this:

`B = 99 , C = 0 , D = 1 , E = 0`

He will not give C any coin because C will most likely vote against B. Since C profits more with B dead(case 2).

B will also not give any coin to E for the same reason. B will give a coin to D, and secure 50% of votes, because D knows that if C distributes he will get no coins(case 2)

**Case 4:** Where A distributes the coins.

A distributes the coin in the following way:

`A = 98 , B = 0 , C = 1 , D = 0 , E = 1`

He will not give any coins to B and D as they know they will profit more from A’s death(case 3), and therefore will vote against A.

Since there are 5 pirates, A needs to bribe two pirates C and E to get the majority. C and E will support E because if A dies B will not give them any coins(case 3)

Therefore these are the possible cases that will happen.

From the above the **maximum number of coins** that each of the pirate can get following their distribution:

**E-0**(will not get any chance of proposing a distribution)**D-100**(case 1)**C-99**(case 2)**B – 99**(case 3)**A-98**(case 4

**Ages of the daughters Answer****Rectangular Cake Puzzle Answer****Truth and Lie Puzzle Answer****Aircraft Puzzle Answer****Horse****Ratio of Boys and Girls Answer****Blind Games Answer****Chaos in the Bus Answer****Birthday Puzzle Answer****Measuring 7 litres Answer****Bulb in the Next Room Answer****Arranging 10 coconuts Answer****Married or Unmarried Answer****Gold Bar Puzzle Answer**

**Ages of the daughters Answer****Rectangular Cake Puzzle Answer****Truth and Lie Puzzle Answer****Aircraft Puzzle Answer****Horse****Ratio of Boys and Girls Answer****Blind Games Answer****Chaos in the Bus Answer****Birthday Puzzle Answer****Measuring 7 litres Answer****Bulb in the Next Room Answer****Arranging 10 coconuts Answer****Married or Unmarried Answer****Gold Bar Puzzle Answer**

Login/Signup to comment