Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASAP. Please answer completely and correctly for thumbs up. please do not copy from other answers. Thank you! There is a prize hidden in a

ASAP. Please answer completely and correctly for thumbs up. please do not copy from other answers. Thank you!

There is a prize hidden in a box; the value of the prize is a positive integer between 1 and N, and you are given N. To win the prize, you have to guess its value. Your goal is to do it in as few guesses as possible; however, among those guesses, you may only make at most g guesses that are too high. The value g will be specified at the start of the game, and if you make more than g guesses that are too high, you lose. So, for example, if g = 0, you then can win in N guesses by simply guessing the sequence 1, 2, 3, ...

a. Suppose g = logN. What strategy minimizes the number of guesses?

b. Suppose g = 1. Show that you can always win in O( N1/2 ) guesses.

c. Suppose g = 1. Show that any algorithm that wins the prize must use ( N1/2 ) guesses.

d. Give an algorithm and matching lower bound for any constant g.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago