ArticleslgStudy

computer science

Multiple subset sum

Multiple subset sum is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Multiple subset sum rather than just read about it. In short: The multiple subset sum problem is an optimization problem in computer science and operations research. It is a generalization of the subset sum problem.

Key takeaways

  • Multiple subset sum belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Multiple subset sum to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Multiple subset sum from memory before moving on to harder problems.

Reference excerpt

The multiple subset sum problem is an optimization problem in computer science and operations research. It is a generalization of the subset sum problem. The input to the problem is a multiset S {\displaystyle S} of n integers and a positive integer m representing the number of subsets. The goal is to construct, from the input integers, some m subsets. The problem has several variants:

Max-sum MSSP: for each subset j in 1,...,m, there is a capacity Cj. The goal is to make the sum of all subsets as large as possible, such that the sum in each subset j is at most Cj. Max-min MSSP (also called bottleneck MSSP or BMSSP): again each subset has a capacity, but now the goal is to make the smallest subset sum as large as possible. Fair SSP: the subsets have no fixed capacities, but each subset belongs to a different person. The utility of each person is the sum of items in his/her subsets. The goal is to construct subsets that satisfy a given criterion of fairness, such as max-min item allocation.

Max-sum and max-min MSSP When m is variable (a part of the input), both problems are strongly NP-hard, by reduction from 3-partition. This means that they have no fully polynomial-time approximation scheme (FPTAS) unless P=NP. Even when m=2, the problems do not have an FPTAS unless P=NP. This can be shown by a reduction from the equal-cardinality partition problem (EPART):

Given an instance a1,...,an of EPART with target sum T, construct an instance 2T+a1, ..., 2T+an of MSSP with target sum (n+1)T for both subsets. A solution to EPART consists of two parts, each of which has n/2 elements with a sum of T. It corresponds to an optimal solution of both MSSP variants: two subsets with a sum of (n+1)T, which is the largest possible. Similarly, each optimal solution of MSSP corresponds to a solution to EPART. Any non-optimal solution to MSSP leaves at least one item unallocated, so its sum is at most 2nT and its minimum is at most nT. In both variants, the approximation ratio is at most 1 − 1 / ( n + 1 ) {\displaystyle 1-1/(n+1)} . Therefore, for any ϵ < 1 / ( n + 1 ) {\displaystyle \epsilon <1/(n+1)} , any algorithm with approximation ratio ( 1 − ϵ ) {\displaystyle (1-\epsilon )} must find the optimal solution if it exists. If we had an FPTAS, then we would have an algorithm with e.g. ϵ = 1 / ( n + 2 ) {\displaystyle \epsilon =1/(n+2)} , with run-time polynomial in n. This algorithm could be used to solve EPART in time polynomial in n. But this is not possible unless P=NP. The following approximation algorithms are known:

For max-sum MSSP, with variable m: A PTAS, which runs in time O(m+n) when ϵ {\displaystyle \epsilon } is fixed. The run-time is at least exponential in 1 / ϵ 2 {\displaystyle 1/\epsilon ^{2}} , and the authors consider it impractical. A more general PTAS for the case in which the subset capacities are different. A 3/4-approximation algorithm which runs in time O(m2n). For max-min MSSP: With variable m: a 2/3-approximation, in time O(n log n). No better approximation is possible unless P=NP (by reduction from 3-partition). With fixed m: a PTAS, running in time O ( n 2 m / ϵ ) {\displaystyle O(n^{2m/\epsilon })} . With a fixed number of distinct input values: a PTAS using Lenstra's algorithm.

Fair subset sum problem The fair subset sum problem (FSSP) is a generalization of SSP in which, after the subset is selected, its items are allocated among two or more agents. The utility of each agent equals the sum of weights of the items allocated to him/her. The goal is that the utility profile satisfies some criterion of fairness, such as the egalitarian rule or the proportional-fair rule. Two variants of the problem are:

Shared items: each item can be allocated to every agent. This setting is similar to fair item allocation with identical valuations (the value of each item is the same for all agents and equals the item weight), however, there is an additional capacity constraint on the total weight of items. As an example, suppose the item weights are 3,5,7,9 and the capacity is 15. Then, some possible allocations are: ( {3,5,7}, {} ); ( {3,5}, {7} ); ( {5}, {3,7} ); ( {5}, {9} ). Of these allocations, the one satisfying the max-min criterion is ( {3,5}, {7} ). Separate items: for each agent, there is a separate set of items that can be allocated only to him/her. This setting is relevant when there is a budget that should be allocated to different projects, where each project belongs to a unique agent. Both variants are NP-hard. However, there are pseudopolynomial time algorithms for enumerating all Pareto-optimal solutions when there are two agents:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Multiple subset sum

Start with the simplest possible case. Write down what Multiple subset sum claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Multiple subset sum before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Multiple subset sum ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Multiple subset sum

In research
Multiple subset sum appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Multiple subset sum in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Multiple subset sum is common in secondary-school and first-year university syllabi. It links to neighbouring topics Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Multiple subset sum outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Multiple subset sum in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Multiple subset sum means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Multiple subset sum out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Multiple subset sum in simple terms?

The multiple subset sum problem is an optimization problem in computer science and operations research. It is a generalization of the subset sum problem.

Why does Multiple subset sum matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Multiple subset sum?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Multiple subset sum.

Tags

  • Optimization algorithms and methods

Keep exploring