English

An Algorithm for Bichromatic Sorting with Polylog Competitive Ratio

Data Structures and Algorithms 2023-11-13 v1

Abstract

The problem of sorting with priced information was introduced by [Charikar, Fagin, Guruswami, Kleinberg, Raghavan, Sahai (CFGKRS), STOC 2000]. In this setting, different comparisons have different (potentially infinite) costs. The goal is to find a sorting algorithm with small competitive ratio, defined as the (worst-case) ratio of the algorithm's cost to the cost of the cheapest proof of the sorted order. The simple case of bichromatic sorting posed by [CFGKRS] remains open: We are given two sets AA and BB of total size NN, and the cost of an AAA-A comparison or a BBB-B comparison is higher than an ABA-B comparison. The goal is to sort ABA \cup B. An Ω(logN)\Omega(\log N) lower bound on competitive ratio follows from unit-cost sorting. Note that this is a generalization of the famous nuts and bolts problem, where AAA-A and BBB-B comparisons have infinite cost, and elements of AA and BB are guaranteed to alternate in the final sorted order. In this paper we give a randomized algorithm InversionSort with an almost-optimal w.h.p. competitive ratio of O(log3N)O(\log^{3} N). This is the first algorithm for bichromatic sorting with a o(N)o(N) competitive ratio.

Cite

@article{arxiv.2311.05773,
  title  = {An Algorithm for Bichromatic Sorting with Polylog Competitive Ratio},
  author = {Mayank Goswami and Riko Jacob},
  journal= {arXiv preprint arXiv:2311.05773},
  year   = {2023}
}

Comments

18 pages, accepted to ITCS 2024. arXiv admin note: text overlap with arXiv:2211.04601

R2 v1 2026-06-28T13:16:54.579Z