General statement
1, solve the idea: The problem is decomposed into multiple sub problems, as long as the optimal solution of the sub problem is obtained, we can get the optimal solution of the final problem. That is, we need to consider the local optimal, we can get the global optimal.
2, limitations: the need to identify a problem with the above characteristics, to use the greedy algorithm to solve. Applicable Scenarios
1, Single-source Shortest road problems
2. Minimum spanning tree problem
3, can arbitrarily split knapsack problem. If you can not arbitrarily split, you need to use dynamic programming solution.
4, in some cases, even if the greedy algorithm can not get the overall optimal solution, the final result is a good approximation of the optimal solution.
5. Arrangement of activities
A set of n active time, each activity uses the same resource, such as a conference field, and only one activity can be used at the same time, each activity has a start of the active Si and end time fi, which is his use interval for (SI,FI), now asks you to allocate the activity to occupy the schedule, That is, which activities occupy the conference room, which does not occupy, so that they do not conflict, the requirement is to maximize the participation of activities, that is to maximize the time interval.