determininstic rounding of linear programs

15
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

Upload: shibbirtanvin

Post on 17-Jul-2015

23 views

Category:

Engineering


4 download

TRANSCRIPT

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

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

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

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

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

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

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

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 4 2 5 9 Time

C𝑗 𝑗

= 2 + 5 + 9

= 16

8/15

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

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

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

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

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

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

February 23, 2014

Sunday