On Instance-Optimal Algorithms for a Generalization of Nuts and Bolts and Generalized Sorting

Authors Mayank Goswami , Riko Jacob



PDF
Thumbnail PDF

File

LIPIcs.APPROX-RANDOM.2024.23.pdf
  • Filesize: 0.91 MB
  • 23 pages

Document Identifiers

Author Details

Mayank Goswami
  • Queens College CUNY, Flushing, New York, USA
Riko Jacob
  • IT University of Copenhagen, København S, Denmark

Cite AsGet BibTex

Mayank Goswami and Riko Jacob. On Instance-Optimal Algorithms for a Generalization of Nuts and Bolts and Generalized Sorting. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 317, pp. 23:1-23:23, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2024.23

Abstract

We generalize the classical nuts and bolts problem to a setting where the input is a collection of n nuts and m bolts, and there is no promise of any matching pairs. It is not allowed to compare a nut directly with a nut or a bolt directly with a bolt, and the goal is to perform the fewest nut-bolt comparisons to discover the partial order between the nuts and bolts. We term this problem bipartite sorting. We show that instances of bipartite sorting of the same size exhibit a wide range of complexity, and propose to perform a fine-grained analysis for this problem. We rule out straightforward notions of instance-optimality as being too stringent, and adopt a neighborhood-based definition. Our definition may be of independent interest as a unifying lens for instance-optimal algorithms for other static problems existing in literature. This includes problems like sorting (Estivill-Castro and Woods, ACM Comput. Surv. 1992), convex hull (Afshani, Barbay and Chan, JACM 2017), adaptive joins (Demaine, López-Ortiz and Munro, SODA 2000), and the recent concept of universal optimality for graphs (Haeupler, Hladík, Rozhoň, Tarjan and Tětek, 2023). As our main result on bipartite sorting, we give a randomized algorithm that is within a factor of O(log³(n+m)) of being instance-optimal w.h.p., with respect to the neighborhood-based definition. As our second contribution, we generalize bipartite sorting to DAG sorting, when the underlying DAG is not necessarily bipartite. As an unexpected consequence of a simple algorithm for DAG sorting, we rule out a potential lower bound on the widely-studied problem of sorting with priced information, posed by (Charikar, Fagin, Guruswami, Kleinberg, Raghavan and Sahai, STOC 2000). In this problem, comparing keys i and j has a known cost c_{ij} ∈ ℝ^+ ∪ {∞}, and the goal is to sort the keys in an instance-optimal way, by keeping the total cost of an algorithm as close as possible to ∑_{i=1}^{n-1} c_{x(i)x(i+1)}. Here x(1) < ⋯ < x(n) is the sorted order. While several special cases of cost functions have received a lot of attention in the community, no progress on the general version with arbitrary costs has been reported so far. One reason for this lack of progress seems to be a widely-cited Ω(n) lower bound on the competitive ratio for finding the maximum. This Ω(n) lower bound by (Gupta and Kumar, FOCS 2000) uses costs in {0,1,n, ∞}, and although not extended to sorting, this barrier seems to have stalled any progress on the general cost case. We rule out such a potential lower bound by showing the existence of an algorithm with a Õ(n^{3/4}) competitive ratio for the {0,1,n,∞} cost version. This generalizes the setting of generalized sorting proposed by (Huang, Kannan and Khanna, FOCS 2011), where the costs are either 1 or infinity, and the cost of the cheapest proof is always n-1.

Subject Classification

ACM Subject Classification
  • Theory of computation → Abstract machines
  • Theory of computation → Sorting and searching
