English

Sorting Under 1-$\infty$ Cost Model

Data Structures and Algorithms 2015-11-12 v4

Abstract

In this paper we study the problem of sorting under non-uniform comparison costs, where costs are either 1 or \infty. If comparing a pair has an associated cost of \infty then we say that such a pair cannot be compared (forbidden pairs). Along with the set of elements VV the input to our problem is a graph G(V,E)G(V, E), whose edges represents the pairs that we can compare incurring an unit of cost. Given a graph with nn vertices and qq forbidden edges we propose the first non-trivial deterministic algorithm which makes O((q+n)logn)O((q + n)\log{n}) comparisons with a total complexity of O(n2+qω/2)O(n^2 + q^{\omega/2}), where ω\omega 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)\widetilde{O}(n^2/\sqrt{q + n} + n\sqrt{q}) probes with high probability. When the input graph is random we show that O~(min(n3/2,pn2))\widetilde{O}(\min{(n^{3/2}, pn^2)}) probes suffice, where pp is the edge probability.

Keywords

Cite

@article{arxiv.1508.03698,
  title  = {Sorting Under 1-$\infty$ Cost Model},
  author = {Indranil Banerjee and Dana Richards},
  journal= {arXiv preprint arXiv:1508.03698},
  year   = {2015}
}

Comments

12 pages, 1 figure, submitted to STOC 2016

R2 v1 2026-06-22T10:34:21.129Z