Skip to main content

Counting Solutions of Knapsack Constraints

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 5015)


This paper furthers the recent investigation of search heuristics based on solution counting information, by proposing and evaluating algorithms to compute solution densities of variable-value pairs in knapsack constraints. Given a domain consistent constraint, our first algorithm is inspired from what was proposed for regular language membership constraints. Given a bounds consistent constraint, our second algorithm draws from discrete uniform distributions. Experiments on several problems reveal that simple search heuristics built from the information obtained by these algorithms can be very effective.


  • Discrete Random Variable
  • Solution Density
  • Completion Problem
  • Discrete Uniform Distribution
  • Bound Consistency

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

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

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-540-68155-7_17
  • Chapter length: 15 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   89.00
Price excludes VAT (USA)
  • ISBN: 978-3-540-68155-7
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   119.00
Price excludes VAT (USA)


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Aardal, K., Hurkens, C.A.J., Lenstra, A.K.: Solving a System of Linear Diophantine Equations with Lower and Upper Bounds on the Variables. Math. Op. Res. 25, 427–442 (2000)

    CrossRef  MathSciNet  MATH  Google Scholar 

  2. Cornuéjols, G., Dawande, M.: A Class of Hard Small 0-1 Programs. INFORMS J. Computing 11, 205–210 (1999)

    MATH  CrossRef  Google Scholar 

  3. Pesant, G.: A Regular Language Membership Constraint for Finite Sequences of Variables. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 482–495. Springer, Heidelberg (2004)

    Google Scholar 

  4. Pesant, G.: Counting Solutions of CSPs: A Structural Approach. In: Proc. IJCAI 2005, pp. 260–265. Professional Book Center (2005)

    Google Scholar 

  5. Refalo, P.: Impact-Based Search Strategies for Constraint Programming. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 557–571. Springer, Heidelberg (2004)

    Google Scholar 

  6. Trick, M.A.: A Dynamic Programming Approach for Consistency and Propagation for Knapsack Constraints. Annals of Operations Research 118, 73–84 (2003)

    CrossRef  MathSciNet  MATH  Google Scholar 

  7. Wassermann, A.: The Feasibility Version of the Market Split Problem (last consulted on November 10, 2007),

  8. Zanarini, A., Pesant, G.: Solution Counting Algorithms for Constraint-Centered Search Heuristics. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 743–757. Springer, Heidelberg (2007)

    CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations


Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Pesant, G., Quimper, CG. (2008). Counting Solutions of Knapsack Constraints. In: Perron, L., Trick, M.A. (eds) Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems. CPAIOR 2008. Lecture Notes in Computer Science, vol 5015. Springer, Berlin, Heidelberg.

Download citation

  • DOI:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-68154-0

  • Online ISBN: 978-3-540-68155-7

  • eBook Packages: Computer ScienceComputer Science (R0)