Exact Matching: Correct Parity and FPT Parameterized by Independence Number

Authors Nicolas El Maalouly , Raphael Steiner , Lasse Wulf

Thumbnail PDF


  • Filesize: 0.86 MB
  • 18 pages

Document Identifiers

Author Details

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

Cite AsGet BibTex

Nicolas El Maalouly, Raphael Steiner, and Lasse Wulf. Exact Matching: Correct Parity and FPT Parameterized by Independence Number. In 34th International Symposium on Algorithms and Computation (ISAAC 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 283, pp. 28:1-28:18, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


Given an integer k and a graph where every edge is colored either red or blue, the goal of the exact matching problem is to find a perfect matching with the property that exactly k of its edges are red. Soon after Papadimitriou and Yannakakis (JACM 1982) introduced the problem, a randomized polynomial-time algorithm solving the problem was described by Mulmuley et al. (Combinatorica 1987). Despite a lot of effort, it is still not known today whether a deterministic polynomial-time algorithm exists. This makes the exact matching problem an important candidate to test the popular conjecture that the complexity classes P and RP are equal. In a recent article (MFCS 2022), progress was made towards this goal by showing that for bipartite graphs of bounded bipartite independence number, a polynomial time algorithm exists. In terms of parameterized complexity, this algorithm was an XP-algorithm parameterized by the bipartite independence number. In this article, we introduce novel algorithmic techniques that allow us to obtain an FPT-algorithm. If the input is a general graph we show that one can at least compute a perfect matching M which has the correct number of red edges modulo 2, in polynomial time. This is motivated by our last result, in which we prove that an FPT algorithm for general graphs, parameterized by the independence number, reduces to the problem of finding in polynomial time a perfect matching M with at most k red edges and the correct number of red edges modulo 2.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Theory of computation → Parameterized complexity and exact algorithms
  • Perfect Matching
  • Exact Matching
  • Independence Number
  • Parameterized Complexity


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


  1. 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
  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. Google Scholar
  3. 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
  4. Jacek Błażewicz, Piotr Formanowicz, Marta Kasprzak, Petra Schuurman, and Gerhard J Woeginger. A polynomial time equivalence between DNA sequencing and the exact perfect matching problem. Discrete Optimization, 4(2):154-162, 2007. Google Scholar
  5. 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
  6. Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms, volume 5. Springer, 2015. Google Scholar
  7. Jack Edmonds. Paths, trees, and flowers. Canadian Journal of Mathematics, 17:449-467, 1965. Google Scholar
  8. Nicolas El Maalouly. Exact matching: Algorithms and related problems. arXiv preprint, 2022. URL: https://arxiv.org/abs/2203.13899.
  9. 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
  10. 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.
  11. Nicolas El Maalouly and Yanheng Wang. Counting perfect matchings in dense graphs is hard. arXiv preprint, 2022. URL: https://arxiv.org/abs/2210.15014.
  12. Dennis Fischer, Tim A Hartmann, Stefan Lendl, and Gerhard J Woeginger. An investigation of the recoverable robust assignment problem. arXiv preprint, 2020. URL: https://arxiv.org/abs/2010.11456.
  13. Anna Galluccio and Martin Loebl. On the theory of Pfaffian orientations. I. Perfect matchings and permanents. Electronic Journal of Combinatorics, 6:R6, 1999. Google Scholar
  14. 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
  15. Ronald L Graham, Bruce L Rothschild, and Joel H Spencer. Ramsey theory, volume 20. John Wiley & Sons, 1991. Google Scholar
  16. Fabrizio Grandoni and Rico Zenklusen. Optimization with more than one budget. arXiv preprint, 2010. URL: https://arxiv.org/abs/1002.2147.
  17. 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
  18. 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
  19. Edith Hemaspaandra, Holger Spakowski, and Mayur Thakur. Complexity of cycle length modularity problems in graphs. In Latin American Symposium on Theoretical Informatics, pages 509-518. Springer, 2004. Google Scholar
  20. 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
  21. AV Karzanov. Maximum matching of given weight in complete and complete bipartite graphs. Cybernetics, 23(1):8-13, 1987. Google Scholar
  22. Steven Kelk and Georgios Stamoulis. Integrality gaps for colorful matchings. Discrete Optimization, 32:73-92, 2019. Google Scholar
  23. László Lovász. Matching structure and the matching lattice. Journal of Combinatorial Theory, Series B, 43:187-222, 1987. Google Scholar
  24. Monaldo Mastrolilli and Georgios Stamoulis. Constrained matching problems in bipartite graphs. In International Symposium on Combinatorial Optimization, pages 344-355. Springer, 2012. Google Scholar
  25. Monaldo Mastrolilli and Georgios Stamoulis. Bi-criteria and approximation algorithms for restricted matchings. Theoretical Computer Science, 540:115-132, 2014. Google Scholar
  26. Ketan Mulmuley, Umesh V Vazirani, and Vijay V Vazirani. Matching is as easy as matrix inversion. Combinatorica, 7(1):105-113, 1987. Google Scholar
  27. Martin Nägele, Benny Sudakov, and Rico Zenklusen. Submodular minimization under congruency constraints. Combinatorica, 39(6):1351-1386, 2019. Google Scholar
  28. 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
  29. Jacob T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM, 27(4):701-717, 1980. Google Scholar
  30. 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
  31. 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
  32. Moshe Y Vardi and Zhiwei Zhang. Quantum-inspired perfect matching under vertex-color constraints. arXiv preprint, 2022. URL: https://arxiv.org/abs/2209.13063.
  33. Tongnyoul Yi, Katta G Murty, and Cosimo Spera. Matchings in colored bipartite networks. Discrete Applied Mathematics, 121(1-3):261-277, 2002. Google Scholar
  34. Raphael Yuster. Almost exact matchings. Algorithmica, 63(1):39-50, 2012. Google Scholar
  35. Richard Zippel. Probabilistic algorithms for sparse polynomials. In International Symposium on Symbolic and Algebraic Computation (EUROSAM 1979), pages 216-226. Springer, 1979. Google Scholar