Re: [algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
@Ashim, Dunno... you can call it Salil's Puzzle if you like ;-) afaik. its been listed in KT book Randomized algorithms chapter. On Mon, Nov 22, 2010 at 3:36 PM, Ashim Kapoor wrote: > what is the name of this famous puzzle ? > > On Mon, Nov 22, 2010 at 2:57 PM, Salil Joshi wrote: > >> Hi, >> Th

Re: [algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Ashim Kapoor
what is the name of this famous puzzle ? On Mon, Nov 22, 2010 at 2:57 PM, Salil Joshi wrote: > Hi, > The puzzle needs to be rephrased as: > "If the rank of the student who comes out of the classroom is better > than ranks of all students who came out before him/her, then he/she > gets a lollipop"

Re: [algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
Well, Since the students are mixed randomly (as mentioned in the problem), the chances (probability) that the 'i' th student who comes out is ranked best so far is directly (1/i). Since this is an independent Random Variable, the answer thus becomes sum_1^n {1/i} which for large value of n can be a

[algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread shiva
Any explanation of how it works and how you got log(69) as answer. Thanks in advance. On Nov 22, 2:27 pm, Salil Joshi wrote: > Hi, > The puzzle needs to be rephrased as: > "If the rank of the student who comes out of the classroom is better > than ranks of all students who came out before him/

[algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
Hi, The puzzle needs to be rephrased as: "If the rank of the student who comes out of the classroom is better than ranks of all students who came out before him/her, then he/she gets a lollipop". Rephrased this way, this is a famous puzzle, and the answer is log(69). On Nov 22, 12:44 pm, shiva

[algogeeks] Re: Mathematics Puzzle

2010-11-21 Thread shiva
If all the person got his rank increased except the first(he is last know) then 1. if the previous first ranked person stand front in queue then 69 lollipop need to be distributed. 2. other case 68 lollipop need to be distributed. On Nov 21, 9:46 pm, Shiv Shankar Prajapati wrote: > Its total n