Lukas' Notes

computation scheduling

Definition

Earliest Start Time First Algorithm

The earliest start time first algorithm is a greedy algorithm for the interval partitioning problem. It processes jobs in increasing order of start time and assigns each job to an available machine.

For jobs with intervals , let be the depth of the instance. The algorithm uses machines and assigns each job to a machine that is free at its start time.

Principle

In interval partitioning, every job must be scheduled. A machine is available for job exactly when the last job assigned to that machine finishes no later than .

Processing jobs by increasing start time makes the decision local: when job is considered, all jobs that could already occupy a machine at time have already been seen.

Algorithm

Fixed intervals

Given jobs with intervals :

sort jobs by increasing s[j];
machines = priority queue ordered by finish time;
 
for (j in jobs) {
    m = machine with minimum finish time;
 
    if (m exists && finish[m] <= s[j]) {
        assign j to m;
        finish[m] = f[j];
        update m in machines;
    } else {
        open new machine m_new;
        assign j to m_new;
        finish[m_new] = f[j];
        insert m_new into machines;
    }
}

The invariant is that the priority queue stores one key per open machine, namely the finish time of the last job assigned to that machine.

Feasibility

The algorithm never needs more than machines

Let be the depth of the interval instance. The earliest start time first algorithm can always assign the next job to one of machines.

Contradiction with start time because all machines are in use.

Assume, toward a contradiction, that the algorithm fails when assigning some job

Since jobs are processed by increasing start time, each job currently occupying one of the machines has start time at most .
Since each of those machines is unavailable for , each occupying job has finish time greater than .

Thus, for each occupied machine, there is a job whose interval contains in the half-open sense:

Together with job , this gives jobs active at time :

This contradicts that the depth is . Therefore, some machine is always available among .

Optimality

Optimality for interval partitioning

Earliest start time first uses the minimum possible number of machines.

Depth lower bound depth, every feasible schedule needs at least machines.

By the lower bound from

By feasibility, earliest start time first uses at most machines.
Therefore it uses exactly machines, which is optimal.

Scope

Earliest start time first is optimal for interval partitioning with fixed intervals and objective of minimising the number of machines. It is not the same problem as selecting a maximum compatible subset on one machine.

Complexity

Sorting by start time takes . Each priority queue operation takes , and there is a constant number of priority queue operations per job. Thus the total running time is