Where optimal substructure fails
Shortest path has optimal substructure. The longest simple path in a general graph does not.
What exactly fails?
Shortest path has optimal substructure. The longest simple path in a general graph does not.
What exactly fails?