Question

In: Computer Science

Design a strategy that minimizes the expected number of questions you will ask in the fol-...

Design a strategy that minimizes the expected number of questions you will ask in the fol- lowing game. You have a deck of cards that consists of one one, two twos, three threes, and so on up to nine nines for a total of 45 cards. Someone draws a card from the shuffled deck and looks at its value (hiding it from you). The goal is to determine the value of the card through asking a series of questions, each of which must be answerable with “yes” or “no” (such as “Is the card a nine?”).

To answer this question, you should express your strategy as a decision tree. You may either explicitly draw the decision tree or describe its construction in sufficient detail so that I could draw it from your description.

Furthermore, briefly explain why this minimizes the expected number of questions you will ask in this game. You are not required to give a formal proof.

Hint: The first question to ask in the optimal decision tree is “Is the card one of {4, 5, 9}?” Equivalently, the question can be “Is the card one of {1, 2, 3, 6, 7, 8}?”

Solutions

Expert Solution

To minimize the number of questions to be asked to find the correct card we have two divide them into groups so that the number of questions can be reduced.Here we will do pairing

P(1)=1/45

P(2)=2/45

P(3)=3/45

P(4)=4/45

P(5)=5/45

P(6)=6/45

P(7)=7/45

P(8)=8/45

P(9)=9/45

The pairing should be done on the basis of probability of occuring less of a particular card.So first 1 and 2 will be paired .So the probability of occuring 1 and 2 will be 3/45.Now we have 8 divisions .Further we pair (1,2),(3) .Probability of occur 1 ,2,3 is 6/45 and so on we will reach to last step as shown in pic below.We are  doing pairing because the number of steps will be reduced and the the number of question to be asked to get correct answer will be reduced.

Now whenever any question is asked we can start from bottom and get to the correct answer in the number of steps shown in the picture.

Now if some question is asked like 9 will occur we need to ask only 2 question .

in this way we can minimize the questions to be asked


Related Solutions

What questions would you ask of this business owner to determine the strategy for developing the...
What questions would you ask of this business owner to determine the strategy for developing the application? How would you conceive the project in terms of stages based on the life-cycle of ASP.NET? What are the immeidate challenges to this project's success?
design your own measure of variability that minimizes the effect of extreme scores and is measured...
design your own measure of variability that minimizes the effect of extreme scores and is measured in thesame units as the original data. Dwmonstrate that your measure meets the requirements, and contrast it to other measures of variability
C++ In this lab, you will ask the user to design a leaning pyramid. The pyramid...
C++ In this lab, you will ask the user to design a leaning pyramid. The pyramid will either lean left or right. Start by asking the user how tall they want the pyramid to be. Then ask the user if they want the pyramid to lean left or right. You should then display a pyramid that meets the requirements. (See below for examples). YOU MUST use nested loops for your solution for ANY credit. Sample Run #1: Enter a pyramid...
Flowchart + Python. Ask the user for a value. Then, ask the user for the number...
Flowchart + Python. Ask the user for a value. Then, ask the user for the number of expressions of that value. Use While Loops to make a program. So then, it should be so that 5 expressions for the value 9 would be: 9 * 1 = 9 9 * 2 = 18 9 * 3 = 27 9 * 4 = 36 9 * 5 = 45 Flowcharts and Python Code. Not just Python code. I cannot read handwriting....
Interview: For this assignment, you are to develop 10 questions that you would ask a management...
Interview: For this assignment, you are to develop 10 questions that you would ask a management official responsible for the financial planning for the healthcare organization.. Make sure the questions will give you insight into what the company looks for when preparing their yearly budget, fiscal planning strategies, as well as how they monitor their financial condition throughout the year and make adjustments as needed. For this activity include the following: A list of all 10 questions you would ask...
PYTHON Ask the user to enter the number of students in the class. Thereafter ask the...
PYTHON Ask the user to enter the number of students in the class. Thereafter ask the user to enter the student names and scores as shown. Output the name and score of the student with the 2nd lowest score. NOTE: You may assume all students have distinct scores between 0 and 100 inclusive and there are at least 2 students NOTE: You may only use what has been taught in class so far for this assignment. You are not allowed...
The following questions ask you to examine the effects of the pandemic on the Canadian economy....
The following questions ask you to examine the effects of the pandemic on the Canadian economy. In here, we assume Canada is a closed economy and initially in its long-run equilibrium. Each part of the question is NOT related to other parts of the question. b) The pandemic has speeded up the use of automation and artificial intelligence (AI) in the production process. • One group, say group A, believes that to some workers, this is bad news. Why? What...
What are the characteristics of a solid IS infrastructure. You are expected to design an IS...
What are the characteristics of a solid IS infrastructure. You are expected to design an IS infrastructure that can effectively address the challenges arising during various crises such as (i) Pandemic like COVID-19 (ii) Natural Calamities (iii) Global Warming.
Name 6 questions you would ask someone if you was interviewing them for a job and...
Name 6 questions you would ask someone if you was interviewing them for a job and why would you ask them these questions
Although the following questions ask you to draw diagrams, you do not have to submit these....
Although the following questions ask you to draw diagrams, you do not have to submit these. You do, however, need to know how to draw them. Suppose Apple has a monopoly on a new product, the iFraud. The market is characterized by:             Short Run Marginal Cost of Supply:             MC = 100 + 2Q             Short Run Average Total Cost:                      AC = 100 + Q + 150,000/Q             Marginal Willingness to Pay:                         P = 1600 – 4Q A....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT