Minimum Max-lateness Job Scheduling

Consider the four jobs () in the table below, where is the processing time and is the deadline of each Job . Show a job schedule that is optimal but does not follow the earliest-deadline-first strategy and contains at least one adjacent inversion. Then, repeatedly remove inversions until we have an optimal schedule that can be generated using the earliest-deadline-first strategy. Show the job schedule after removing each inversion.

Job Schedule

Getting the obvious out of the way, we know the earliest-deadline-first strategy would yield:

Let’s start with an optimal scheule by use of inversions and then remove them one at a time:

To verify that this an an optimal scheduling we can verify the jobs are completed before their deadline(assume list number represents job #):

  1. completes with a time of , where deadline is
  2. completes at time , where deadline is
  3. completes at time , where deadline is
  4. completes at time , where deadline is

No lateness, so it is optimal.

We now check for adjacent inversions :

with has no inversion since . with does have inversion as . with does not have inversion as

We remove inversion by swapping and , yielding:

Verifying again:

  1. completes with a time of , where deadline is
  2. completes at time , where deadline is
  3. completes at time , where deadline is
  4. completes at time , where deadline is

Next inversions for :

with does have inversion as . with does not have inversion as . with does not have inversion as .

We remove inversion by swapping and , yielding:

We could verify, but we have now reached the earliest deadline first schedule and the deadlines are ordered.


Dijkstra’ Algorithm Tracing

Show the tracing of executing Dijkstra’s single-source shortest paths algorithm given below on the undirected graph given below. (We discussed this algorithm implementation in class.)

Dikstra's Algorithm Pseudocode (left) and undirected graph example (right)

apologies if I did the drawing process incorrectly, I didnt understand the directions perfectly. I made one mistake merging two iterations together, but difficult to recover/fix unforunately.

Starting Point S

Iteration

Iteration

Iteration

Iteration

I skipped an iteration here by accident - cant fix easily, they were merged

Iteration

Starting Point Z

Iteration

Iteration

Iteration

Iteration

Iteration

Iteration