English

Online Graph Balancing and the Power of Two Choices

Data Structures and Algorithms 2026-04-07 v1 Discrete Mathematics

Abstract

In the classic online graph balancing problem, edges arrive sequentially and must be oriented immediately upon arrival, to minimize the maximum in-degree. For adversarial arrivals, the natural greedy algorithm is O(logn)O(\log n)-competitive, and this bound is the best possible for any algorithm, even with randomization. We study this problem in the i.i.d. model where a base graph GG is known in advance and each arrival is an independent uniformly random edge of GG. This model generalizes the standard power-of-two choices setting, corresponding to G=KnG = K_n, where the greedy algorithm achieves an O(log ⁣logn)O(\log\!\log n) guarantee. We ask whether a similar bound is possible for arbitrary base graphs. While the greedy algorithm is optimal for adversarial arrivals and also for i.i.d. arrivals from regular base graphs (such as G=KnG = K_n), we show that it can perform poorly in general: there exist mildly irregular graphs GG for which greedy is Ω~(logn)\widetilde{\Omega}(\log n)-competitive under i.i.d. arrivals. In sharp contrast, our main result is an O(log ⁣logn)O(\log\!\log n)-competitive online algorithm for every base graph GG; this is optimal up to constant factors, since an Ω(log ⁣logn)\Omega(\log\!\log n) lower bound already holds even for the complete graph G=KnG = K_n. The key new idea is a notion of log-skewness for graphs, which captures the irregular substructures in GG that force the offline optimum to be large. Moreover, we show that any base graph can be decomposed into ``skew-biregular'' pieces at only O(log ⁣logn)O(\log\!\log n) scales of log-skewness, and use this to design a decomposition-based variant of greedy that is O(log ⁣logn)O(\log\!\log n)-competitive.

Keywords

Cite

@article{arxiv.2604.04159,
  title  = {Online Graph Balancing and the Power of Two Choices},
  author = {Nikhil Bansal and Milind Prabhu and Sahil Singla and Siddharth M. Sundaram},
  journal= {arXiv preprint arXiv:2604.04159},
  year   = {2026}
}

Comments

22 pages, 3 figures