알고리즘

[Introduction to Algorithms, CLRS] Exercise 1.1-5

nevermet 2017. 8. 15. 09:39

This is a solution for Introduction to Algorithms. I write this for my study purpose.


1.1-5

Come up with a real-world problem in which only the best solution will do. Then come up with one in which a solution that is “approximately” the best is good enough.


Answer:

Sorting a catalog is the problem, where only the best solution will do. An "approximately" sorted catalog won't be useful.

Finding the shortest path between two points in a city is a problem, where good-enough will do. It might not be the fastest way, but you will still get there.


source: http://clrs.skanev.com/01/01/05.html