Sorting Under Forbidden Comparisons

In this paper we study the problem of sorting under forbidden comparisons where some pairs of elements may not 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 in constant time. Given a graph with n vertices and m = binom(n)(2) - q edges we propose the first non-trivial deterministic algorithm which makes O((q + n)*log(n)) comparisons with a total complexity of 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 widetilde O(n^2/sqrt(q+n) + nsqrt(q)) probes with high probability. When the input graph is random we show that widetilde O(min(n^(3/2), pn^2)) probes suffice, where p is the edge probability.

[1]  B. Bollobás,et al.  Sorting in one round , 1981 .

[2]  J. Kahn,et al.  Balancing poset extensions , 1984 .

[3]  György Turán,et al.  Sorting and Recognition Problems for Ordered Sets , 1985, SIAM J. Comput..

[4]  B. Bollobás,et al.  Graphs whose every transitive orientation contains almost every relation , 1987 .

[5]  Béla Bollobás,et al.  Transitive Orientations of Graphs , 1988, SIAM J. Comput..

[6]  János Komlós,et al.  Almost Sorting in one Round , 1989, Adv. Comput. Res..

[7]  Martin E. Dyer,et al.  A Random Polynomial Time Algorithm for Approximating the Volume of Convex Bodies , 1989, STOC.

[8]  Wayne Goddard,et al.  Optimal randomized algorithms for local sorting and set-maxima , 1990, STOC '90.

[9]  Noga Alon,et al.  Matching nuts and bolts , 1994, SODA '94.

[10]  János Komlós,et al.  Matching nuts and bolts in O(n log n) time , 1996, SODA '96.

[11]  Leonard J. Schulman,et al.  Bounds on the chromatic polynomial and on the number of acyclic orientations of a graph , 1996, Comb..

[12]  John E. Savage,et al.  Models of computation - exploring the power of computing , 1998 .

[13]  Mohamad A. Akra,et al.  On the Solution of Linear Recurrence Equations , 1998 .

[14]  Amit Kumar,et al.  Sorting and selection with structured costs , 2001, Proceedings 2001 IEEE International Conference on Cluster Computing.

[15]  Venkatesan Guruswami,et al.  Query strategies for priced information (extended abstract) , 2000, STOC '00.

[16]  Andrew McGregor,et al.  Sorting and Selection with Random Costs , 2007, LATIN.

[17]  Jean Cardinal,et al.  An efficient algorithm for partial order production , 2008, STOC '09.

[18]  Elchanan Mossel,et al.  Sorting and Selection in Posets , 2007, SIAM J. Comput..

[19]  Sampath Kannan,et al.  Algorithms for the Generalized Sorting Problem , 2011, 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science.

[20]  Jean Cardinal,et al.  On Generalized Comparison-Based Sorting Problems , 2013, Space-Efficient Data Structures, Streams, and Algorithms.

[21]  Faith Ellen,et al.  Space-Efficient Data Structures, Streams, and Algorithms , 2013, Lecture Notes in Computer Science.