# Characteristics of greedy algorithm

## What are the characteristics of greedy approach explain with suitable example?

**builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit**. So the problems where choosing locally optimal also leads to global solution are the best fit for Greedy. For example consider the Fractional Knapsack Problem.

## What are the applications of greedy method?

Used to Solve Optimization Problems: **Graph – Map Coloring, Graph – Vertex Cover, Knapsack Problem, Job Scheduling Problem, and activity selection problem** are classic optimization problems solved using a greedy algorithmic paradigm.

## What is the function of greedy algorithm?

**an approach for solving a problem by selecting the best option available at the moment**. It doesn’t worry whether the current best result will bring the overall optimal result. The algorithm never reverses the earlier decision even if the choice is wrong.

## What are limitations of greedy algorithm?

**Sometimes greedy algorithms fail to find the globally optimal solution because they do not consider all the data**. The choice made by a greedy algorithm may depend on choices it has made so far, but it is not aware of future choices it could make.

## What are the components of greedy algorithm?

**A selection function − Used to choose the best candidate to be added to the solution.** A feasibility function − Used to determine whether a candidate can be used to contribute to the solution. An objective function − Used to assign a value to a solution or a partial solution.

## What is greedy algorithm advantages and disadvantages?

**work step-by-step, and always choose the steps which provide immediate profit/benefit**. It chooses the “locally optimal solution”, without thinking about future consequences. Greedy algorithms may not always lead to the optimal global solution, because it does not consider the entire data.

## Is greedy algorithm recursive?

**a set of resources are recursively divided based on the maximum, immediate availability of that resource at any given stage of execution**.

## Which of the following is an advantage of greedy algorithms?

Finding solution is quite easy with a greedy algorithm for a problem. Analyzing the run time for greedy algorithms will generally be much easier than for other techniques (like Divide and conquer).

## What are the applications of dynamic programming?

**The various applications of Dynamic Programming are :**

- Longest Common Subsequence.
- Finding Shortest Path.
- Finding Maximum Profit with other Fixed Constraints.
- Job Scheduling in Processor.
- BioInformatics.
- Optimal search solutions.

## Which of the following is not an application of greedy approach?

**Bellman-Ford Shortest path algorithm**is not a greedy algorithm. The greedy algorithm is a technique to solve a problem and make an optimal solution. A single-source shortest path algorithm is the Bellman-Ford algorithm.

## Which among the following is the application of the knapsack problem?

**machine scheduling, space allocation, and asset optimization**.

## What is greedy algorithm What are advantages and disadvantages?

Analyzing the run time for greedy algorithms will generally be much easier than for other techniques (like Divide and conquer). The difficult part is that for greedy algorithms you have to work much harder to understand correctness issues.

## What are two basic properties of greedy approach?

**Greedy Choice Property**: A global optimum can be reached by selecting the local optimums. Optimal Substructure Property: A problem follows optimal substructure property if the optimal solution for the problem can be formed on the basis of the optimal solution to its subproblems.

## What are the advantages of greedy algorithm?

## Is load balancing greedy algorithm?

**A “greedy” approach, Algorithm 2 is to iteratively assign each job to the machine with the smallest load**.

## Is greedy algorithm recursive?

**a set of resources are recursively divided based on the maximum, immediate availability of that resource at any given stage of execution**.

## What is difference between greedy method and dynamic programming?

**Greedy programming is the approach that tries to solve a problem as quickly as possible, while dynamic programming is the approach that tries to solve a problem as efficiently as possible**. In greedy programming, you try to solve a problem as quickly as possible by trying to find the smallest possible solution.

## What is the best load balancing algorithm?

**Round-robin load balancing**is the simplest and most commonly-used load balancing algorithm.

## What is load balancing problem?

**all clients start simultaneously, they work without breaks and nothing is computed twice**. If all clients finished their last job at the same time (i.e. without idle-time), optimal running time would be achieved.

## Is load balancing NP complete?

**Load Balancing is NP-complete**even for 2 machines.