Question: Problem 7. (20 pts) Professor Harry Potter has devised an ingenious concoction: it looks like water, tastes like water and resembles water in any way,

Problem 7. (20 pts) Professor Harry Potter has devised an ingenious concoction: it looks like water, tastes like water and resembles water in any way, shape or form, and yet consuming even a single drop of this potion will cause the drinker's skin to turn bright blue for a day. However there's a delay in the effect of the potion_it takes about 45 minutes for the effect to kick in. Alas, Prof. Potter's students, showing him the same respect undergraduates show to their professors (sigh), have scraped off the bottle's label and hid it among n - 1 water bottles. So now Prof. Potter's cabinet holds n identically looking bottles, where one of them is the turn-skin-to-blue potion and the rest contain very ordinary water. To make matters worse, Prof. Potter has no more than 1 hour to find the potion before potion-class begins. Luckily, he can still call on a few of his trusted grad-students (and on you!) to assist him in finding the potion. Help Prof. Potter! Design an algorithm that finds which one of n bottles contains the special potion in a single hour, using no more thanlog(n)| tasters. Prove your claims Hint: Start by thinking recursively. The cases of n = 1 or n 2 are easy. Assuming you have a "tasting scheme" for n bottles with k drinkers, devise a potion-finding tasting scheme for 2n bottles using k+1 tasters. Then "unravel" the recursion to see what bottles the j-th taster drinks from. It is OK if you think of n as a power of 2 for the purpose of finding the algorithm, but your algorithm should work for any n. (Also, it is probably a tad more convenient to number the bottles from 0 to n - 1 rather than from 1 to n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
