We study the classical single-machine problem $1\mid\mid\sum U_j$, in which each job has a processing time and a deadline and the objective is to maximize the number of jobs completed on time. Moore's shortest-processing-time algorithm scans the jobs in nondecreasing processing time and accepts a job exactly when the accepted set remains feasible. Although the rule is simple, a direct feasibility test appears to require checking all deadline prefixes. We show that the exact insertion margin is the suffix slack beginning at the candidate's deadline. This quantity can be maintained by an augmented balanced search tree with two operations: $\textsc{Add}(d,a)$ and $\textsc{Slack}(d)$. Each operation takes $O(\log(q+1))$ worst-case time when the tree contains $q$ distinct deadlines. Hence, after sorting, the greedy scan runs in $O(n\log(k+2))$ time, where $k$ is the number of distinct deadlines in the returned set, and in $O(n\log n)$ time overall. Unlike the previous $O(n\log n)$ implementation of Zhao and Yuan, our data structure stores no preemptive schedule or interval family and requires no amortized interval analysis. We also describe the combinatorial structure of the greedy outputs. For every attainable cardinality, each greedy prefix has minimum total processing time. The choices within each equal-processing-time class form a chain-presented laminar matroid, and the direct sum of these matroids has exactly the possible greedy outputs as its bases. Finally, a flow formulation of the deadline-prefix constraints yields a polymatroid rank function.
翻译:暂无翻译