ArticleslgStudy

mathematics

3-partition problem

3-partition problem is a mathematics 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 3-partition problem rather than just read about it. In short: The 3-partition problem is a strongly NP-complete problem in computer science. The problem is to decide whether a given multiset of integers can be partitioned into triplets that all have the same sum.

Key takeaways

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

Reference excerpt

The 3-partition problem is a strongly NP-complete problem in computer science. The problem is to decide whether a given multiset of integers can be partitioned into triplets that all have the same sum. More precisely:

Input: a multiset S containing n positive integer elements. Conditions: S must be partitionable into m triplets, S1, S2, ..., Sm, where n = 3m. These triplets partition S in the sense that they are disjoint and they cover S. The target value T is computed by taking the sum of all elements in S, then dividing by m. Output: whether or not there exists a partition of S such that, for all triplets, the sum of the elements in each triplet equals T. The 3-partition problem remains strongly NP-complete under the restriction that every integer in S is strictly between T/4 and T/2.

Example The multiset S={20,23,25,30,49,45,27,30,30,40,22,19} can be partitioned into the four multisets {20,25,45},{23,27,40},{49,22,19},{30,30,30}, each of which sums to T = 90. The set S={1,2,5,6,7,9} can be partitioned into the two sets {1,5,9},{2,6,7} each of which sum to T = 15. (every integer in S is strictly between T/4 and T/2): S={4,5,5,5,5,6}, thus m=2, and T=15. There is feasible 3-partition {4,5,6},{5,5,5}. (every integer in S is strictly between T/4 and T/2): S={4,4,4,6,6,6}, thus m=2, and T=15. There is no feasible solution.

Strong NP-completeness The 3-partition problem remains NP-complete even when the integers in S are bounded above by a polynomial in n. In other words, the problem remains NP-complete even when representing the numbers in the input instance in unary. i.e., 3-partition is NP-complete in the strong sense or strongly NP-complete. This property, and 3-partition in general, is useful in many reductions where numbers are naturally represented in unary.

3-Partition vs Partition The 3-partition problem is similar to the partition problem, in which the goal is to partition S into two subsets with equal sum, and the multiway number partitioning, in which the goal is to partition S into k subsets with equal sum, where k is a fixed parameter. In 3-Partition the goal is to partition S into m = n/3 subsets, not just a fixed number of subsets, with equal sum. Partition is "easier" than 3-Partition: while 3-Partition is strongly NP-hard, Partition is only weakly NP-hard - it is hard only when the numbers are encoded in non-unary system, and have value exponential in n. When the values are polynomial in n, Partition can be solved in polynomial time using the pseudopolynomial time number partitioning algorithm.

Variants In the unrestricted-input variant, the inputs can be arbitrary integers; in the restricted-input variant, the inputs must be in (T/4, T/2). The restricted version is as hard as the unrestricted version: given an instance Su of the unrestricted variant, construct a new instance of the restricted version Sr ≔ {s + 2 T  | s ∈ Su}. Every solution of Su corresponds to a solution of Sr but with a sum of 7 T  instead of T, and every element of Sr is in [2 T , 3 T ] which is contained in (7 T /4, 7 T /2). In the distinct-input variant, the inputs must be in (T/4, T/2), and in addition, they must all be distinct integers. It, too, is as hard as the unrestricted version. In the unrestricted-output variant, the m output subsets can be of arbitrary size - not necessarily 3 (but they still need to have the same sum T). The restricted-output variant can be reduced to the unrestricted-variant: given an instance Sr of the restricted variant, with 3m items summing up to mT, construct a new instance of the unrestricted variant Su ≔ {s + 2T | s ∈ Sr}, with 3m items summing up to 7mT, and with target sum 7 T . Every solution of Sr naturally corresponds to a solution of Su. Conversely, in every solution of Su, since the target sum is 7 T  and each element is in (7 T /4, 7 T /2), there must be exactly 3 elements per set, so it corresponds to a solution of Sr. The ABC-partition problem (also called numerical 3-d matching) is a variant in which, instead of a set S with 3 m  integers, there are three sets A, B, C with m integers in each. The sum of numbers in all sets is ⁠mT⁠. The goal is to construct m triplets, each of which contains one element from A, one from B and one from C, such that the sum of each triplet is T. The 4-partition problem is a variant in which S contains n = 4 m  integers, the sum of all integers is ⁠mT⁠, and the goal is to partition it into m quadruplets, all with a sum of T. It can be assumed that each integer is strictly between T/5 and T/3. Similarly, ABCD-partition is a variant of 4-partition in which there are 4 input sets and each quadruplet should contain one element from each set.

Proofs Garey and Johnson (1975) originally proved 3-Partition to be NP-complete, by a reduction from 3-dimensional matching. The classic reference by Garey and Johnson (1979) describes an NP-completeness proof, reducing from 3-dimensional matching to 4-partition to 3-partition. Logically, the reduction can be partitioned into several steps.

Reduction from 3d-matching to ABCD-partition We are given an instance of E of 3d-matching, containing some m triplets {wi,xj,yk}, where the vertices are w1,...,wq and x1,...,xq and y1,...,yq. We construct an instance of ABCD-partition with 4*m elements, as follows (where r := 32q):

For each triplet t = {wi,xj,yk} in E, the set A contains an element ut = 10r4-kr3-jr2-ir. For each triplet t = {wi,xj,yk} in E, the set B contains wit, C contains xjt, and D contains ykt. So for each of wi, xj, yk, there may be many corresponding elements in B, C, D - one for each triplet in which they appear. We consider one of these elements (denoted by "1") as the "real" one, and the others as "dummy" ones. The element sizes are as follows: wi[1] = 10r4+ir; wi[2..] = 11r4+ir xj[1] = 10r4+jr2; xj[2..] = 11r4+jr2 yk[1] = 10r4+kr3; yk[2..] = 8r4+kr3 The sum of every three "real" elements or every three "dummy" elements is 30r4+ir+jr2+kr3; and if the triplet element is added, the sum is 40r4. The threshold for the ABCD-partition instance is T=40r4. Note that the size of each element is in (T/3,T/5). Given a perfect matching in E, we construct a 4-partition of ABCD as follows:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with 3-partition problem

Start with the simplest possible case. Write down what 3-partition problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, 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 3-partition problem 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 3-partition problem 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 3-partition problem

In research
3-partition problem appears in mathematics 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 3-partition problem 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
3-partition problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Number partitioning, Strongly NP-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for 3-partition problem 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “3-partition problem” →

How to study 3-partition problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what 3-partition problem 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 3-partition problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is 3-partition problem in simple terms?

The 3-partition problem is a strongly NP-complete problem in computer science. The problem is to decide whether a given multiset of integers can be partitioned into triplets that all have the same sum.

Why does 3-partition problem matter?

Because it connects several mathematics 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 3-partition problem?

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 3-partition problem.

Tags

  • Number partitioning
  • Strongly NP-complete problems

Keep exploring