Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Gaurav Popli
oh sorry...i didnt see.yeah..you are rightthanks..

On Sat, Jul 23, 2011 at 1:06 AM, sunny agrawal  wrote:
> But that will save only 50% of the prisoners...as compare to 99.5% in
> that of even Odd case
> Read that post carefully
>
> On Sat, Jul 23, 2011 at 1:04 AM, Gaurav Popli  wrote:
>>
>> or we cud make more easy for prisoners...instead of counting whether
>> even or notthe person at the back can say the color of the hat
>> which the prisoner in the immediate front is wearing.
>> by this atleast 50% prisoners will be relaesed/.
>> it will all depend on thr cooperation ;)
>>
>> On Fri, Jul 22, 2011 at 11:25 PM, Vishal Jain  wrote:
>> > I think Aditi's solution is correct. I was doing the same thing using
>> > XOR
>> > function... So basically I was saying to use XOR and interviewer was
>> > asking
>> > for something better... I could not find this solution...
>> > Thanks Aditi.
>> > Thanks & Regards
>> > Vishal Jain
>> > MNo: +91-9540611889
>> > Tweet @jainvis
>> > Blog @ jainvish.blogspot.com
>> > Success taste better when target achieved is bigger.
>> >
>> > P We have a responsibility to the environment.
>> >
>> > Before printing this e-mail or any other document, let's ask ourselves
>> > whether we need a hard copy.
>> >
>> >
>> > On Fri, Jul 22, 2011 at 10:19 PM, aditi garg 
>> > wrote:
>> >>
>> >> I think this can be answered like dis...
>> >> let us say that the persons have decided amongst themselves that if the
>> >> the number of people wearing white in front of dem is even he wud say
>> >> white
>> >> and if odd he wud say black
>> >> Now suppose the 100th person counts the number of hats and finds it to
>> >> be
>> >> even... he wud say white...
>> >> now the 99th person will do the same...if he still finds the number to
>> >> be
>> >> even and since the 100th person sed white(i.e even) he would say
>> >> black...now
>> >> if the 100th person had sed black (ie odd white) and the count comes
>> >> out to
>> >> be even thus 99 wud be wearing a white hat...
>> >> Now that 98th person knows dat 99 had sed the correct hat and using the
>> >> same method can say the correct hat color...thus all can be saved
>> >> except the
>> >> 100th prisoner...
>> >> Also note dat the 100th prisoner also has a 50% chance to survive...
>> >> Hope dis helps :)
>> >>
>> >> On Fri, Jul 22, 2011 at 10:05 PM, Shubham Maheshwari
>> >>  wrote:
>> >>>
>> >>> could some1 plz post the xplainations ...
>> >>>
>> >>> On Fri, Jul 22, 2011 at 8:04 PM, Pankaj 
>> >>> wrote:
>> 
>>  Chetan,
>>  No. How could you relate this problem with that? Do you find
>>  something
>>  similar?
>>  ~
>>  Pankaj
>> 
>>  On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor
>>   wrote:
>> >
>> > josehus problem???
>> >
>> > On Fri, Jul 22, 2011 at 7:57 PM, Pankaj 
>> > wrote:
>> >>
>> >> Skipp Riddle,
>> >> Yes.
>> >> 100th prisoner will risk his life. Similar puzzle was discuss
>> >> recently. Does anyone remember the name or thread?
>> >>
>> >> ~
>> >> Pankaj
>> >>
>> >> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe
>> >>  wrote:
>> >>>
>> >>> Worst case 99 get released.
>> >>> Is that correct..?
>> >>>
>> >>> --
>> >>> You received this message because you are subscribed to the Google
>> >>> Groups "Algorithm Geeks" group.
>> >>> To post to this group, send email to algogeeks@googlegroups.com.
>> >>> To unsubscribe from this group, send email to
>> >>> algogeeks+unsubscr...@googlegroups.com.
>> >>> For more options, visit this group at
>> >>> http://groups.google.com/group/algogeeks?hl=en.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Algorithm Geeks" group.
>> >> To post to this group, send email to algogeeks@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> algogeeks+unsubscr...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/algogeeks?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Algorithm Geeks" group.
>> > To post to this group, send email to algogeeks@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > algogeeks+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/algogeeks?hl=en.
>> 
>>  --
>>  You received this message because you are subscribed to the Google
>>  Groups "Algorithm Geeks" group.
>>  To post to this group, send email to algogeeks@googlegroups.com.
>>  To unsubscribe from this group, send email to
>>  algogeeks+unsubscr...@googlegroups.com.
>>  For more options, visit this group at
>>  http://groups.google.com/group/algogeeks?hl=en.
>> >>>
>> >>> --
>> >>> You received this mess

Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread sunny agrawal
But that will save only 50% of the prisoners...as compare to 99.5% in
that of even Odd case
Read that post carefully

