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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login