L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule Theorem The greedy algorithm given is a 2 -approximation algorithm • Before we prove this, we prove two useful facts, Fact Opt � max j t j Job j takes t j ◦ Some machine must process the largest job time units � j t j Fact Opt � m m machines n jobs ◦ There is a total of � j t j time units of work to be done � j t j ◦ Some machine i must have load L i at least m (the m machines can’t all have below average load)
L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule Theorem The greedy algorithm given is a 2 -approximation algorithm Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule Theorem The greedy algorithm given is a 2 -approximation algorithm Proof Consider the machine i with largest load T g = L i Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 5 Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units • If we then sum over all k , m machines n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m � j t j Fact Opt � m
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m also t j � Opt (by the first fact)
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m also t j � Opt (by the first fact) Fact Opt � max j t j
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m also t j � Opt (by the first fact)
L i is the load of The greedy approximation job j machine i Let Opt denote the time taken by the optimal scheduling of jobs Let T g denote the time taken by the greedy schedule L i = T g 1 Theorem The greedy algorithm given is a 2 -approximation algorithm 2 3 Proof Consider the machine i with largest load T g = L i 4 • Let j denote the last job machine i completes 5 • When job j was assigned, machine i had the smallest load, L i − t j So. . . Job j takes t j L i − t j � L k for all 1 � k � m , time units m • If we then sum over all k , � m ( L i − t j ) � L k m machines k =1 n jobs � m k =1 L k so ( L i − t j ) � � Opt (by the second fact) m also t j � Opt (by the first fact) Therefore, T g = L i = ( L i − t j ) + t j � Opt + Opt = 2Opt
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest)
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest)
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 greedy solution 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load
Longest Processing Time (LPT) 1 greedy solution 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load How long does it take to compute this schedule?
Longest Processing Time (LPT) 1 greedy solution 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load How long does it take to compute this schedule? O ( n log n ) time (to sort the jobs)
Longest Processing Time (LPT) 1 greedy solution 2 3 4 5 Step 1: Sort the jobs into non-increasing order (job 1 is now largest) Step 2: Put job j on the machine i with smallest (current) load How long does it take to compute this schedule? O ( n log n ) time (to sort the jobs) How good is it?
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm m machines n jobs Job j takes t j time units
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines n jobs Job j takes t j time units
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs Job j takes t j time units
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j time units
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units Proof
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units Proof ◦ Note that t 1 � t 2 � t 3 � . . . t m � t ( m +1)
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units Proof ◦ Note that t 1 � t 2 � t 3 � . . . t m � t ( m +1) ◦ One of the m machines must be assigned (at least) two of these m + 1 jobs under any schedule
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units Proof ◦ Note that t 1 � t 2 � t 3 � . . . t m � t ( m +1) ◦ One of the m machines must be assigned (at least) two of these m + 1 jobs under any schedule ◦ So we have that any schedule takes at least 2 t ( m +1) time
The LPT approximation • Let T l denote the time taken by the LPT schedule L i is the load of machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm • Before we prove this, we prove another useful fact and a Lemma m machines Fact If there are at most m jobs ( n � m ) then LPT is optimal n jobs If there are at most m jobs then LPT gives each job its own machine so max i L i � max j t j � Opt Job j takes t j Lemma If n > m then Opt � 2 t ( m +1) (after sorting) time units Proof ◦ Note that t 1 � t 2 � t 3 � . . . t m � t ( m +1) ◦ One of the m machines must be assigned (at least) two of these m + 1 jobs under any schedule ◦ So we have that any schedule takes at least 2 t ( m +1) time in particular Opt � 2 t ( m +1)
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm Proof Consider the machine i with largest load T l = L i m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm Proof Consider the machine i with largest load T l = L i • Let j denote the last job machine i completes m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm 1 Proof Consider the machine i with largest load T l = L i 2 • Let j denote the last job machine i completes 3 4 5 job j m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm 1 Proof Consider the machine i with largest load T l = L i 2 • Let j denote the last job machine i completes 3 4 • Using the same argument as before, we have that, 5 job j m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm 1 Proof Consider the machine i with largest load T l = L i 2 • Let j denote the last job machine i completes 3 4 • Using the same argument as before, we have that, 5 ( L i − t j ) � Opt job j m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm 1 Proof Consider the machine i with largest load T l = L i 2 • Let j denote the last job machine i completes 3 4 • Using the same argument as before, we have that, 5 ( L i − t j ) � Opt job j • If n � m then we are done so assume n > m m machines n jobs Job j takes t j time units
L i is the load of The LPT approximation machine i Theorem The LPT algorithm is a 3 / 2 -approximation algorithm 1 Proof Consider the machine i with largest load T l = L i 2 • Let j denote the last job machine i completes 3 4 • Using the same argument as before, we have that, 5 ( L i − t j ) � Opt job j • If n � m then we are done so assume n > m m machines because LPT is optimal in this case n jobs Job j takes t j time units
Recommend
More recommend