On Sat, Jul 23, 2011 at 1:04 AM, Gaurav Popli  wrote:

> or we cud make more easy for prisoners...instead of counting whether
> even or notthe person at the back can say the color of the hat
> which the prisoner in the immediate front is wearing.
> by this atleast 50% prisoners will be relaesed/.
> it will all depend on thr cooperation ;)
>
> On Fri, Jul 22, 2011 at 11:25 PM, Vishal Jain  wrote:
> > I think Aditi's solution is correct. I was doing the same thing using XOR
> > function... So basically I was saying to use XOR and interviewer was
> asking
> > for something better... I could not find this solution...
> > Thanks Aditi.
> > Thanks & Regards
> > Vishal Jain
> > MNo: +91-9540611889
> > Tweet @jainvis
> > Blog @ jainvish.blogspot.com
> > Success taste better when target achieved is bigger.
> >
> > P We have a responsibility to the environment.
> >
> > Before printing this e-mail or any other document, let's ask ourselves
> > whether we need a hard copy.
> >
> >
> > On Fri, Jul 22, 2011 at 10:19 PM, aditi garg 
> > wrote:
> >>
> >> I think this can be answered like dis...
> >> let us say that the persons have decided amongst themselves that if the
> >> the number of people wearing white in front of dem is even he wud say
> white
> >> and if odd he wud say black
> >> Now suppose the 100th person counts the number of hats and finds it to
> be
> >> even... he wud say white...
> >> now the 99th person will do the same...if he still finds the number to
> be
> >> even and since the 100th person sed white(i.e even) he would say
> black...now
> >> if the 100th person had sed black (ie odd white) and the count comes out
> to
> >> be even thus 99 wud be wearing a white hat...
> >> Now that 98th person knows dat 99 had sed the correct hat and using the
> >> same method can say the correct hat color...thus all can be saved except
> the
> >> 100th prisoner...
> >> Also note dat the 100th prisoner also has a 50% chance to survive...
> >> Hope dis helps :)
> >>
> >> On Fri, Jul 22, 2011 at 10:05 PM, Shubham Maheshwari
> >>  wrote:
> >>>
> >>> could some1 plz post the xplainations ...
> >>>
> >>> On Fri, Jul 22, 2011 at 8:04 PM, Pankaj 
> >>> wrote:
> 
>  Chetan,
>  No. How could you relate this problem with that? Do you find something
>  similar?
>  ~
>  Pankaj
> 
>  On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor
>   wrote:
> >
> > josehus problem???
> >
> > On Fri, Jul 22, 2011 at 7:57 PM, Pankaj 
> > wrote:
> >>
> >> Skipp Riddle,
> >> Yes.
> >> 100th prisoner will risk his life. Similar puzzle was discuss
> >> recently. Does anyone remember the name or thread?
> >>
> >> ~
> >> Pankaj
> >>
> >> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe
> >>  wrote:
> >>>
> >>> Worst case 99 get released.
> >>> Is that correct..?
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Algorithm Geeks" group.
> >>> To post to this group, send email to algogeeks@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> algogeeks+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/algogeeks?hl=en.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/algogeeks?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/algogeeks?hl=en.
> 
>  --
>  You received this message because you are subscribed to the Google
>  Groups "Algorithm Geeks" group.
>  To post to this group, send email to algogeeks@googlegroups.com.
>  To unsubscribe from this group, send email to
>  algogeeks+unsubscr...@googlegroups.com.
>  For more options, visit this group at
>  http://groups.google.com/group/algogeeks?hl=en.
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "Algorithm Geeks" group.
> >>> To post to this group, send email to algogeeks@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> algogeeks+unsubscr...@googlegroups.com.
> >>> For more options, visit

Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Gaurav Popli
or we cud make more easy for prisoners...instead of counting whether
even or notthe person at the back can say the color of the hat
which the prisoner in the immediate front is wearing.
by this atleast 50% prisoners will be relaesed/.
it will all depend on thr cooperation ;)

