I'm trying to show how to reduce the Partition problem to the 3-Partition problem.
I'll first describe the problem using the definitions and notations I'm familiar with (I hope they're legit), and will then ask my question.
So, the Partition problem is as follow:
Given a multiset of integers $X$, we have to decide whether or not $X$ can be partitioned into two sub-sets $A,B$ such that $\sum_{x_i\in A}x_i=\sum_{x_i\in B}x_i$.
In the 3-Partition problem, given a multiset of integers $Y$, we have to decide whether or not $Y$ can be partitioned into three sub-sets $A,B,C$ such that $\sum_{x_i\in A}x_i=\sum_{x_i\in B}x_i=\sum_{x_i\in C}x_i$.
I want to show a reduction $Partition\leq _p 3Partition$,
That is, to show that given $X$ as input for the Partition problem, I can build $Y$ as input for the 3-Partition problem, s.t. $X$ can be partitioned to two iff $Y$ can be partitioned to three.
So given $X$, let $\sum_{x_i\in X}x_i=m$, and define $Y$ as:
$Y=\left \{ x_1, x_2,...,x_n,\frac{m}{2}|x_i\in X \right \}$.
Proof:
The first direction is easy: suppose that $X$ can be partitioned to two sub-sets $A,B$ s.t. the above conditions hold, then $Y$ can be partitioned to three: $A,B,C$, while $C=\left \{\frac{m}{2} \right \}$.
I'm stuck with the second direction: suppose that $Y$ can be partitioned to three, why does that guarantee that $X$ can be partitioned to two?
b.t.w, how can I be sure that $\frac{m}{2}$ is an integer? do I even have to pay attention to it?