|
|
|
|
|
by denotational
553 days ago
|
|
The definition of optimal substructure in the article isn’t quite right. A problem can have optimal substructure even if merging two optimal solutions to two sub-problems that compose to form the complete problem does not provide an optimal solution to the complete problem. This happens when there is more than one way of splitting the complete problem into two sub-problems. For example, the shortest path problem on a DAG has optimal substructure, but if you pick two subproblems by splitting the path at an intermediate node that does not lie on the shortest path, then you will not find an optimal solution by combining these. When this happens, one needs to optimise over all the possible ways of splitting into sub-problems. This is the basis of dynamic programming. |
|