Here is what I think to be a solution to TripleM's puzzle:
W
Gi Gi+1
|===========O=======================================O========|
----------- ------------------------------------------------
W1 W2 --------
W21
Looks monstrous doesn't it?
W is the remaining pool of possible values (100 at the beginning).
Gi+1 is the last guess point, and
Gi is the one before last.
i is the number of guesses it takes us.
It's trivial that once we find the optimal formula of check point according to current pool, it will work for the next, shortened pool. We guess
Wi+1 before we know if the answer is higher than
Wi or not. So if the answer is in
W1 we wasted one guess. It either takes us two guesses to shorten the pool to
W1 or one guess to shorten the pool to
W2. Since we are assuming the worst case scenario, the derivation formula is:
guess( W, i ) = max( guess( W1, i+2 ), guess( W2, i+1 ) )
When will this value be minimal? When
guess( W1, i+2 ) = guess( W2, i+1 ).
Of course
guess(1, i) = i is our stop condition (the pool shortened to one value, the number of guesses is
i).
We are looking for a part of
W where the point should optimally be, i.e. a
p so that
guess( W * p, i+2 ) = guess( W * (1-p), i+1 ) Let's assume it exists, and the equasion is true, then by deriving we see that:
guess( W, 0 ) = guess( W*p*p*p*...*p (=1), 0+2+2+...+2 )
guess( W, 0 ) = guess( W*(1-p)*(1-p)*(1-p)*...*(1-p) (=1), 0+1+1+...+1 )
But the result is the same, so we know 0+2+2+...+2 = 0+1+1+...+1, so there are twice as many '+1' as '+2', which means
p^(2i) = (1-p)^i => p^2 = (1-p)
This is a quadratic solution which gives us
p = 0.381966014
So the optimal fraction of W to put the next point on is about 38%, and applied to the problem the first two numbers should be 38 and about 76, or symmetric equivalents (38 and 62, 62 and 24, 62 and 38).
____________________________
Slay the living! Raise the dead!
Paint the sky in crimson red!