Abstract

S. M. Ulam, (“Adventures of a Mathematician,” Scribner's, 1976.) stated the following problem: what is the minimal number of yes-no queries needed to find an integer between one and one million, if one lie is allowed among the answers. In Rivest et al. ( J. Comput. System Sci 20, 396–404 (1980) and Spencer, ( Math. Mag. 57, 105–108 (1984) partial solutions were given by establishing bounds for the minimal number of queries necessary to find a number in the set {1,…, n}. Applied to the original question both solutions yield two possibilities: 25 or 26. We give an exact solution of Ulam's problem in the general case. For n = 10 6 the answer turns out to be 25. We also give an algorithm to perform the search using the minimal number of queries.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call