Greedy algorithms are a technique for solving problems by making locally optimal choices at each step in the hope of finding a global optimum. The key aspects are:
1. Break the problem down into smaller sub-problems.
2. Make optimal choices at each step to solve each sub-problem.
3. Recursively apply this process to solve the overall problem.
Greedy algorithms may provide an optimal solution but do not guarantee it, as the locally optimal choices at each step do not necessarily lead to a globally optimal solution. Examples provided include using a greedy approach to solve problems like cash exchange and task scheduling.
2. 2
Actually greeddy algorithms is not a algorithms
but its a one of the techniqe or method of
designing any algorithms.
It is a method by which you “may” have optimum
solution of your problem.
There are so many algorithms which are using
greddy technique for optimization.
What is Greedy algorithm?????What is Greedy algorithm?????
3. 1.)Divide your problem in smaller object as
much as you can.
2.)Go for optimimum solution for that
problem.
3.)Do this process recursively.
What Greedy algorithmWhat Greedy algorithm
says????????says????????
Every optimum solution will give you more
positive effect on optimum solution.
9. 9
Example of finding a ball which has more weight
than out of 100 balls (We have also solved in
R.S.Agrewal)
GreedyGreedy
Algorithm.....................Algorithm.....................
............