On Fri, Jul 22, 2011 at 11:25 PM, Vishal Jain  wrote:
> I think Aditi's solution is correct. I was doing the same thing using XOR
> function... So basically I was saying to use XOR and interviewer was asking
> for something better... I could not find this solution...
> Thanks Aditi.
> Thanks & Regards
> Vishal Jain
> MNo: +91-9540611889
> Tweet @jainvis
> Blog @ jainvish.blogspot.com
> Success taste better when target achieved is bigger.
>
> P We have a responsibility to the environment.
>
> Before printing this e-mail or any other document, let's ask ourselves
> whether we need a hard copy.
>
>
> On Fri, Jul 22, 2011 at 10:19 PM, aditi garg 
> wrote:
>>
>> I think this can be answered like dis...
>> let us say that the persons have decided amongst themselves that if the
>> the number of people wearing white in front of dem is even he wud say white
>> and if odd he wud say black
>> Now suppose the 100th person counts the number of hats and finds it to be
>> even... he wud say white...
>> now the 99th person will do the same...if he still finds the number to be
>> even and since the 100th person sed white(i.e even) he would say black...now
>> if the 100th person had sed black (ie odd white) and the count comes out to
>> be even thus 99 wud be wearing a white hat...
>> Now that 98th person knows dat 99 had sed the correct hat and using the
>> same method can say the correct hat color...thus all can be saved except the
>> 100th prisoner...
>> Also note dat the 100th prisoner also has a 50% chance to survive...
>> Hope dis helps :)
>>
>> On Fri, Jul 22, 2011 at 10:05 PM, Shubham Maheshwari
>>  wrote:
>>>
>>> could some1 plz post the xplainations ...
>>>
>>> On Fri, Jul 22, 2011 at 8:04 PM, Pankaj 
>>> wrote:

 Chetan,
 No. How could you relate this problem with that? Do you find something
 similar?
 ~
 Pankaj

 On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor
  wrote:
>
> josehus problem???
>
> On Fri, Jul 22, 2011 at 7:57 PM, Pankaj 
> wrote:
>>
>> Skipp Riddle,
>> Yes.
>> 100th prisoner will risk his life. Similar puzzle was discuss
>> recently. Does anyone remember the name or thread?
>>
>> ~
>> Pankaj
>>
>> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe
>>  wrote:
>>>
>>> Worst case 99 get released.
>>> Is that correct..?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.

 --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>>
>> --
>> Aditi Garg
>> Undergraduate Student
>> Electronics & Communication Divison
>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>> Sector 3, Dwarka
>> New Delhi
>> 9718388816
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To 

Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Vishal Jain
I think Aditi's solution is correct. I was doing the same thing using XOR
function... So basically I was saying to use XOR and interviewer was asking
for something better... I could not find this solution...

Thanks Aditi.

