Soft constraints of difference and equality

  • Authors:
  • Emmanuel Hebrard;Dániel Marx;Barry O'Sullivan;Igor Razgon

  • Affiliations:
  • CNRS, LAAS, Université de Toulouse, Toulouse, France;Humboldt-Universität zu Berlin, Berlin, Germany;Cork Constraint Computation Centre, Department of Computer Science, University College Cork, Cork, Ireland;Department of Computer Science, University of Leicester, Leicester, United Kingdom

  • Venue:
  • Journal of Artificial Intelligence Research
  • Year:
  • 2011

Quantified Score

Hi-index 0.01

Visualization

Abstract

In many combinatorial problems one may need to model the diversity or similarity of sets of assignments. For example, one may wish to maximise or minimise the number of distinct values in a solution. To formulate problems of this type we can use soft variants of the well known ALLDIFFERENT and ALLEQUAL constraints. We present a taxonomy of six soft global constraints, generated by combining the two latter ones and the two standard cost functions, which are either maximised or minimised. We characterise the complexity of achieving arc and bounds consistency on these constraints, resolving those cases for which NP-hardness was neither proven nor disproven. In particular, we explore in depth the constraint ensuring that at least k pairs of variables have a common value. We show that achieving arc consistency is NP-hard, however bounds consistency can be achieved in polynomial time through dynamic programming. Moreover, we show that the maximum number of pairs of equal variables can be approximated by a factor of 1/2 with a linear time greedy algorithm. Finally, we provide a fixed parameter tractable algorithm with respect to the number of values appearing in more than two distinct domains. Interestingly, this taxonomy shows that enforcing equality is harder than enforcing difference.