1. Engineering
  2. Computer Science
  3. any help greatly appreciated...

Question: any help greatly appreciated...

Question details

Questions 25 refer to the generalized number gussing game from Lactures 1-2 ecall the rules of the game: I am thinking of a number between 0 and n 1, inclusive. Guess what it is! After each guess, I will tell you if you are correct, too low, or too high

(5) (10 points) In this problem, we will formally prove that, for any n, the maximum number of guesses G(n) needed to solve the guessing game with bounds 0 and n-1 is G(n) = llog(n) + 1」 (a) (3 points) Describe why G(n) = log(n) + 1 for n = 1 (b) (2 points) Prove that if G(n/2) = log(n/2) + 1 and n/2 is a power of 2, then G(n)-log(n) +1 (c) (2 points) Suppose that n is a power of 2 and is greater than 1, and that the formula G(k) log(k)1 holds for k n. Prove that the formula G(k) holds for k n + 1 (d) (2 points) Suppose that n is a power of 2 and is greater than 1, and that the formula G(k)log(k)+1 holds for k n. Prove that the formula G(k) holds for k = 2n-1. (e) (1 point) Using the results of parts (a) through (d), prove that the formula G(n)-log(n)+1 holds for all integers n greater than zero

Any help greatly appreciated.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution