On the Exact Matching Problem in Dense Graphs

Authors Nicolas El Maalouly , Sebastian Haslebacher , Lasse Wulf

Thumbnail PDF


  • Filesize: 0.83 MB
  • 17 pages

Document Identifiers

Author Details

Nicolas El Maalouly
  • Department of Computer Science, ETH Zurich, Switzerland
Sebastian Haslebacher
  • Department of Computer Science, ETH Zurich, Switzerland
Lasse Wulf
  • Institute of Discrete Mathematics, TU Graz, Austria

Cite AsGet BibTex

Nicolas El Maalouly, Sebastian Haslebacher, and Lasse Wulf. On the Exact Matching Problem in Dense Graphs. In 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 289, pp. 33:1-33:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


In the Exact Matching problem, we are given a graph whose edges are colored red or blue and the task is to decide for a given integer k, if there is a perfect matching with exactly k red edges. Since 1987 it is known that the Exact Matching Problem can be solved in randomized polynomial time. Despite numerous efforts, it is still not known today whether a deterministic polynomial-time algorithm exists as well. In this paper, we make substantial progress by solving the problem for a multitude of different classes of dense graphs. We solve the Exact Matching problem in deterministic polynomial time for complete r-partite graphs, for unit interval graphs, for bipartite unit interval graphs, for graphs of bounded neighborhood diversity, for chain graphs, and for graphs without a complete bipartite t-hole. We solve the problem in quasi-polynomial time for Erdős-Rényi random graphs G(n, 1/2). We also reprove an earlier result for bounded independence number/bipartite independence number. We use two main tools to obtain these results: A local search algorithm as well as a generalization of an earlier result by Karzanov.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Theory of computation → Parameterized complexity and exact algorithms
  • Exact Matching
  • Perfect Matching
  • Red-Blue Matching
  • Bounded Color Matching
  • Local Search
  • Derandomization


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


  1. Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. PRIMES is in P. Annals of mathematics, pages 781-793, 2004. Google Scholar
  2. Sanjeev Arora and Boaz Barak. Computational complexity: a modern approach. Cambridge University Press, 2009. Google Scholar
  3. Stephan Artmann, Robert Weismantel, and Rico Zenklusen. A strongly polynomial algorithm for bimodular integer linear programming. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, pages 1206-1219, 2017. Google Scholar
  4. Vikraman Arvind, Johannes Köbler, Sebastian Kuhnert, and Jacobo Torán. Solving linear equations parameterized by hamming weight. Algorithmica, 75(2):322-338, 2016. Google Scholar
  5. André Berger, Vincenzo Bonifaci, Fabrizio Grandoni, and Guido Schäfer. Budgeted matching and budgeted matroid intersection via the gasoline puzzle. Mathematical Programming, 128(1):355-372, 2011. Google Scholar
  6. Daniel P. Bovet and Pierluigi Crescenzi. Introduction to the Theory of Complexity. Prentice Hall International (UK) Ltd., GBR, 1994. Google Scholar
  7. Paolo M. Camerini, Giulia Galbiati, and Francesco Maffioli. Random pseudo-polynomial algorithms for exact matroid problems. Journal of Algorithms, 13(2):258-273, 1992. Google Scholar
  8. Ilan Doron-Arad, Ariel Kulik, and Hadas Shachnai. An EPTAS for Budgeted Matching and Budgeted Matroid Intersection via Representative Sets. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261 of Leibniz International Proceedings in Informatics (LIPIcs), pages 49:1-49:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. Google Scholar
  9. Anita Dürr, Nicolas El Maalouly, and Lasse Wulf. An approximation algorithm for the exact matching problem in bipartite graphs. arXiv preprint arXiv:2307.02205, 2023. Google Scholar
  10. Jack Edmonds. Paths, trees, and flowers. Canadian Journal of mathematics, 17:449-467, 1965. Google Scholar
  11. Nicolas El Maalouly. Exact matching: Algorithms and related problems. arXiv preprint arXiv:2203.13899, 2022. Google Scholar
  12. Nicolas El Maalouly and Raphael Steiner. Exact Matching in Graphs of Bounded Independence Number. In 47th International Symposium on Mathematical Foundations of Computer Science (MFCS 2022), volume 241 of Leibniz International Proceedings in Informatics (LIPIcs), pages 46:1-46:14, 2022. Google Scholar
  13. Nicolas El Maalouly, Raphael Steiner, and Lasse Wulf. Exact matching: Correct parity and FPT parameterized by independence number. CoRR, abs/2207.09797, 2022. URL: https://doi.org/10.48550/arXiv.2207.09797.
  14. Nicolas El Maalouly and Yanheng Wang. Counting perfect matchings in dense graphs is hard. arXiv preprint arXiv:2210.15014, 2022. Google Scholar
  15. Nicolas El Maalouly and Lasse Wulf. Exact matching and the top-k perfect matching problem. arXiv preprint arXiv:2209.09661, 2022. Google Scholar
  16. Paul Erdős, Alfréd Rényi, et al. On the evolution of random graphs. Publ. math. inst. hung. acad. sci, 5(1):17-60, 1960. Google Scholar
  17. Dennis Fischer, Tim A Hartmann, Stefan Lendl, and Gerhard J Woeginger. An investigation of the recoverable robust assignment problem. arXiv preprint arXiv:2010.11456, 2020. Google Scholar
  18. Anna Galluccio and Martin Loebl. On the theory of pfaffian orientations. I. Perfect matchings and permanents. the electronic journal of combinatorics, pages R6-R6, 1999. Google Scholar
  19. Hans-Florian Geerdes and Jácint Szabó. A unified proof for Karzanov’s exact matching theorem. Technical Report QP-2011-02, Egerváry Research Group, Budapest, 2011. Google Scholar
  20. Martin Charles Golumbic. Algorithmic graph theory and perfect graphs. Elsevier, 2004. Google Scholar
  21. Fabrizio Grandoni and Rico Zenklusen. Optimization with more than one budget. arXiv preprint arXiv:1002.2147, 2010. Google Scholar
  22. Rohit Gurjar, Arpita Korwar, Jochen Messner, Simon Straub, and Thomas Thierauf. Planarizing gadgets for perfect matching do not exist. In International Symposium on Mathematical Foundations of Computer Science, pages 478-490. Springer, 2012. Google Scholar
  23. Rohit Gurjar, Arpita Korwar, Jochen Messner, and Thomas Thierauf. Exact perfect matching in complete graphs. ACM Transactions on Computation Theory (TOCT), 9(2):1-20, 2017. Google Scholar
  24. Russell Impagliazzo and Avi Wigderson. P= BPP if e requires exponential circuits: Derandomizing the xor lemma. In Proceedings of the twenty-ninth annual ACM symposium on Theory of computing, pages 220-229, 1997. Google Scholar
  25. Xinrui Jia, Ola Svensson, and Weiqiang Yuan. The exact bipartite matching polytope has exponential extension complexity. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1635-1654. SIAM, 2023. Google Scholar
  26. Valentine Kabanets and Russell Impagliazzo. Derandomizing polynomial identity tests means proving circuit lower bounds. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, pages 355-364, 2003. Google Scholar
  27. AV Karzanov. Maximum matching of given weight in complete and complete bipartite graphs. Cybernetics, 23(1):8-13, 1987. Google Scholar
  28. Steven Kelk and Georgios Stamoulis. Integrality gaps for colorful matchings. Discrete Optimization, 32:73-92, 2019. Google Scholar
  29. Michael Lampis. Algorithmic meta-theorems for restrictions of treewidth. Algorithmica, 64:19-37, 2012. Google Scholar
  30. László Lovász. Matching structure and the matching lattice. Journal of Combinatorial Theory, Series B, 43:187-222, 1987. Google Scholar
  31. Monaldo Mastrolilli and Georgios Stamoulis. Constrained matching problems in bipartite graphs. In International Symposium on Combinatorial Optimization, pages 344-355. Springer, 2012. Google Scholar
  32. Monaldo Mastrolilli and Georgios Stamoulis. Bi-criteria and approximation algorithms for restricted matchings. Theoretical Computer Science, 540:115-132, 2014. Google Scholar
  33. Ketan Mulmuley, Umesh V Vazirani, and Vijay V Vazirani. Matching is as easy as matrix inversion. Combinatorica, 7(1):105-113, 1987. Google Scholar
  34. Martin Nägele, Christian Nöbel, Richard Santiago, and Rico Zenklusen. Advances on strictly δ-modular ips. In International Conference on Integer Programming and Combinatorial Optimization, pages 393-407. Springer, 2023. Google Scholar
  35. Yoshio Okamoto, Ryuhei Uehara, and Takeaki Uno. Counting the number of matchings in chordal and chordal bipartite graph classes. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 296-307. Springer, 2009. Google Scholar
  36. Christos H. Papadimitriou and Mihalis Yannakakis. The complexity of restricted spanning tree problems. Journal of the ACM (JACM), 29(2):285-309, 1982. Google Scholar
  37. Jacob T Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM (JACM), 27(4):701-717, 1980. Google Scholar
  38. Georgios Stamoulis. Approximation algorithms for bounded color matchings via convex decompositions. In International Symposium on Mathematical Foundations of Computer Science, pages 625-636. Springer, 2014. Google Scholar
  39. Ola Svensson and Jakub Tarnawski. The matching problem in general graphs is in quasi-NC. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 696-707. Ieee, 2017. Google Scholar
  40. Moshe Y Vardi and Zhiwei Zhang. Quantum-inspired perfect matching under vertex-color constraints. arXiv preprint arXiv:2209.13063, 2022. Google Scholar
  41. Vijay V Vazirani. NC algorithms for computing the number of perfect matchings in k3, 3-free graphs and related problems. Information and computation, 80(2):152-164, 1989. Google Scholar
  42. Tongnyoul Yi, Katta G Murty, and Cosimo Spera. Matchings in colored bipartite networks. Discrete Applied Mathematics, 121(1-3):261-277, 2002. Google Scholar
  43. Raphael Yuster. Almost exact matchings. Algorithmica, 63(1):39-50, 2012. Google Scholar
  44. Richard Zippel. Probabilistic algorithms for sparse polynomials. In International symposium on symbolic and algebraic manipulation, pages 216-226. Springer, 1979. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail