Question: We consider the following guessing number problem. There are 8 integers, 1 to 8. The computer randomly draws a number from them with equal probability,
We consider the following guessing number problem. There are 8 integers, 1 to 8. The computer randomly draws a number from them with equal probability, say 3. Then you will ask the computer some questions and the computer only answers Yes or No. For example, you can first ask whether the number is greater than or equal to 5 and the computer answers No; then you ask whether the number is greater than or equal to 3 and the computer answers Yes; finally you ask whether it is 3 and the computer answers Yes; and you get it. This can be modeled as a binary search tree and every leaf of the tree represents a number. You start from the root of the tree. Each time, your question and the computers answer will be about which branch to choose until you reach a leaf of the tree.
(1) Design an asking strategy of the above guessing number problem, such that you use the minimum number of queries to find the number. Draw the tree structure of your asking strategy.
(2) If you want to guess 1 integer from 100 different integers, how many queries do you need at most to find the number? Describe the asking strategy.
(3) Now, suppose the computer draws the 8 integers with different probabilities, as follows: 1/4, 1/16, 1/16, 1/32, 1/32, 1/32, 1/32, 1/2.
Can you design an asking strategy such that the average number of queries is minimized? Describe your strategy and draw the tree structure of your strategy.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
