Global Predecessor Indexing: Avoiding Binary Search in Weighted Job Scheduling
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.
Keywords
Cite
@article{arxiv.2506.22922,
title = {Global Predecessor Indexing: Avoiding Binary Search in Weighted Job Scheduling},
author = {Amit Joshi},
journal= {arXiv preprint arXiv:2506.22922},
year = {2025}
}
Comments
6 pages, 9 figures including tables. Short theoretical and practical paper on improved dynamic programming for weighted job scheduling with linear-time preprocessing