Thanks & Regards
Vishal Jain
MNo: +91-9540611889
Tweet @jainvis
Blog @ jainvish.blogspot.com
Success taste better when target achieved is bigger.

P *We have a responsibility to the environment.*

*Before printing this e-mail or any other document, let's ask
ourselves whether we need a hard copy.*




On Fri, Jul 22, 2011 at 10:19 PM, aditi garg wrote:

> I think this can be answered like dis...
> let us say that the persons have decided amongst themselves that if the the
> number of people wearing white in front of dem is even he wud say white and
> if odd he wud say black
> Now suppose the 100th person counts the number of hats and finds it to be
> even... he wud say white...
> now the 99th person will do the same...if he still finds the number to be
> even and since the 100th person sed white(i.e even) he would say black...now
> if the 100th person had sed black (ie odd white) and the count comes out to
> be even thus 99 wud be wearing a white hat...
> Now that 98th person knows dat 99 had sed the correct hat and using the
> same method can say the correct hat color...thus all can be saved except the
> 100th prisoner...
> Also note dat the 100th prisoner also has a 50% chance to survive...
>
> Hope dis helps :)
>
>
> On Fri, Jul 22, 2011 at 10:05 PM, Shubham Maheshwari <
> shubham@gmail.com> wrote:
>
>> could some1 plz post the xplainations ...
>>
>>
>> On Fri, Jul 22, 2011 at 8:04 PM, Pankaj wrote:
>>
>>> Chetan,
>>>
>>> No. How could you relate this problem with that? Do you find something
>>> similar?
>>>
>>> ~
>>> Pankaj
>>>
>>>
>>> On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor <
>>> chetankapoor...@gmail.com> wrote:
>>>
 josehus problem???


 On Fri, Jul 22, 2011 at 7:57 PM, Pankaj wrote:

> Skipp Riddle,
> Yes.
> 100th prisoner will risk his life. Similar puzzle was discuss recently.
> Does anyone remember the name or thread?
>
>
> ~
> Pankaj
>
>
> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe  > wrote:
>
>> Worst case 99 get released.
>> Is that correct..?
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
> 9718388816
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, 

Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread aditi garg
I think this can be answered like dis...
let us say that the persons have decided amongst themselves that if the the
number of people wearing white in front of dem is even he wud say white and
if odd he wud say black
Now suppose the 100th person counts the number of hats and finds it to be
even... he wud say white...
now the 99th person will do the same...if he still finds the number to be
even and since the 100th person sed white(i.e even) he would say black...now
if the 100th person had sed black (ie odd white) and the count comes out to
be even thus 99 wud be wearing a white hat...
Now that 98th person knows dat 99 had sed the correct hat and using the same
method can say the correct hat color...thus all can be saved except the
100th prisoner...
Also note dat the 100th prisoner also has a 50% chance to survive...

Hope dis helps :)

On Fri, Jul 22, 2011 at 10:05 PM, Shubham Maheshwari
wrote:

> could some1 plz post the xplainations ...
>
>
> On Fri, Jul 22, 2011 at 8:04 PM, Pankaj  wrote:
>
>> Chetan,
>>
>> No. How could you relate this problem with that? Do you find something
>> similar?
>>
>> ~
>> Pankaj
>>
>>
>> On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor > > wrote:
>>
>>> josehus problem???
>>>
>>>
>>> On Fri, Jul 22, 2011 at 7:57 PM, Pankaj wrote:
>>>
 Skipp Riddle,
 Yes.
 100th prisoner will risk his life. Similar puzzle was discuss recently.
 Does anyone remember the name or thread?


 ~
 Pankaj


 On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe 
 wrote:

> Worst case 99 get released.
> Is that correct..?
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Aditi Garg
Undergraduate Student
Electronics & Communication Divison
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
Sector 3, Dwarka
New Delhi

9718388816

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Shubham Maheshwari
could some1 plz post the xplainations ...

On Fri, Jul 22, 2011 at 8:04 PM, Pankaj  wrote:

