Faster Algorithms for Bound-Consistency of the Sortedness and the Alldifferent Constraint
We present narrowing algorithms for the sortedness and the alldifferent constraint which achieve bound-consistency. The algorithm for the sortedness constraint takes as input 2n intervals X 1 ,..., X n , Y 1 ,Y n from a linearly ordered set D Let S denote the set of all tuples t ∈ X 1 × · · · × X n × Y 1 · · · × Y n such that the last n components of t are obtained by sorting the first n components. Our algorithm determines whether S is non-empty and if so reduces the intervals to bound-consistency. The running time of the algorithm is asymptotically the same as for sorting the interval endpoints. In problems where this is faster than O(n log n), this improves upon previous results. The algorithm for the alldifferent constraint takes as input n integer intervals Z 1 ,..., Z n . Let T denote all tuples t ∈ Z 1 · · · × Z n where all components are pairwise different. The algorithm checks whether T is non-empty and if so reduces the ranges to bound-consistency. The running time is also asymptotically the same as for sorting the interval endpoints. When the constraint is for example a permutation constraint, i.e. Z i ⊆ - [1; n] for all i, the running time is linear. This also improves upon previous results.
KeywordsPerfect Match Priority Queue Intersection Graph Free Node Matched Node
Unable to display preview. Download preview PDF.
- GT83.H. N. Gabow and R. E. Tarjan. A linear-time algorithm for a special case of disjoint set union. In ACM Symposium on Theory of Computing (STOC’ 83), pages 246–251. ACM Press, 1983.Google Scholar
- Law76.Eugene L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, New York; Chicago; San Francisco, 1976.Google Scholar
- MN99.Kurt Mehlhorn and Stefan Naher. LED A: a platform for combinatorial and geometric computing. Cambridge University Press, Cambridge, November 1999.Google Scholar
- Moz.The Mozart Programming System, http://www.MOZ-oz.org.
- Pug98.Jean Puget. A fast algorithm for the bound consistency of alldiff constraints. In Proceedings of the 15th National Conference on Artificial Intelligence (AAAI-98) and of the 10th Conference on Innovative Applications of Artificial Intelligence (IAAI-98), pages 359–366, Menio Park, July 26–30 1998. AAAI Press.Google Scholar
- Reg94.J.-C. Regin. A filtering algorithm for constraints of difference in CSPs. In Proc. 12th Conf. American Assoc. Artificial Intelligence, volume 1, pages 362–367. Amer. Assoc. Artificial Intelligence, 1994.Google Scholar