Stochastic and Worst-Case Generalized Sorting Revisited

Abstract

The generalized sorting problem is a restricted version of standard comparison sorting where we wish to sort n elements but only a subset of pairs are allowed to be compared. Formally, there is some known graph G = (V, E) on the n elements v1, …, vn, and the goal is to determine the true order of the elements using as few comparisons as possible, where all comparisons (vi, vj) must be edges in E. We are promised that if the true ordering is x1 < x2 < ·s < xn for \xi\ an unknown permutation of the vertices \vi\, then (xi, xi+1) ∈ E for all i: 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 Erdos-Renyi random graphs G(n, p) (with the promised Hamiltonian path added to ensure sorting is possible), we provide an algorithm for generalized sorting with an expected O(n (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 uses O((n np, n/p2)) comparisons. For arbitrary graphs G with n vertices and m edges (again with the promised Hamiltonian path), we provide an algorithm for generalized sorting with O(mn) comparisons. This improves over the best known algorithm of Huang et al., which uses (m, O(n3/2)) comparisons.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…