3.1 General Method
3.1 General Method
1
Greedy Approach
Pradnya Bhangale
[email protected]
Introduction
• The greedy method is one of the strategies like Divide and
conquer used to solve the problems.
• This method is used for solving optimization problems.
• An optimization problem is a problem that demands either
maximum or minimum results.
• The Greedy method is the simplest and straightforward
approach.
• It is not an algorithm, but it is a technique.
• Main function: decision is taken on the basis of the currently
available information.
Decision is made without worrying about the effect of the
current decision in future.
Introduction
• This technique is basically used to determine the feasible
solution that may or may not be optimal.
• The feasible solution is a subset that satisfies the given criteria.
• The optimal solution is the solution which is the best and the
most favorable solution in the subset.
• In the case of feasible, if more than one solution satisfies the
given criteria then those solutions will be considered as the
feasible, whereas the optimal solution is the best solution
among all the solutions.
Pseudo code of Greedy Algorithm