1

المرجع الالكتروني للمعلوماتية

تاريخ الرياضيات

الاعداد و نظريتها

تاريخ التحليل

تار يخ الجبر

الهندسة و التبلوجي

الرياضيات في الحضارات المختلفة

العربية

اليونانية

البابلية

الصينية

المايا

المصرية

الهندية

الرياضيات المتقطعة

المنطق

اسس الرياضيات

فلسفة الرياضيات

مواضيع عامة في المنطق

الجبر

الجبر الخطي

الجبر المجرد

الجبر البولياني

مواضيع عامة في الجبر

الضبابية

نظرية المجموعات

نظرية الزمر

نظرية الحلقات والحقول

نظرية الاعداد

نظرية الفئات

حساب المتجهات

المتتاليات-المتسلسلات

المصفوفات و نظريتها

المثلثات

الهندسة

الهندسة المستوية

الهندسة غير المستوية

مواضيع عامة في الهندسة

التفاضل و التكامل

المعادلات التفاضلية و التكاملية

معادلات تفاضلية

معادلات تكاملية

مواضيع عامة في المعادلات

التحليل

التحليل العددي

التحليل العقدي

التحليل الدالي

مواضيع عامة في التحليل

التحليل الحقيقي

التبلوجيا

نظرية الالعاب

الاحتمالات و الاحصاء

نظرية التحكم

بحوث العمليات

نظرية الكم

الشفرات

الرياضيات التطبيقية

نظريات ومبرهنات

علماء الرياضيات

500AD

500-1499

1000to1499

1500to1599

1600to1649

1650to1699

1700to1749

1750to1779

1780to1799

1800to1819

1820to1829

1830to1839

1840to1849

1850to1859

1860to1864

1865to1869

1870to1874

1875to1879

1880to1884

1885to1889

1890to1894

1895to1899

1900to1904

1905to1909

1910to1914

1915to1919

1920to1924

1925to1929

1930to1939

1940to the present

علماء الرياضيات

الرياضيات في العلوم الاخرى

بحوث و اطاريح جامعية

هل تعلم

طرائق التدريس

الرياضيات العامة

نظرية البيان

الرياضيات : نظرية الاعداد :

Subset Sum Problem

المؤلف:  Borwein, J. and Bailey, D

المصدر:  Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters

الجزء والصفحة:  ...

18-7-2020

2455

Subset Sum Problem

There are two problems commonly known as the subset sum problem.

The first ("given sum problem") is the problem of finding what subset of a list of integers has a given sum, which is an integer relation problem where the relation coefficients a_i are 0 or 1.

The ("same sum problem") is the problem of finding a set of n distinct positive real numbers with as large a collection as possible of subsets with the same sum (Proctor 1982).

The same sum problem was solved by Stanley (1980) using the tools of algebraic geometry, with the answer given for n numbers by the first n positive integers: <span style={1,2,...,n}" src="https://mathworld.wolfram.com/images/equations/SubsetSumProblem/Inline5.gif" style="height:15px; width:69px" />. Proctor (1982) gave the first elementary proof of this result. The maximal numbers of subsets of <span style={1,2,...,n}" src="https://mathworld.wolfram.com/images/equations/SubsetSumProblem/Inline6.gif" style="height:15px; width:69px" /> having the same sum for n=1, 2, ... are 1, 1, 2, 2, 3, 5, 8, 14, 23, ... (OEIS A025591). Similarly, the numbers of different subset sums for n=1, 2, ... are 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, ... (OEIS A000124). For example, for n=3, the subsets of <span style={1,2,3}" src="https://mathworld.wolfram.com/images/equations/SubsetSumProblem/Inline10.gif" style="height:15px; width:47px" /> are

sumemptyset = 0

(1)

1 = 1

(2)

2 = 2

(3)

3 = 3

(4)

1+2 = 3

(5)

1+3 = 4

(6)

2+3 = 5

(7)

1+2+3 = 6,

(8)

so the sum appearing most often is 3, which occurs twice, and the number of different sums is 7.

The given sum problem is NP-complete. For small cases, it be solved using generating functions. Consider the number of ways c_(m,s) to select m out of M given integers <span style={a_1,...,a_M}" src="https://mathworld.wolfram.com/images/equations/SubsetSumProblem/Inline38.gif" style="height:15px; width:71px" /> such that their sum equals s, and define the generating function

 G(x,y)=product_(k=1)^M(1+x^(a_k)y).

