Greedy is a strategy that works well on
optimization problems.We can make whatever choice ,seems best
at the moment and then solve the sub-problems that arise later.
and then solve the sub-problems that arise later.The choice made by
Greedy Algorithm may depend on choices made so far.
But not on future choices or all the solutions to the sub-problem.
It iteratively makes one Greedy choice after another
reducing each given problem into smaller one.
In other words Greedy Algorithm never reconsiders its
choices.This is the main difference from dynamic programming,which is exhaustive
and is guranteed to find the solution.
Steps Required to Solve a Greedy Algorithm
- A candidate set of data that needs a solution
- A selection function that chooses the best contributor to the final solution.
- A feasibility function that aids the selection function by determining if a candidate can be a contributor to the solution.
- An objective function that assigns a value to a partial solution
- A solution function that indicates that, the optimum solution has been discovered.
To know more : Click Here
--Unfamiliar word meanings--
- Exhaustive: সম্পূর্ণ
- Optimum: সর্বোত্তম
- Feasibility: সম্ভাব্যতা
- Contributor : অংশদাতা
- Optimize: নিখুত
Quotes: