Law, Y.C., Lee, J.H.M., Walsh, T. et al. Constraints (2013) 18: 307. doi:10.1007/s10601-012-9138-7
Multisets generalize sets by allowing elements to have repetitions. In this paper, we study from a formal perspective representations of multiset variables, and the consistency and propagation of constraints involving multiset variables. These help us model problems more naturally and can, for example, prevent introducing unnecessary symmetries into a model. We identify a number of different representations for multiset variables, compare them in terms of effectiveness and efficiency, and propose inference rules to enforce bounds consistency for the representations. In addition, we propose to exploit the variety of a multiset—the number of distinct elements in it—to improve modeling expressiveness and further enhance constraint propagation. We derive a number of inference rules involving the varieties of multiset variables. The rules interact varieties with the traditional components of multiset variables (such as cardinalities) to obtain stronger propagation. We also demonstrate how to apply the rules to perform variety reasoning on some common multiset constraints. Experimental results show that performing variety reasoning on top of cardinality reasoning can effectively reduce more search space and achieve better runtime in solving some multiset CSPs.