High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Determininstic rounding of linear programs
1. Shibbir Ahmed
Student Id : 0805097
Determininstic Rounding of Linear Programs
Chapter: 4
Section: 4.1
Chapter: 4
Section: 4.1
Minimizing the Sum of Completion Times on a Single
Machine
February 23, 2014
Sunday
2. Overview of Section 4.1
Considering a Problem of Scheduling Jobs on a Single Machine
with given Inputs & Constraints to minimize the sum of job
completion time
Illustrating an example of Nonpreemptive Schedule
Finding an optimal solution to the Preemptive version of the
scheduling problem via the rule of Shortest Remaining Processing
Time (SRPT)
Illustrating an example of Preemptive Schedule using SRPT rule
2/15
3. Overview of Section 4.1 (contd.)
Observation from the fact that an Optimal Nonpreemptive
Schedule is feasible for the Preemptive Scheduling problem
Lemma showing that scheduling nonpreemptively does
not delay the jobs by too much
Proving a Theorem for scheduling a single machine to
minimize the sum of completion times by the Lemma & the
Observation
3/15
4. Explanation of Some Terms
Scheduling
Allocation of limited resources to the given set of jobs over time
Components of a Scheduling Problem Tasks/Jobs
Constraints
Resources
Objective/Goal
Single Machine
Only one resource available for the processing of tasks/jobs
4/15
5. Explanation of Some Terms (contd.)
Nonpreemptive
In which a running job can be interrupted before the completion
of a Job
or
For starting another Job
Preemptive
Running Job is executed till Completion of that job
For delaying to complete
Jobs with higher priority
Nonpreemtive Job can not be interrupted
5/15
6. Problem of Scheduling Job on a
Single Machine
Constraints
Inputs
A schedule for jobs on a single machine is to be constructed such that ;
Number of Jobs𝑛
Release Date i.e., The time of arrival of job in the scheduling system𝑟𝑗
Processing Time i.e., The time for which job executes on a machine𝑝𝑗
(i) At most One Job is processed at each point in time
(ii) No Job is processed before its release date
(iii) Each Job must be processed nonpreemptively
6/15
7. Problem of Scheduling Job on a
Single Machine (contd.)
Objective
Find the schedule that minimizes ,
Completion Time i.e., The time at which Job j finished its
processing
C𝑗
C𝑗
𝑛
𝑗=1
The Problem of Minimizing the Average Completion Time
Equivalent to
because
The Average Completion Time just rescales the objective function for each
𝟏/𝒏feasible solution by a factor of
7/15
8. Example of Nonpreemptive Schedule
Job No. Processing
Time (p)
Release
Date (r)
Job1 2 0
Job2 1 4
Job3 4 1
Completion
Time (C)
2
5
9
Job 1 Job 2 Job 3
0 42 5 9 Time
C𝑗
𝑗
= 2 + 5 + 9
= 16
8/15
9. Shortest Remaining Processing Time
(SRPT) Rule
An Optimal Solution to the Preemptive version of the scheduling
problem can be found in polynomial time via
SRPT rule.
(i) Starting at time 0 and schedule the job with the
smallest amount of remaining processing time
as long as the job is past its release date &
have not been already completed
(ii) Scheduling the job until either it is completed or a
new job is released
(iii) Iterating the process
9/15
10. Job No. Processing
Time (p)
Release
Date (r)
Job1 2 0
Job2 1 4
Job3 4 1
Completion
Time (C)
2
5
7
Job 1 Job 2 Job 3
0 4
Job 3
2 5 7 Time
C𝑗
𝑗
= 2 + 5 + 7
= 14
Example of Preemptive Schedule
using SRPT rule
Note:
The Processing of
job1 is not
interrupted when
job3 arrives at time 1
10/15
11. Observation: 4.1
𝐶𝑗
𝑝𝑛
𝑗=1 ≤ OPT
The Completion time of job j in an optimal preemptive schedule𝐶𝑗
𝑝
Let,
OPT The Sum of Completion time in an optimal nonpreemptive schedule
the fact that an Optimal Nonpreemptive
Schedule is feasible for the Preemptive
Scheduling problem
Observation
Proved by
11/15
12. Scheduling Algorithm
Now, Considering this Scheduling Algorithm a Lemma is to be proved.
(i) Finding an optimal preemptive schedule using SRPT
(ii) Scheduling the job nonpreemptively in the same order
that they complete in this preemptive schedule
Example
𝐶1
𝑝
𝐶2
𝑝
𝐶𝑗
𝑝
≤ ≤ … ≤
(i) Schedule Job1 from its release date 𝒓 𝟏 𝑡𝑜 𝑡𝑖𝑚𝑒 (𝒓 𝟏+ 𝒑 𝟏)
(ii) Schedule Job2 as soon as possible after Job1 ; i.e., max(𝒓 𝟏+ 𝒑 𝟏, 𝒓 𝟐) to
max(𝒓 𝟏+ 𝒑 𝟏, 𝒓 𝟐) + 𝒑 𝟐
𝒇𝒐𝒓 𝑪𝒋
𝑵 Job j is processed from max *𝑪𝒋−𝟏
𝑵
, 𝒓𝒋+ 𝑡𝑜 max *𝑪𝒋−𝟏
𝑵
, 𝒓𝒋+ + 𝒑𝒋
12/15
13. Lemma: 4.2
Proof
Consequently, in the time interval from 𝒎𝒂𝒙
𝒌=𝟏,…,𝒋
𝒓 𝒌 to 𝑪𝒋
𝑵
, there
can not be any point in time at which machine is idle.
𝑓𝑜𝑟 𝑒𝑎𝑐ℎ 𝑗𝑜𝑏 𝑗 = 1, … , 𝑛 𝐶𝑗
𝑁 ≤ 2𝐶𝑗
𝑃
As, 𝑗 is processed in the optimal preemptive schedule after jobs1, … , 𝑗 − 1
&𝑪𝒋
𝑷
≥ 𝒎𝒂𝒙
𝒌=𝟏,…,𝒋
𝒓 𝒌 𝑪𝒋
𝑷
≥ 𝒑 𝒌
𝑗
𝑘=1
𝑪𝒋
𝑵
≥ 𝒎𝒂𝒙
𝒌=𝟏,…,𝒋
𝒓 𝒌
So,
Therefore, 𝑪𝒋
𝑵
≤ 𝒎𝒂𝒙
𝒌=𝟏,…,𝒋
𝒓 𝒌 + 𝒑 𝒌
𝑗
𝑘=1 ≤ 𝟐𝑪𝒋
𝑷
13/15
14. Theorem: 4.3
Therefore,
𝑓𝑟𝑜𝑚 𝑳𝒆𝒎𝒎𝒂 𝟒. 𝟐 𝐶𝑗
𝑁 ≤ 2𝐶𝑗
𝑃
& 𝑓𝑟𝑜𝑚 𝑶𝒃𝒔𝒆𝒓𝒗𝒂𝒕𝒊𝒐𝒏 𝟒. 𝟏 ≤𝐶𝑗
𝑃
𝑛
𝑗=1
OPT
2 𝐶𝑗
𝑃
𝑛
𝑗=1
𝐶𝑗
𝑁
𝑛
𝑗=1
≤ ≤ 2 OPT
Concluding Remark Scheduling in order of the completion times of an
optimal preemptive schedule is a 2-approximation
algorithm for scheduling a single machine with release
dates to minimize the sum of completion times.
14/15