Puzzle: Search
-
Warmup puzzle:
Given a function f from natural numbers to natural numbers that is strictly increasing (if x < y then f(x) < f(y)) and a number t, find the number r (if it exists) such that f(r) = t.
Imagine that every invocation of f costs $1. Can you find r with minimum cost?
The main puzzle:
Given a function f from a pair of natural numbers to natural numbers that is strictly increasing in both arguments, and a number t, find all pairs of numbers (x,y) such that f(x,y) = t.