> Chetan,
>
> No. How could you relate this problem with that? Do you find something
> similar?
>
> ~
> Pankaj
>
>
> On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor 
> wrote:
>
>> josehus problem???
>>
>>
>> On Fri, Jul 22, 2011 at 7:57 PM, Pankaj wrote:
>>
>>> Skipp Riddle,
>>> Yes.
>>> 100th prisoner will risk his life. Similar puzzle was discuss recently.
>>> Does anyone remember the name or thread?
>>>
>>>
>>> ~
>>> Pankaj
>>>
>>>
>>> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe 
>>> wrote:
>>>
 Worst case 99 get released.
 Is that correct..?

  --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Pankaj
Chetan,

No. How could you relate this problem with that? Do you find something
similar?

~
Pankaj

On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor wrote:

> josehus problem???
>
>
> On Fri, Jul 22, 2011 at 7:57 PM, Pankaj  wrote:
>
>> Skipp Riddle,
>> Yes.
>> 100th prisoner will risk his life. Similar puzzle was discuss recently.
>> Does anyone remember the name or thread?
>>
>>
>> ~
>> Pankaj
>>
>>
>> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe wrote:
>>
>>> Worst case 99 get released.
>>> Is that correct..?
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread chetan kapoor
josehus problem???

On Fri, Jul 22, 2011 at 7:57 PM, Pankaj  wrote:

> Skipp Riddle,
> Yes.
> 100th prisoner will risk his life. Similar puzzle was discuss recently.
> Does anyone remember the name or thread?
>
>
> ~
> Pankaj
>
>
> On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe wrote:
>
>> Worst case 99 get released.
>> Is that correct..?
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Pankaj
Skipp Riddle,
Yes.
100th prisoner will risk his life. Similar puzzle was discuss recently. Does
anyone remember the name or thread?


~
Pankaj

On Fri, Jul 22, 2011 at 7:55 PM, SkRiPt KiDdIe wrote:

> Worst case 99 get released.
> Is that correct..?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread SkRiPt KiDdIe
Worst case 99 get released.
Is that correct..?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Pankaj
In my latest interview I encountered the following puzzle.

There are 100 prisoners in the prison. All of them have either black or
white cap.

Jailer has asked them to stand in the queue such that nth guy can see caps
of all the guys standing ahead of him, but he can not see his own cap.

It means Guy standing at 100th position can see caps of all other 99 guys.
Prisoner standing at 99th position can see caps of rest of 98 guys standing
ahead of him.

Now jailer proposes to release the guy who can guess correct color of his
own cap.

Assuming All the prisoner are nice guys ;), who can sacrifice for others,
device a method which can help to release maximum number of prisoners.

On Fri, Jul 22, 2011 at 7:46 PM, Vishal Jain  wrote:

> Hi All,
>
> In my last interview(given few months back), I was asked the following
> puzzle..
>
> http://goo.gl/jrnpc
>
> Could you please tell me the solution for the same?
>
> Thanks & Regards
> Vishal Jain
> MNo: +91-9540611889
> Tweet @jainvis
> Blog @ jainvish.blogspot.com
> Success taste better when target achieved is bigger.
>
> P *We have a responsibility to the environment.*
>
> *Before printing this e-mail or any other document, let's ask ourselves 
> whether we need a hard copy.*
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Interview Puzzle - 100 Prisoners and Caps

2011-07-22 Thread Vishal Jain
Hi All,

In my last interview(given few months back), I was asked the following
puzzle..

http://goo.gl/jrnpc

Could you please tell me the solution for the same?

Thanks & Regards
Vishal Jain
MNo: +91-9540611889
Tweet @jainvis
Blog @ jainvish.blogspot.com
Success taste better when target achieved is bigger.

P *We have a responsibility to the environment.*

*Before printing this e-mail or any other document, let's ask
ourselves whether we need a hard copy.*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.