Lecture 31: Greedy Reductions
We can take a greedy approach, minimum makespan. Given jobs for machines with times t1, t2, … , tn, the total time from start to finish of the slowest machine is as small as possible. Example, three machines with jobs 2, 2, 2, 3, 4, 6:
M1: 2, 2, 2
M2: 3, 4
M3: 6
We can write this as a decision problem. Given the number of machines and a list of job times, and a bound k, is there a way to assign jobs so that Makespan <= k? Makespan is NP-complete, by reduction from Subset Sum! Given a target W and w1, w2, … , wn, split into sets W and S - W where S = sum(wi). Take |W - (S - W)| = |2W - S| = W0, a new constant in the list which forces the best solution where both subsets have the same sum = max(W, S - W).
Given a Subset Sum problem, create W0 = |S - 2W| and let the w’s be the times of jobs. Ask if Makespan works on 2 machines of size <= (S + W0) / 2.
Claim: “There is a solution to Subset Sum if and only if there is a solution to Makespan.”
Assume a Subset Sum solution. Split the w’s into subsets that sum to W and S - W. W0 was chosen so we can make them equal, so there exists a Makespan = (S + W0) / 2, and some machine has a subset of jobs summing to W.
Greedy Strategy: Assign each job to least busy machine, incrementally. How good is this? Call the best Makespan possible T*. The sum(ti) = total time to be spread over m machines. Some machine must have more than sum(ti) / m, so T* >= sum(ti) / m. Consider Mi, the machine with worst time; it’s load is T = Ti. In general, Tj = load on Mj. Our makespan answer is T1 by the greedy algorithm.
Let tj be the last time assigned to Mi. At that moment, Mi’s load is Ti - tj. That must be the smallest load, because we chose it for the last job. So Ti - tj <= Tk for all k.
For each machine: M(Ti - tj) <= sum(Tk) = sum(tj). So Ti - Tj < = sum(tj) / m &;t= T*. Ti <= T* + tj so T = Ti <= T* + tj and T* >= worst tk >= tj, so T <= T* + T* -> T <= 2 T*.
The greedy algorithm is always within twice the optimal value. If we presort and do the largest jobs first, we can show that T/T* <= 3/2 and T/T* <= 4/3.
Credit to Kevin Canini for the notes!
This entry was posted on Wednesday, April 13th, 2005 at 11:07 pm and is tagged with subset sum problem, w1 w2, greedy algorithm, lt 2, greedy approach, wn, decision problem, target, worst time, 2w, last job, subsets, best solution, t2, last time, tk, m2, np, jobs. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.
Leave a Reply
Please take time to enjoy the archives: May 2005 (1) April 2005 (11) March 2005 (11) February 2005 (15) January 2005 (7)
Fresh, related resources:
- Free Science and Video bLectures/b Online!: More Free Mathematics b.../b
Model Predictive Control, Linear Time-Invariant Convex Optimal Control, bGreedy/b Control, 'Solution' Via Dynamic Programming, Linear Quadratic Regulator, Finite Horizon Approximation, Cost Versus Horizon, Trajectories, Model Predictive b.../b - Algorithms for Molecular Biology | Full text | DIALIGN-TX: bgreedy/b b.../b
We therefore first remove C from Fq,r and we subsequently remove further inconsistent fragments from Fq,r using our 'direct' bgreedy/b alignment as described in [16]. A consequence of this further breduction/b of the set Fq,r is that b.../b - Nuit Blanche: Compressed Sensing Videos: Where Is My Popcorn ?
After a rapid and glossy introduction to compressive sampling?or compressed sensing as this is also called?the blecture/b will introduce sparsity as a key modeling tool; the blecture/b will review the crucial role played by sparsity in b.../b - Free Algorithms Training Course - Intelligentedu.com Free Computer b.../b
Methodologies include: divide and conquer, dynamic programming, and bgreedy/b strategies. Applications involve: sorting, ordering and searching, graph algorithms, geometric algorithms, mathematical (number theory, algebra and linear b.../b - bLecture 31/b: bGreedy Reductions/b by COMS 482
bLecture 31/b: bGreedy Reductions/b. Posted in Class Notes by Elliott Back on April 13th, 2005. [Del.icio.us]. We can take a bgreedy/b approach, minimum makespan. Given jobs for machines with times t1, t2, ? , tn, the total time from start to b.../b
