|
|
Re: 1...N puzzle
Posted:
Nov 6, 1999 3:18 AM
|
|
* nvakil@gb-sam-ltsb-11.com > > I think the best guess is m = N/2 (integer) and then guess consecutive > numbers from N/2 + 1 up to N and start from 1 to N. > > This way, if the hider's original guess is between N/2 and N then you hit it > in less than N/2 times. However, if the original guess is less than N/2 > (integer) then total number of guesses is 1.5N.
Then you are guaranteed to end up with 1.5N. If you always start at 1 and carry upwards, you always end up with N guesses, clearly better.
-- Jon Haugsand Norwegian Computing Center, <mailto://Jon.Haugsand@nr.no> Pho: +47 22852608 / +47 22852500, Fax: +47 22697660, Pb 114 Blindern, N-0314 OSLO, Norway
|
|