Professional Documents
Culture Documents
Discrete HW 2008-01-31 Algo Intro
Discrete HW 2008-01-31 Algo Intro
1. A wise but short-sighted toad is looking for the Truth. The toad sees no more than
1 meter away while the Truth is located in the plane at distance at most D meters
from the toad. The toad can make jumps, each of length at most 1 meter and after
each jump she knows if she came closer to the Truth or not. Devise a strategy by
which the toad can find the Truth in as few hops as you can manage.
If you can, say how many operations each algorithm would take (of course, this will
likely depend on the input numbers, so you can do it in terms of those).
1. A wise but short-sighted toad is looking for the Truth. The toad sees no more than
1 meter away while the Truth is located in the plane at distance at most D meters
from the toad. The toad can make jumps, each of length at most 1 meter and after
each jump she knows if she came closer to the Truth or not. Devise a strategy by
which the toad can find the Truth in as few hops as you can manage.
If you can, say how many operations each algorithm would take (of course, this will
likely depend on the input numbers, so you can do it in terms of those).