Keywords
  • Sorting
  • Priced Information
  • Instance Optimality
  • Nuts and Bolts

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Peyman Afshani, Jérémy Barbay, and Timothy M Chan. Instance-optimal geometric algorithms. Journal of the ACM (JACM), 64(1):1-38, 2017. Google Scholar
  2. Alfred V. Aho, Michael R Garey, and Jeffrey D. Ullman. The transitive reduction of a directed graph. SIAM Journal on Computing, 1(2):131-137, 1972. Google Scholar
  3. Noga Alon, Manuel Blum, Amos Fiat, Sampath Kannan, Moni Naor, and Rafail Ostrovsky. Matching nuts and bolts. In Proceedings of the fifteenth annual ACM-SIAM Symposium on Discrete Algorithms (SODA'94), pages 690-696, 1994. Google Scholar
  4. Hans-Jürgen Bandelt and Victor Chepoi. Metric graph theory and geometry: a survey. In Surveys on Discrete and Computational Geometry: Twenty Years Later, editors, Jacob E. Goodman and János Pach and Richard Pollack, volume 453 of Contemporary Mathematics, pages 49-86. AMS, 2008. Google Scholar
  5. Michael A Bender, Mayank Goswami, Dzejla Medjedovic, Pablo Montes, and Kostas Tsichlas. Batched predecessor and sorting with size-priced information in external memory. In Latin American Symposium on Theoretical Informatics, pages 155-167. Springer, 2021. Google Scholar
  6. Jean Cardinal, Justin Dallant, and John Iacono. An instance-optimal algorithm for bichromatic rectangular visibility. In 29th Annual European Symposium on Algorithms (ESA 2021). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. Google Scholar
  7. Jean Cardinal and Samuel Fiorini. On generalized comparison-based sorting problems. In Space-Efficient Data Structures, Streams, and Algorithms, pages 164-175. Springer, 2013. Google Scholar
  8. Moses Charikar, Ronald Fagin, Venkatesan Guruswami, Jon Kleinberg, Prabhakar Raghavan, and Amit Sahai. Query strategies for priced information. Journal of Computer and System Sciences, 64(4):785-819, 2002. Google Scholar
  9. Constantinos Daskalakis, Richard M Karp, Elchanan Mossel, Samantha J Riesenfeld, and Elad Verbin. Sorting and selection in posets. SIAM Journal on Computing, 40(3):597-622, 2011. Google Scholar
  10. Erik D Demaine, Alejandro López-Ortiz, and J Ian Munro. Adaptive set intersections, unions, and differences. In Proceedings of the eleventh annual ACM-SIAM symposium on Discrete algorithms, pages 743-752, 2000. Google Scholar
  11. Amol Deshpande, Lisa Hellerstein, and Devorah Kletenik. Approximation algorithms for stochastic boolean function evaluation and stochastic submodular set cover. In Proceedings of the twenty-fifth annual ACM-SIAM Symposium on Discrete Algorithms (SODA'14), pages 1453-1466. SIAM, 2014. Google Scholar
  12. Devdatt P Dubhashi, Kurt Mehlhorn, Desh Ranjan, and Christian Thiel. Searching, sorting and randomised algorithms for central elements and ideal counting in posets. In International Conference on Foundations of Software Technology and Theoretical Computer Science, pages 436-443. Springer, 1993. Google Scholar
  13. Vladimir Estivill-Castro and Derick Wood. A survey of adaptive sorting algorithms. ACM Comput. Surv., 24(4):441-476, 1992. URL: https://doi.org/10.1145/146370.146381.
  14. Ulrich Faigle and Gy Turán. Sorting and recognition problems for ordered sets. SIAM Journal on Computing, 17(1):100-113, 1988. Google Scholar
  15. Mayank Goswami and Riko Jacob. On instance-optimal algorithms for a generalization of nuts and bolts and generalized sorting, 2023. URL: https://arxiv.org/abs/2211.04601.
  16. Mayank Goswami and Riko Jacob. An algorithm for bichromatic sorting with polylog competitive ratio. In 15th Innovations in Theoretical Computer Science Conference (ITCS 2024). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2024. Google Scholar
  17. Anupam Gupta and Amit Kumar. Sorting and selection with structured costs. In Proceedings 42nd IEEE Symposium on Foundations of Computer Science (FOCS'01), pages 416-425. IEEE, 2001. Google Scholar
  18. Bernhard Haeupler, Richard Hladík, Václav Rozhoň, Robert Tarjan, and Jakub Tětek. Universal optimality of dijkstra via beyond-worst-case heaps, 2023. URL: https://arxiv.org/abs/2311.11793.
  19. J Hartline, E Hong, A Mohr, E Rocke, and K Yasuhara. Personal communication. In , 2000. Google Scholar
  20. Zhiyi Huang, Sampath Kannan, and Sanjeev Khanna. Algorithms for the generalized sorting problem. In 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science (FOCS'11), pages 738-747, 2011. URL: https://doi.org/10.1109/FOCS.2011.54.
  21. Shaofeng H. C. Jiang, Wenqian Wang, Yubo Zhang, and Yuhao Zhang. Algorithms for the generalized poset sorting problem, 2023. URL: https://arxiv.org/abs/2304.01623.
  22. Jeff Kahn and Nathan Linial. Balancing extensions via brunn-minkowski. Combinatorica, 11(4):363-368, 1991. Google Scholar
  23. Haim Kaplan, Eyal Kushilevitz, and Yishay Mansour. Learning with attribute costs. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing (STOC'05), pages 356-365, 2005. Google Scholar
  24. János Komlós, Yuan Ma, and Endre Szemerédi. Matching nuts and bolts in O(n log n) time. SIAM Journal on Discrete Mathematics, 11(3):347-372, 1998. Google Scholar
  25. Shay Mozes, Krzysztof Onak, and Oren Weimann. Finding an optimal tree searching strategy in linear time. In In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA'08), volume 8, pages 1096-1105, 2008. Google Scholar
  26. Krzysztof Onak and Pawel Parys. Generalization of binary search: Searching in trees and forest-like partial orders. In 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS'06), pages 379-388. IEEE, 2006. Google Scholar
  27. Gregory JE Rawlins. Compared to what? An introduction to the analysis of algorithms. Computer Science Press, Inc., 1992. Google Scholar
  28. Andrew Chi-Chin Yao. Probabilistic computations: Toward a unified measure of complexity. In 18th Annual Symposium on Foundations of Computer Science (SFCS 1977), pages 222-227, 1977. URL: https://doi.org/10.1109/SFCS.1977.24.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail