Algorithms (Dynamic Programming)
1. On a clear day, a group of your friends in the Astronomy club gets together to plan out
the astronomical events theyre going to try observing that night. Well make the
following assumptions about the events.
- There are n events, which for simplicity well assume occur in sequence separated by
exactly one minute each. Thus event j occurs at minute j; if they dont observe this
event at exactly minute j, then they miss out on it.
- The sky is mapped according to a one-dimensional coordinate system (measured in
degrees from some central baseline); event j will be taking place at coordinate dj , for
some integer value dj. The telescope starts at coordinate 0 at minute 0.
- The last event, n, is much more important than the others; so it is required that they
observe event n.
The Astronomy club operates a large telescope that can be used for viewing these events.
Because it is such a complex instrument, it can only move at a rate of one
the astronomical events theyre going to try observing that night. Well make the
following assumptions about the events.
- There are n events, which for simplicity well assume occur in sequence separated by
exactly one minute each. Thus event j occurs at minute j; if they dont observe this
event at exactly minute j, then they miss out on it.
- The sky is mapped according to a one-dimensional coordinate system (measured in
degrees from some central baseline); event j will be taking place at coordinate dj , for
some integer value dj. The telescope starts at coordinate 0 at minute 0.
- The last event, n, is much more important than the others; so it is required that they
observe event n.
The Astronomy club operates a large telescope that can be used for viewing these events.
Because it is such a complex instrument, it can only move at a rate of one