[algogeeks] Re: Mathematics Puzzle
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 shivanand.kadwad...@gmail.com wrote: 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 mca.shivshan...@gmail.com wrote: Its total no. of Student i.e. 69. If all the students ranking is increased then all the student will get the lollipop. But there is one student left who was at top n now on the least ranking and as the condition is given that student may appear first and get the lollipop. So professor need will give 69 lollipop. in this (worst) case. On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor ashimkap...@gmail.com wrote: Do you mean if the rank of a student is better than the rank of the prev student then he/she gets a lollipop? Thank you, Ashim On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu marpu.vam...@gmail.comwrote: Does anybody know the solution for the following problem : *A headmaster of a primary school performs an activity with the students of a class to encourage them to perform better in academics. He asks them to stand in queue, starts calling the students out one by one and asks them their rank in class. Each one has a unique rank in class. If the rank of a student is better than his/her previous best rank, then he awards him/ her a lollipop (students love lollipops). Note that the first one in the queue will always get a lollipop and the students arrange themselves in random order in the queue. What is the expected number of lollipops the headmaster will have to distribute among students if the total number of students in the class is 69? Note that the answer can be a fractional number.* Thanks and Regards, M. Vamsee -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regards, Shiv Shankar, -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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] Re: Mathematics Puzzle
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 joshi.sali...@gmail.com 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. Rephrased this way, this is a famous puzzle, and the answer is log(69). On Nov 22, 12:44 pm, shiva shivanand.kadwad...@gmail.com wrote: 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 mca.shivshan...@gmail.com wrote: Its total no. of Student i.e. 69. If all the students ranking is increased then all the student will get the lollipop. But there is one student left who was at top n now on the least ranking and as the condition is given that student may appear first and get the lollipop. So professor need will give 69 lollipop. in this (worst) case. On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor ashimkap...@gmail.com wrote: Do you mean if the rank of a student is better than the rank of the prev student then he/she gets a lollipop? Thank you, Ashim On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu marpu.vam...@gmail.comwrote: Does anybody know the solution for the following problem : *A headmaster of a primary school performs an activity with the students of a class to encourage them to perform better in academics. He asks them to stand in queue, starts calling the students out one by one and asks them their rank in class. Each one has a unique rank in class. If the rank of a student is better than his/her previous best rank, then he awards him/ her a lollipop (students love lollipops). Note that the first one in the queue will always get a lollipop and the students arrange themselves in random order in the queue. What is the expected number of lollipops the headmaster will have to distribute among students if the total number of students in the class is 69? Note that the answer can be a fractional number.* Thanks and Regards, M. Vamsee -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regards, Shiv Shankar, -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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] Re: Mathematics Puzzle
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 approximated to log (n). Hence the answer. On Mon, Nov 22, 2010 at 3:54 PM, shiva shivanand.kadwad...@gmail.comwrote: 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 joshi.sali...@gmail.com 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. Rephrased this way, this is a famous puzzle, and the answer is log(69). On Nov 22, 12:44 pm, shiva shivanand.kadwad...@gmail.com wrote: 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 mca.shivshan...@gmail.com wrote: Its total no. of Student i.e. 69. If all the students ranking is increased then all the student will get the lollipop. But there is one student left who was at top n now on the least ranking and as the condition is given that student may appear first and get the lollipop. So professor need will give 69 lollipop. in this (worst) case. On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor ashimkap...@gmail.com wrote: Do you mean if the rank of a student is better than the rank of the prev student then he/she gets a lollipop? Thank you, Ashim On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu marpu.vam...@gmail.comwrote: Does anybody know the solution for the following problem : *A headmaster of a primary school performs an activity with the students of a class to encourage them to perform better in academics. He asks them to stand in queue, starts calling the students out one by one and asks them their rank in class. Each one has a unique rank in class. If the rank of a student is better than his/her previous best rank, then he awards him/ her a lollipop (students love lollipops). Note that the first one in the queue will always get a lollipop and the students arrange themselves in random order in the queue. What is the expected number of lollipops the headmaster will have to distribute among students if the total number of students in the class is 69? Note that the answer can be a fractional number.* Thanks and Regards, M. Vamsee -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regards, Shiv Shankar, -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks Regards Salil Joshi. CSE MTech II, IITB A-414, Hostel 12 +91.9819.442.865 This is a confidential E-Mail. If it has reached you by mistake or if you are not the intended receiver, please send it back to me. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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] Re: Mathematics Puzzle
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 mca.shivshan...@gmail.com wrote: Its total no. of Student i.e. 69. If all the students ranking is increased then all the student will get the lollipop. But there is one student left who was at top n now on the least ranking and as the condition is given that student may appear first and get the lollipop. So professor need will give 69 lollipop. in this (worst) case. On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor ashimkap...@gmail.com wrote: Do you mean if the rank of a student is better than the rank of the prev student then he/she gets a lollipop? Thank you, Ashim On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu marpu.vam...@gmail.comwrote: Does anybody know the solution for the following problem : *A headmaster of a primary school performs an activity with the students of a class to encourage them to perform better in academics. He asks them to stand in queue, starts calling the students out one by one and asks them their rank in class. Each one has a unique rank in class. If the rank of a student is better than his/her previous best rank, then he awards him/ her a lollipop (students love lollipops). Note that the first one in the queue will always get a lollipop and the students arrange themselves in random order in the queue. What is the expected number of lollipops the headmaster will have to distribute among students if the total number of students in the class is 69? Note that the answer can be a fractional number.* Thanks and Regards, M. Vamsee -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regards, Shiv Shankar, -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.