- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
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:
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)
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.
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)