- #1
chingel
- 307
- 23
One number is chosen from 1 to n, n is large, and I want to guess that number. If I get to choose one number and then I'm told if the number is bigger or smaller, then the best strategy is to try to halve the range at every step and then the average number of guesses would be roughly ##log_2(n)##.
But what if instead of cutting the set in half at each step, I would always try to cut it in pieces of 1/4 and 3/4, how many steps on average would I take? And furthermore, if I cut it into m pieces of some fixed ratios at each step, how many steps on average would I take?
If I cut them into m equal pieces at every step, the average guesses is about ##log_m(n)##, but what about unequal pieces?
If it makes it easier to analyze, we can say that I don't pick numbers, I just split the sets and I get told in which set the number is and we can assume n is very large.
But what if instead of cutting the set in half at each step, I would always try to cut it in pieces of 1/4 and 3/4, how many steps on average would I take? And furthermore, if I cut it into m pieces of some fixed ratios at each step, how many steps on average would I take?
If I cut them into m equal pieces at every step, the average guesses is about ##log_m(n)##, but what about unequal pieces?
If it makes it easier to analyze, we can say that I don't pick numbers, I just split the sets and I get told in which set the number is and we can assume n is very large.