Prikladnaya Diskretnaya Matematika
RUS  ENG    JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB  
General information
Latest issue
Archive
Impact factor

Search papers
Search references

RSS
Latest issue
Current issues
Archive issues
What is RSS



Prikl. Diskr. Mat.:
Year:
Volume:
Issue:
Page:
Find






Personal entry:
Login:
Password:
Save password
Enter
Forgotten password?
Register


Prikladnaya Diskretnaya Matematika, 2025, Number 68, Pages 103–113
DOI: https://doi.org/10.17223/20710410/68/7
(Mi pdm875)
 

Computational Methods in Discrete Mathematics

On the average number of solutions in the knapsack problem

M. S. A. Volkova, E. N. Gordeeva, V. K. Leontievb

a Bauman Moscow State Technical University, Moscow, Russia
b Dorodnitsyn Computing Center of the Russian Academy of Sciences, Moscow, Russia
References:
DOI: https://doi.org/10.17223/20710410/68/7
Abstract: Exact analytical expressions are derived for the average number of solutions to the bounded knapsack problem over a set of fixed-dimension instances. The average number of solutions for a set of knapsack problems with the constraint $ \sum\limits_{i = 1}^n {a_i x_i \leqslant b} $, where the coefficients $ a_i $ do not exceed a given value $ p $, is denoted as $ |\bar{V_p}| $. Formulas are obtained that relate the number of solutions to problem parameters such as the dimension $ n $, weight limit $ p $, and allowable variable values. For Boolean variables $ x_i \in \{0,1\}$, the following formula is derived:
$$ |\bar{V_b}|=\frac{1}{(b+1)^n} \textstyle\sum\limits_{k=0}^n \dbinom{n}{k} \dbinom{b}{n-k} (b+2)^k. $$
For the case $ x_i \in \{0,1,2\}$, a generalized expression is obtained:
\begin{gather*} |\bar{V_b}|{=} \textstyle\sum\limits_{k=0}^n \dbinom{n}{k} (b{+}1)^{k-n} \sum\limits_{t=0}^{n-k} \dbinom{n{-}k}{t} 2^t \Biggl( \dbinom{(n{-}k{+}t{+}b{-}1)/{2}}{n-k}\big[n{-}k{+}t{+}b {=} 1 (\bmod 2)\big] + \\ +\binom{(n-k+t+b)/{2}}{n-k}\big[n-k+t+b= 0 (\bmod 2) \big] \Biggl). \end{gather*}
Additionally, a formula is derived that defines the generating function for the volume of the set of solutions to problems of dimension $n$ with components of the weight vector $(a_1,\dots,a_n)$ taking values in the range from $0$ to $p$. The obtained results can be applied to assess the computational complexity of knapsack problem algorithms, select optimal solution methods, develop decomposition algorithms, and analyze combinatorial structures arising in discrete optimization problems.
Keywords: knapsack problem, generating functions, dynamic programming, NP-complete problems, coefficient method.
Document Type: Article
UDC: 519.16
Language: Russian
Citation: M. S. A. Volkov, E. N. Gordeev, V. K. Leontiev, “On the average number of solutions in the knapsack problem”, Prikl. Diskr. Mat., 2025, no. 68, 103–113
Citation in format AMSBIB
\Bibitem{VolGorLeo25}
\by M.~S.~A.~Volkov, E.~N.~Gordeev, V.~K.~Leontiev
\paper On the average number of solutions in~the~knapsack~problem
\jour Prikl. Diskr. Mat.
\yr 2025
\issue 68
\pages 103--113
\mathnet{http://mi.mathnet.ru/pdm875}
Linking options:
  • https://www.mathnet.ru/eng/pdm875
  • https://www.mathnet.ru/eng/pdm/y2025/i2/p103
  • Citing articles in Google Scholar: Russian citations, English citations
    Related articles in Google Scholar: Russian articles, English articles
    Прикладная дискретная математика
    Statistics & downloads:
    Abstract page:88
    Full-text PDF :51
    References:3
     
      Contact us:
     Terms of Use  Registration to the website  Logotypes © Steklov Mathematical Institute RAS, 2025