paper

Global Predecessor Indexing: Avoiding Binary Search in Weighted Job Scheduling

arXiv:2506.22922

Abstract

We present an improved solution to the Weighted Job Scheduling (WJS) problem. While the classical dynamic programming (DP) solution for jobs runs in time due to comparison-based sorting and per-job binary search, we eliminate the binary search bottleneck. In its place, we introduce a novel multi-phase preprocessing technique called \emph{Global Predecessor Indexing (GPI)}, which computes the latest non-overlapping job (i.e., the predecessor) for all jobs via a two-pointer linear-time pass after sorting. This yields a time complexity of where is the time to sort all jobs. GPI enables direct use in the classical DP recurrence. When combined with linear-time sorting, GPI yields a complete solution. Even with comparison-based sorting, GPI significantly outperforms the classical solution in practice by avoiding repeated binary searches in favor of the more cache-efficient extra sort and two-pointer pass.

6 pages, 9 figures including tables. Short theoretical and practical paper on improved dynamic programming for weighted job scheduling with linear-time preprocessing

Global Predecessor Indexing: Avoiding Binary Search in Weighted Job Scheduling · wovepaper