Document Open Access Logo

An Approximation Algorithm for the Exact Matching Problem in Bipartite Graphs

Authors Anita Dürr , Nicolas El Maalouly , Lasse Wulf

Thumbnail PDF


  • Filesize: 0.9 MB
  • 21 pages

Document Identifiers

Author Details

Anita Dürr
  • Department of Computer Science, ETH Zürich, Switzerland
Nicolas El Maalouly
  • Department of Computer Science, ETH Zürich, Switzerland
Lasse Wulf
  • Institute of Discrete Mathematics, TU Graz, Austria

Cite AsGet BibTex

Anita Dürr, Nicolas El Maalouly, and Lasse Wulf. An Approximation Algorithm for the Exact Matching Problem in Bipartite Graphs. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 275, pp. 18:1-18:21, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


In 1982 Papadimitriou and Yannakakis introduced the Exact Matching problem, in which given a red and blue edge-colored graph G and an integer k one has to decide whether there exists a perfect matching in G with exactly k red edges. Even though a randomized polynomial-time algorithm for this problem was quickly found a few years later, it is still unknown today whether a deterministic polynomial-time algorithm exists. This makes the Exact Matching problem an important candidate to test the RP=P hypothesis. In this paper we focus on approximating Exact Matching. While there exists a simple algorithm that computes in deterministic polynomial-time an almost perfect matching with exactly k red edges, not a lot of work focuses on computing perfect matchings with almost k red edges. In fact such an algorithm for bipartite graphs running in deterministic polynomial-time was published only recently (STACS'23). It outputs a perfect matching with k' red edges with the guarantee that 0.5k ≤ k' ≤ 1.5k. In the present paper we aim at approximating the number of red edges without exceeding the limit of k red edges. We construct a deterministic polynomial-time algorithm, which on bipartite graphs computes a perfect matching with k' red edges such that k/3 ≤ k' ≤ k.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Theory of computation → Approximation algorithms analysis
  • Perfect Matching
  • Exact Matching
  • Red-Blue Matching
  • Approximation Algorithms
  • Bounded Color Matching


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


  1. Ilan Doron Arad, Ariel Kulik, and Hadas Shachnai. An EPTAS for budgeted matching and budgeted matroid intersection. CoRR, abs/2302.05681, 2023. URL:
  2. Vikraman Arvind, Johannes Köbler, Sebastian Kuhnert, and Jacobo Torán. Solving linear equations parameterized by hamming weight. Algorithmica, 75(2):322-338, 2016. URL:
  3. André Berger, Vincenzo Bonifaci, Fabrizio Grandoni, and Guido Schäfer. Budgeted matching and budgeted matroid intersection via the gasoline puzzle. Math. Program., 128(1-2):355-372, 2011. URL:
  4. Jacek Blazewicz, Piotr Formanowicz, Marta Kasprzak, Petra Schuurman, and Gerhard J. Woeginger. A polynomial time equivalence between DNA sequencing and the exact perfect matching problem. Discret. Optim., 4(2):154-162, 2007. URL:
  5. Paolo M. Camerini, Giulia Galbiati, and Francesco Maffioli. Random pseudo-polynomial algorithms for exact matroid problems. J. Algorithms, 13(2):258-273, 1992. URL:
  6. Jack Edmonds. Maximum matching and a polyhedron with 0, 1-vertices. Journal of research of the National Bureau of Standards B, 69(125-130):55-56, 1965. Google Scholar
  7. Nicolas El Maalouly. Exact matching: Algorithms and related problems. In Petra Berenbrink, Patricia Bouyer, Anuj Dawar, and Mamadou Moustapha Kanté, editors, 40th International Symposium on Theoretical Aspects of Computer Science, STACS 2023, March 7-9, 2023, Hamburg, Germany, volume 254 of LIPIcs, pages 29:1-29:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. URL:
  8. Nicolas El Maalouly and Raphael Steiner. Exact matching in graphs of bounded independence number. In Stefan Szeider, Robert Ganian, and Alexandra Silva, editors, 47th International Symposium on Mathematical Foundations of Computer Science, MFCS 2022, August 22-26, 2022, Vienna, Austria, volume 241 of LIPIcs, pages 46:1-46:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL:
  9. Nicolas El Maalouly, Raphael Steiner, and Lasse Wulf. Exact matching: Correct parity and FPT parameterized by independence number. CoRR, abs/2207.09797, 2022. URL:
  10. Dennis Fischer, Tim A. Hartmann, Stefan Lendl, and Gerhard J. Woeginger. An investigation of the recoverable robust assignment problem. In Petr A. Golovach and Meirav Zehavi, editors, 16th International Symposium on Parameterized and Exact Computation, IPEC 2021, September 8-10, 2021, Lisbon, Portugal, volume 214 of LIPIcs, pages 19:1-19:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. URL:
  11. Anna Galluccio and Martin Loebl. On the theory of pfaffian orientations. I. perfect matchings and permanents. Electron. J. Comb., 6, 1999. URL:
  12. Hans-Florian Geerdes and Jácint Szabó. A unified proof for Karzanov’s exact matching theorem. quick proof QP-2011-02, Egerváry Research Group, Budapest, 2011. Google Scholar
  13. Fabrizio Grandoni and Rico Zenklusen. Optimization with more than one budget. CoRR, abs/1002.2147, 2010. URL:
  14. Rohit Gurjar, Arpita Korwar, Jochen Messner, Simon Straub, and Thomas Thierauf. Planarizing gadgets for perfect matching do not exist. ACM Trans. Comput. Theory, 8(4):14:1-14:15, 2016. URL:
  15. Rohit Gurjar, Arpita Korwar, Jochen Messner, and Thomas Thierauf. Exact perfect matching in complete graphs. ACM Trans. Comput. Theory, 9(2):8:1-8:20, 2017. URL:
  16. AV Karzanov. Maximum matching of given weight in complete and complete bipartite graphs. Cybernetics, 23(1):8-13, 1987. Google Scholar
  17. Monaldo Mastrolilli and Georgios Stamoulis. Constrained matching problems in bipartite graphs. In Ali Ridha Mahjoub, Vangelis Markakis, Ioannis Milis, and Vangelis Th. Paschos, editors, Combinatorial Optimization - Second International Symposium, ISCO 2012, Athens, Greece, April 19-21, 2012, Revised Selected Papers, volume 7422 of Lecture Notes in Computer Science, pages 344-355. Springer, 2012. URL:
  18. Monaldo Mastrolilli and Georgios Stamoulis. Bi-criteria and approximation algorithms for restricted matchings. Theor. Comput. Sci., 540:115-132, 2014. URL:
  19. Ketan Mulmuley, Umesh V. Vazirani, and Vijay V. Vazirani. Matching is as easy as matrix inversion. Comb., 7(1):105-113, 1987. URL:
  20. Christos H. Papadimitriou and Mihalis Yannakakis. The complexity of restricted spanning tree problems. J. ACM, 29(2):285-309, April 1982. URL:
  21. Georgios Stamoulis. Approximation algorithms for bounded color matchings via convex decompositions. In Erzsébet Csuhaj-Varjú, Martin Dietzfelbinger, and Zoltán Ésik, editors, Mathematical Foundations of Computer Science 2014 - 39th International Symposium, MFCS 2014, Budapest, Hungary, August 25-29, 2014. Proceedings, Part II, volume 8635 of Lecture Notes in Computer Science, pages 625-636. Springer, 2014. URL:
  22. Ola Svensson and Jakub Tarnawski. The matching problem in general graphs is in quasi-NC. In Chris Umans, editor, 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, 2017, pages 696-707. IEEE Computer Society, 2017. URL:
  23. Moshe Y Vardi and Zhiwei Zhang. Quantum-inspired perfect matching under vertex-color constraints. arXiv preprint arXiv:2209.13063, 2022. Google Scholar
  24. Tongnyoul Yi, Katta G. Murty, and Cosimo Spera. Matchings in colored bipartite networks. Discret. Appl. Math., 121(1-3):261-277, 2002. URL:
  25. Raphael Yuster. Almost exact matchings. Algorithmica, 63(1-2):39-50, 2012. URL:
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