Skip to main content

Solving Various Weighted Matching Problems with Constraints


This paper studies the resolution of (augmented) weighted matching problems within a constraint programming (CP) framework. The first contribution of the paper is a set of techniques that improves substantially the performance of branch-and-bound algorithms based on constraint propagation and the second contribution is the introduction of weighted matching as a global constraint ( WeightedMatching), that can be propagated using specialized incremental algorithms from Operations Research. We first compare programming techniques that use constraint propagation with specialized algorithms from Operations Research, such as the Busaker and Gowen flow algorithm or the Hungarian method. Although CP is shown not to be competitive with specialized polynomial algorithms for “pure” matching problems, the situation is different as soon as the problems are modified with additional constraints. Using the previously mentioned set of techniques, a simpler branch-and-bound algorithm based on constraint propagation can outperform a complex specialized algorithm. These techniques have been applied with success to the Traveling Salesman Problems [5], which can be seen as an augmented matching problem. We also show that an incremental version of the Hungarian method can be used to propagate a WeightedMatching constraint. This is an extension to the weighted case of the work of Régin [19], which we show to bring significant improvements on a timetabling example.

This is a preview of subscription content, access via your institution.


  1. Busaker R.G., Gowen P.J. (1961). A Procedure for Determining a Family of Minimal Cost Network Flow Patterns, O.R.O. Technical Report 15, Johns Hopkins University.

  2. Caseau Y., Guillo P.-Y., Levenez E. (1993). A Deductive and Object-Oriented Approach to a Complex Scheduling Problem. Proc. of DOOD'93, Phoenix.

  3. CaseauY., Laburthe F. (1994). Improved CLP Scheduling with Tasks Intervals. Proc. of the 11th International Conference on Logic Programming, P. Van Hentenryck ed., The MIT Press.

  4. Caseau Y., Laburthe F. (1996). Cumulative Scheduling with Task Intervals. Proc. of the Joint International Conference and Symposium on Logic Programming, M. Maher ed., The MIT Press.

  5. Caseau Y., Laburthe F. (1997). Solving small TSPs with Constraints. Proc. of the 14th International Conference on Logic Programming, L. Naish ed., The MIT Press.

  6. Cormen T., Leiserson C., Rivest R. (1986). Introduction to Algorithms. The MIT Press.

  7. Ford L.R., Fulkerson D.R. (1956). Maximal Flow through a Network, Candidan Journal of Mathematics, p. 399.

  8. Freuder E., Wallace R. (1992). Partial Constraint Satisfaction, Artificial Intelligence, 58 (1-3), p. 21-70.

    Google Scholar 

  9. Gerards B. (1994). Matching. in Handbook in Operations Research and Management Science (Networks) eds. M.O. Ball et al.

  10. Gondran M., Minoux M. (1984). Graphes and Algorithmes. Eyrolles, 1979 (french) and J. Wiley.

  11. Gabow H.N., Tarjan R.E. (1989). Faster Scaling algorithms for network problems. SIAM Journal of Computing

  12. Jourdan J. (1995). Concurrence et Coop´eration de Mod`eles Multiples. Ph. D. Thesis (french), Paris VII University, France.

    Google Scholar 

  13. Kuhn H.W. (1955). The Hungarian Method for the Assignment Problem, Naval Research Quarterly 2, p. 83.

    Google Scholar 

  14. Laburthe F. (1998). Constraints and Algorithms for Combinatorial Optimization, unpublished PhD. Thesis, University of Paris 7.

  15. Laburthe F., Savéant P., De Givry S., Jourdan J. (1998). Eclair: a Library of Constraints for Finite Domains, Research Report ATS 98-2, Thomson-CSF Corporate Research Laboratory, Orsay, France.

    Google Scholar 

  16. Mackworth A.K. (1977). Consistency in networks of relations. Artificial Intelligence, 8.

  17. Mohr R., Massini G. (1988). Running Efficiently Arc Consistency, Syntactic and Structural Pattern Recognition. Springer Verlag.

  18. Papadimitrou C., Steiglitz K. (1991). Combinatorial Optimization. Prentice Hall.

  19. Régin, J.C. (1994). A Filtering Algorithm for Constraints of Difference in CSPs Proc. of AAAI.

  20. Reeves C. (1993). Modern Heuristic techniques for combinatorial problems. Halsted Press.

  21. Van Hentenryck P. (1989). Constraint Satisfaction in Logic Programming. The MIT Press.

  22. van Leuwen J. (1990). Graph Algorithms. in Handbook of Theoretical Computer Science, Elsevier Science Publishers.

Download references

Author information

Authors and Affiliations


Rights and permissions

Reprints and Permissions

About this article

Cite this article

Caseau, Y., Laburthe, F. Solving Various Weighted Matching Problems with Constraints. Constraints 5, 141–160 (2000).

Download citation

  • Issue Date:

  • DOI:

  • global constraint
  • weighted matching
  • resource allocation
  • Hungarian method