Monday, December 1, 2014

CLRS 3e 1.1-4

1.1-4 How are the shortest path and traveling salesman problems given above similar?  How are they different?

Both the shortest path algorithm and the traveling salesman problem want to minimize the overall distance travelled.  The shortest path algorithm is a one way path to find the shortest route from a source to destination.  An example would to be the shortest path from Pittsburgh to Chicago given all the intersection one would encounter.  The traveling salesman problem is to find the shortest overall path from a source, visit a set of destinations and then end up back at the source. 

An example would a mail delivery truck that delivery mails to different location everyday that wants to travel the least overall distance and end up back at the mail office.

No comments:

Post a Comment