Skip to main content

Faster Algorithms for Bound-Consistency of the Sortedness and the Alldifferent Constraint

  • Conference paper
  • First Online:
Principles and Practice of Constraint Programming – CP 2000 (CP 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1894))

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.

    MATH  Google Scholar 

  2. N. Bleuzen-Guernalec and A. Colmerauer. Narrowing a 2n-block of sortings in $O(n log n)$. Lecture Notes in Computer Science, 1330:2–16, 1997.

    Article  Google Scholar 

  3. N. Bleuzen-Guernalec and A. Colmerauer. Optimal narrowing of a block of sortings in optimal time. Constraints: An international Journal, 5(1–2):85–118, 2000.

    Article  MATH  MathSciNet  Google Scholar 

  4. Joseph Cheriyan and Kurt Mehlhorn. Algorithms for dense graphs and networks on the random access computer. Algorithmica, 15(5):521–549, 1996.

    Article  MATH  MathSciNet  Google Scholar 

  5. F. Glover. Maximum matchings in a convex bipartite graph. Naval Res. Logist. Quart., 14:313–316, 1967.

    Article  MATH  Google Scholar 

  6. 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 

  7. Eugene L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, New York; Chicago; San Francisco, 1976.

    Google Scholar 

  8. Kurt Mehlhorn and Stefan Naher. LED A: a platform for combinatorial and geometric computing. Cambridge University Press, Cambridge, November 1999.

    Google Scholar 

  9. The Mozart Programming System, http://www.MOZ-oz.org.

  10. 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 

  11. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Mehlhorn, K., Thiel, S. (2000). Faster Algorithms for Bound-Consistency of the Sortedness and the Alldifferent Constraint. In: Dechter, R. (eds) Principles and Practice of Constraint Programming – CP 2000. CP 2000. Lecture Notes in Computer Science, vol 1894. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45349-0_23

Download citation

  • DOI: https://doi.org/10.1007/3-540-45349-0_23

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41053-9

  • Online ISBN: 978-3-540-45349-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics