Job Sequencing With Deadlines
By,
M. Sabiha
MCA 2nd Year
Problem Statement
In Job Sequencing Deadline Problem, the
objective is to find the sequence of jobs,
which is completed within their deadline
and gives maximum profit.
Solution
Let us consider a set of ‘n’ jobs which are
associated with deadlines.
We need to focus on three things here:
(a) The profit is earned if a job is completed.
(b) Jobs must be in an order.
(c) Maximum profit.
Constraints
Assume,
Then, the optimal solution of this
algorithm is a feasible solution with
maximum profit.
Deadline of ith job Ji = D(i)
Profit = Pi
Thus,
D(i) > 0 for 1 ≤ i ≤ n
p1 ≤ p2 ≤ p3 ≤ … ≤ pn
J1 J2 J3 J4 J5
2 1 3 2 1
60 100 20 40 20
Now, let’s sort the jobs according to their
profit …
J2 J1 J4 J3 J5
1 2 2 3 1
100 60 40 20 20
J1 J2 J3 J4 J5
2 1 3 2 1
60 100 20 40 20
J2 J1 J4 J3 J5
1 2 2 3 1
100 60 40 20 20
J2
J5
J1
J4
J3
Deadline
The Job Sequence:
( J2, J1, J3 )
The Maximum Profit:
100 + 60 + 20 = 180
Points to remember…
1. In ‘Job Sequencing With Deadline’ problem we have n jobs
J1, J2, … , Jn each has an associated deadline D1, D2, … , Dn
and profit P1, P2, ... , Pn.
2. Profit will only be awarded or earned if the job is
completed on or before the deadline.
3. We assume that each job takes unit time to complete.
4. The objective is to earn maximum profit when only one
job can be scheduled or processed at any given time.
Job Sequencing with Deadlines

Job Sequencing with Deadlines

  • 1.
    Job Sequencing WithDeadlines By, M. Sabiha MCA 2nd Year
  • 3.
    Problem Statement In JobSequencing Deadline Problem, the objective is to find the sequence of jobs, which is completed within their deadline and gives maximum profit.
  • 4.
    Solution Let us considera set of ‘n’ jobs which are associated with deadlines. We need to focus on three things here: (a) The profit is earned if a job is completed. (b) Jobs must be in an order. (c) Maximum profit.
  • 5.
    Constraints Assume, Then, the optimalsolution of this algorithm is a feasible solution with maximum profit. Deadline of ith job Ji = D(i) Profit = Pi
  • 6.
    Thus, D(i) > 0for 1 ≤ i ≤ n p1 ≤ p2 ≤ p3 ≤ … ≤ pn
  • 8.
    J1 J2 J3J4 J5 2 1 3 2 1 60 100 20 40 20
  • 9.
    Now, let’s sortthe jobs according to their profit … J2 J1 J4 J3 J5 1 2 2 3 1 100 60 40 20 20 J1 J2 J3 J4 J5 2 1 3 2 1 60 100 20 40 20
  • 10.
    J2 J1 J4J3 J5 1 2 2 3 1 100 60 40 20 20 J2 J5 J1 J4 J3 Deadline The Job Sequence: ( J2, J1, J3 ) The Maximum Profit: 100 + 60 + 20 = 180
  • 11.
    Points to remember… 1.In ‘Job Sequencing With Deadline’ problem we have n jobs J1, J2, … , Jn each has an associated deadline D1, D2, … , Dn and profit P1, P2, ... , Pn. 2. Profit will only be awarded or earned if the job is completed on or before the deadline. 3. We assume that each job takes unit time to complete. 4. The objective is to earn maximum profit when only one job can be scheduled or processed at any given time.