The San Francisco to San Diego route can be split at Los Angeles because the problem exhibits optimal substructure. Once the shortest SF→LA and LA→SD segments are known, they combine to give the shortest SF→SD route.
Conditions: The example assumes the overall route passes through Los Angeles.; The narrator states that finding the shortest subroutes guarantees the overall shortest route in this example.
The San Francisco to San Diego route can be split at Los Angeles because the problem exhibits optimal substructure. Once the shortest SF→LA and LA→SD segments are known, they combine to give the shortest SF→SD route.
Conditions: The example assumes the overall route passes through Los Angeles.; The narrator states that finding the shortest subroutes guarantees the overall shortest route in this example.