2.10 Bellman's principle of optimality — Practise
Work independently. The questions and answers are shown together at the end.
These questions want reasons, not numbers. State the principle, then say what it does and does not claim.
- State Bellman's principle of optimality in your own words.
- Explain why Bellman's principle is what makes dynamic programming valid.
- Explain how Bellman's principle relates to the greedy approach, and why the two are not the same.
- A student claims: "Bellman's principle says every part of any route is optimal." State what is wrong and give the correct statement.
Answers and concise solutions
1. Show the answer
1. The principle
Answer:
Bellman's principle of optimality says that any part of an optimal route is itself an optimal route between its own two endpoints. If the whole journey is the cheapest possible, then no section of it can be replaced by a cheaper section — if it could, replacing it would make the whole journey cheaper, contradicting that the whole was optimal.
2. Show the answer
2. Why it makes DP valid
Answer:
Dynamic programming works by solving small sub-problems once and building larger answers from them. That is only valid if a sub-problem's best answer is the same whichever larger problem it belongs to. Bellman's principle gives exactly that. If every part of an optimal route is itself optimal, then the best cost from a vertex to the destination is a fixed number, independent of how you arrived at that vertex. So each state can be solved once and reused, which is what the backward recursion relies on.
3. Show the answer
3. Bellman and greedy
Answer:
Bellman's principle says something about an already optimal route: its parts are optimal too. It is a property of the best route, used to build the best route. Greedy says something different: take the cheapest choice now. That is a method, and Bellman's principle does not justify it. On the network of Section 2.9 the cheapest first edge gave a total of , while the optimal total was — so the greedy choice was part of no optimal route at all. Bellman's principle holds for optimal routes; greedy does not always find one.
4. Show the answer
4. What is wrong
Answer:
The student has dropped the word "optimal". Bellman's principle says: every part of an optimal route is itself optimal. It says nothing about a route that is not optimal. A part of a poor route is usually poor as well. The principle is used to find the optimal route, by building it from optimal parts — it is not a claim that every route is made of optimal pieces.