Sorting Under 1-∞ Cost Model
Abstract
In this paper we study the problem of sorting under non-uniform comparison costs, where costs are either 1 or ∞. If comparing a pair has an associated cost of ∞ then we say that such a pair cannot be compared (forbidden pairs). Along with the set of elements V the input to our problem is a graph G(V, E), whose edges represents the pairs that we can compare incurring an unit of cost. Given a graph with n vertices and q forbidden edges we propose the first non-trivial deterministic algorithm which makes O((q + n)n) comparisons with a total complexity of O(n2 + qω/2), where ω is the exponent in the complexity of matrix multiplication. We also propose a simple randomized algorithm for the problem which makes O(n2/q + n + nq) probes with high probability. When the input graph is random we show that O((n3/2, pn2)) probes suffice, where p is the edge probability.
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.