Lune

FOCS2021Top-tier venue

Stochastic and Worst-Case Generalized Sorting Revisited

William Kuszmaul, Shyam Narayanan

Abstract

The generalized sorting problem is a restricted version of standard comparison sorting where we wish to sortnnelements but only a subset of pairs are allowed to be compared. Formally, there is some known graphG=(V,E)G=(V, E)on thennelementsv1,…,vnv_{1, \ldots, v_{n}}, and the goal is to determine the true order of the elements using as few comparisons as possible, where all comparisons (vi,vjv_{i, v_{j}}) must be edges inEE. We are promised that if the true ordering isx1<x2<⋯<xnx_{1 < x_{2} < \cdots < x_{n}}for{xi}\{x_{i\}}an unknown permutation of the vertices{vi}\{v_{i\}}, then(xi,xi+1)∈E(x_{i, x_{i+1})\in E}for allii: this Hamiltonian path ensures that sorting is actually possible. In this work, we improve the bounds for generalized sorting on both random graphs and worst-case graphs. For Erdős-Renyi random graphsG(n,p)G(n, p)(with the promised Hamiltonian path added to ensure sorting is possible), we provide an algorithm for generalized sorting with an expectedO(n lg(np))O(n\ \text{lg}(np))comparisons, which we prove to be optimal for query complexity. This strongly improves over the best known algorithm of Huang, Kannan, and Khanna (FOCS 2011), which usesO(min⁡(nnp, n/p2))~\tilde{O(\min(n\sqrt{np},\ n/p^{2}))}comparisons. For arbitrary graphsGGwithnnvertices andmmedges (again with the promised Hamiltonian path), we provide an algorithm for generalized sorting withO(mn)~\tilde{O(\sqrt{mn})}comparisons. This improves over the best known algorithm of Huang et al., which usesmin⁡(m,O~(n3/2))\min(m,\tilde{O}(n^{3/2}))comparisons.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Sorting and Selection in Rounds with Adversarial ComparisonsChristopher TrevisanSODA 2024

Related papers

  1. Tight Bounds for Sorting Under Partial InformationIvor van der Hoog, Daniel RutschmannFOCS 2024 · 8 citations
  2. Optimal Bounds for Noisy SortingYuzhou Gu, Yinzhan XuSTOC 2023 · 11 citations
  3. Improved Approximation for Ranking on General GraphsMahsa Derakhshan, Mohammad Roghani, Mohammad Saneian, Tao YuSODA 2026
  4. Efficiently Computing Join Orders with Heuristic SearchImmanuel Haffner, Jens DittrichSIGMOD 2023 · 8 citations
  5. Query Complexity of Inversion Minimization on TreesIvan Hu, Dieter van Melkebeek, Andrew MorganSODA 2023 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines