16. Greedy Algorithms

A greedy algorithm always makes the choice that looks the best at the current step. ----- it makes a locally optimal choice in the hope that this choice will lead to a globally optimal solution.

Load balancing problem---NP hard

Given a set of m machines M1,M2,...,Mm and a set of n jobs, each job j has a processing time t j >0 with 1< j< n. We seek to assign each job to one of them machines so that the loads placed on all machines are as “balanced” as possible, where the load at a machine is the sum of processing times of all jobs allocated to the machine.

This is the problem(Load balancing problem) we can not solve in polynomial time unless P=NP. Instead, we aim to find a feasible solution to it.

If we are able to show that there is a certain degree of guarantee between the feasible solution and its optimal solution, then we call this algorithm is an approximation algorithm for the load-balancing problem.

In other words, our objective is to: minimize max{Ti | 1 < i < m}

The Greedy Strategy: Assign the current job j to a machine Mi with the minimum load at each time.

Theorem: Algorithm Greedy-Balance produces an assignment of jobs to machines with makespan T < 2T*, where T and T * are the loads delivered by the greedy algorithm and an optimal load of the problem.

你可能感兴趣的:(16. Greedy Algorithms)