Reduction of the partition problem

In summary, the problem is to determine if a set of packages with specific measurements can fit into two identical trucks with a specific luggage space. This problem is shown to be NP-complete by reducing it to the partition problem and constructing packages with specific measurements that correspond to the numbers in the partition problem.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

A trucking company has two same trucks. The luggage space is a cuboid with floor area $2m\times 5m$ and height $3m$. The packages that the comany has to deliver are also cuboid.
The packages must be distributed into the two trucks.
The problem is defined as followed:
  • $n$ packages are given with measurements $(x_1, y_1, z_1), \dots , (x_n, y_n, z_n)$.
  • It is asked if the packages fit in the two trucks.
Show that this problem is NP-complete.

To show that, the reduction of the partition problem is needed, as follows.
Let $(a_1, \dots , a_n)$ be the input for PARTITION. Let $A=\sum_{i=1}^n a_i$. We construct for each number $a_i$ a package of measurement $(\frac{4}{A}a_i, 5,3)$ for the above problem. Then for a set $I\subseteq [n]$ we have that $$\sum_{i\in I}a_i=\frac{A}{2}\Leftrightarrow \sum_{i\in I}\frac{4}{A}a_i=\frac{4}{A}\cdot \frac{A}{2}=2$$
Therefore, there is the partition of $(a_1, a_2, \dots , a_n)$ into two same sets iff the packages fit in the two trucks. I haven't really understood at the reduction the part that we construct for each number $a_i$ a package of measurement $(\frac{4}{A}a_i, 5,3)$. Why do we consider this measurement? (Wondering)
 
Technology news on Phys.org
  • #2
We consider this measurement because it allows us to relate the sum of the packages' measurements with the sum of the numbers in the partition problem. Specifically, we want to show that there is a partition of the numbers in the partition problem into two sets of equal sum if and only if the packages fit into the two trucks. To do this, we need to make sure that the sum of the packages' measurements is equal to the sum of the numbers in the partition problem. So, we choose a measurement for the packages that corresponds to the sum of the numbers in the partition problem. In this case, the total floor area of the two trucks is $2\times 5=10m^2$, so we set each package's floor area to $\frac{4}{A}a_i$ to ensure that the total surface area of the packages is equal to 10 (since $\sum_{i=1}^n \frac{4}{A}a_i=10$).
 

FAQ: Reduction of the partition problem

What is the partition problem?

The partition problem is a mathematical problem that involves dividing a set of numbers into two subsets such that the sum of the numbers in each subset is equal.

Why is the partition problem important?

The partition problem has real-world applications in areas such as data compression, resource allocation, and scheduling. It also serves as a useful benchmark for evaluating the efficiency of algorithms.

What is the reduction of the partition problem?

The reduction of the partition problem is a technique used in computer science to show that a problem is at least as difficult as another known problem. In the case of the partition problem, it involves transforming an instance of the partition problem into an instance of another known NP-complete problem.

How does the reduction of the partition problem work?

The reduction of the partition problem works by transforming an instance of the partition problem into an instance of another known NP-complete problem, such as the subset sum problem or the knapsack problem. This transformation preserves the complexity of the original problem, meaning that if the transformed problem can be solved efficiently, so can the partition problem.

What is the significance of reducing the partition problem?

Reducing the partition problem to a known NP-complete problem helps us understand the complexity of the partition problem and allows us to use existing algorithms and techniques to solve it. It also provides insight into the relationship between different NP-complete problems and helps in the development of new algorithms and problem-solving techniques.

Similar threads

Replies
2
Views
1K
Replies
5
Views
2K
Replies
4
Views
3K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K
Back
Top