Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-22 Thread Saif Hasan
Hi, Here is the extension of this problem.. What happens there are more than 5 pirates..especially case becomes interesting when number of pirates exceeds 200 On Fri, Apr 22, 2011 at 11:57 AM, Anders Ma wrote: > Your analysis is nice, but the result I think it should be 97, 0, 1, > 2, 0,

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Anders Ma
Your analysis is nice, but the result I think it should be 97, 0, 1, 2, 0, this proposal prevents the oldest being thrown overboard and get most gold coins. 5 is the oldest, 1 is the youngest pirate. Pirate 1 2 3 4 5 5. 0 2 1 0 97 4. 0 1 0 99 - 3. 1 0 99 - -

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Anders Ma
excellent analysis! On Thu, Apr 21, 2011 at 7:43 PM, vaibhav shukla wrote: > lets consider if there were only 1 pirate. obviously he would take it all > for himself and no one would complain. > > if there were 2 pirates, pirate 2 being the most senior, he would just vote > for himself and that wo

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav shukla
nopesdats not the point.in every election one can vote for himself also On Thu, Apr 21, 2011 at 11:12 PM, Shuaib wrote: > I think the original statement says that " > * > The oldest pirate proposes how to share the coins, and all pirates > remaining will vote for or against it." > * > >

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Shuaib
I think the original statement says that " The oldest pirate proposes how to share the coins, and all pirates remaining will vote for or against it." So the pirate proposing the distribution can't vote for himself. -- Shuaib http://twitter.com/ShuaibKhan http://bytehood.com/ On Thursday, Apri

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav shukla
lets consider if there were only 1 pirate. obviously he would take it all for himself and no one would complain. if there were 2 pirates, pirate 2 being the most senior, he would just vote for himself and that would be 50% of the vote, so he’s obviously going to keep all the money for himself. if

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Shuaib
Not necessarily. Whatever the senior pirate proposes will have to be accepted by pirate 4th and 2nd (assuming 5th is senior most) otherwise pirate 1st gets everything. So it is oldest pirate's call. He can I guess take it all. Shuaib http://twitter.com/ShuaibKhan http://www.bytehood.com/ On 21

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Kunal Yadav
So the explanation is:- Lets say,, there were only 2. Then the top guy does not need any vote. He will keep all 100. But the bottom guy can see this. So when 3 people were alive, he will support the 3rd guy. The third guy is greedy and he will keep 99 and give 1 to bottom guy. Bottom fellow will h

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav agrawal
They can still disagree and the pirate would be thrown out as the puzzle states On Thu, Apr 21, 2011 at 3:21 PM, durgaprasad k wrote: > @vaibhav : if they dont agree for 1 gold icon they will be thrown out. so > they will accept the 1 gold coin to stay on . > > > > On Thu, Apr 21, 2011 at 3:

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread durgaprasad k
@vaibhav : if they dont agree for 1 gold icon they will be thrown out. so they will accept the 1 gold coin to stay on . On Thu, Apr 21, 2011 at 3:10 PM, vaibhav agrawal wrote: > Why the two pirates would agree when they are getting only one coins each? > > > On Thu, Apr 21, 2011 at 3:05 PM, har

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav agrawal
Why the two pirates would agree when they are getting only one coins each? On Thu, Apr 21, 2011 at 3:05 PM, harshit agrawal wrote: > thwy will be shared according to > senior most pirate(5th)=98 > 4th =0 > 3rd =1 > 2nd=0 > 1st =1 > > > On Thu, Apr 21, 2011 at 2:54 PM, Anders Ma wrote: > >> the c

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread harshit agrawal
thwy will be shared according to senior most pirate(5th)=98 4th =0 3rd =1 2nd=0 1st =1 On Thu, Apr 21, 2011 at 2:54 PM, Anders Ma wrote: > the coins will be shared the way the oldest pirate proposes. > > On Thu, Apr 21, 2011 at 3:51 PM, Lavesh Rawat > wrote: > > Pirate Puzzle > > > > 5 pirates

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Anders Ma
the coins will be shared the way the oldest pirate proposes. On Thu, Apr 21, 2011 at 3:51 PM, Lavesh Rawat wrote: > Pirate Puzzle > > 5 pirates of different ages have a treasure of 100 gold coins. > On their ship, they decide to split the coins using this scheme: > The oldest pirate proposes how

[algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread Lavesh Rawat
* Pirate Puzzle 5 pirates of different ages have a treasure of 100 gold coins. On their ship, they decide to split the coins using this scheme: The oldest pirate proposes how to share the coins, and all pirates remaining will vote for or against it. If 50% or more of the pirates vote for it, then