(9)

Upon expanding in powers of y, this becomes

 G(x,y)=sum_(m=1)^MG_m(x)y^m.

(10)

But as a result of the exponent law x^mx^n=x^(m+n)G_m(x) is precisely the desired generating function

 G_m(x)=sum_(s)c_(m,s)x^s.

(11)

For example, consider the problem of picking m objects from the set <span style={1,2,3,4,5}" src="https://mathworld.wolfram.com/images/equations/SubsetSumProblem/Inline44.gif" style="height:15px; width:77px" />. The generating function G(x,y) is

 G(x,y)=y^5x^(15)+(x^(14)+x^(13)+x^(12)+x^(11)+x^(10))y^4+(x^(12)+x^(11)+2x^(10)+2x^9+2x^8+x^7+x^6)y^3+(x^9+x^8+2x^7+2x^6+2x^5+x^4+x^3)y^2+(x^5+x^4+x^3+x^2+x)y+1.

(12)

So, for example, selecting m=3 objects has the generating function

G_3(x) = sum_(s)c_(3,s)x^s

(13)

= x^(12)+x^(11)+2x^(10)+2x^9+2x^8+x^7+x^6,

(14)

so the number of ways of picking three of the integers 1 through 5 and having them sum to s=12, 11, ..., 6 are the coefficients c_(3,s) of G_3(x), namely 1, 1, 2, 2, 2, 1, and 1. These solutions are summarized in the following table.

s solutions
6 (1, 2, 3)
7 (1, 2, 4)
8 (1, 2, 5), (1, 3, 4)
9 (1, 3, 5), (2, 3, 4)
10 (1, 4, 5), (2, 3, 5)
11 (2, 4, 5)
12 (3, 4, 5)

A nice explicit example original proposed by Pólya (1956) asks for the number of ways to make change from an American dollar (using pennies, nickels, dimes, quarters, and half-dollars). The answer of 292 is provided as the coefficient of the x^(100) term in the series

 sum_(n=0)^inftyP_kx^k=1/((1-x)(1-x^5)(1-x^(10))(1-x^(25))(1-x^(50)))

(15)

(Borwein and Bailey 2003, p. 21).


REFERENCES:

Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, pp. 22-24, 2003.

Coster, M. J.; LaMacchia, B. A.; Odlyzko, A. M.; and Schnorr, C. P. "An Improved Low-Density Subset Sum Algorithm." In Advances in Cryptology: EUROCRYPT '91 (Brighton, 1999) (Ed. D. W. Davis). New York: Springer-Verlag, pp. 54-67, 1992.

Coster, M. J.; Joux, A.; LaMacchia, B. A.; Odlyzko, A. M.; Schnorr, C. P.; and Stern, J. "Improved Low-Density Subset Sum Algorithms." Comput. Complex. 2, 111-128, 1992.

Ferguson, H. R. P. and Bailey, D. H. "A Polynomial Time, Numerically Stable Integer Relation Algorithm." RNR Techn. Rept. RNR-91-032, Jul. 14, 1992.

Lagarias, L. C. and Odlyzko, A. M. "Solving Low-Density Subset Sum Problems." J. ACM 32, 229-246, 1985.

Pólya, G. "On Picture-Writing." Amer. Math. Monthly 63, 689-697, 1956.

Proctor, R. A. "Solution of Two Difficult Combinatorial Problems with Linear Algebra." Amer. Math. Monthly 89, 721-734, 1982.

Schnorr, C. P. and Euchner, M. "Lattice Basis Reduction: Improved Practical Algorithms and Solving Subset Sum Problems." In Fundamentals of Computation Theory: Proceedings of the 8th International Conference, Fct '91 Gosen, Germany, September 9-13, 1991. Berlin: Springer-Verlag, pp. 68-85, 1991.

Sloane, N. J. A. Sequences A000124/M1041 and A025591 in "The On-Line Encyclopedia of Integer Sequences."

Stanley, R. P. "Weyl Groups, the Hard Lefschetz Theorem, and the Sperner Property." SIAM J. Alg. Disc. Math. 1, 168-184, 1980.

EN

تصفح الموقع بالشكل العمودي