how to divide set of n objects to 3 subsets in order to find the maximum of set's cardinality multiplication Let's say I have a set of 'n' objects and I have to split these object to 3 subsets, (let's call them s1,s2,s3 ) in such way that the multiplication of :
 |s1|*|s3|+ |s2|*|s3|+|s2|*|s1| will be the maximum. 
if I had only one parameter I maybe could use derivative to find the maximum , but with these 3 parameters i'm pretty lost.
appreciate your help very much !
 A: For easier reading, denote $|S_1|, |S_2|, |S_3|$ by $x,y,z$ instead.  Your objective function  $f(x,y,z) = xy + yz + zx$ and you want to maximize $f$ subject to $x+y+z = n$.  Your $f$ is called an elementary symmetric polynomial and a lot is known about them.
https://en.wikipedia.org/wiki/Elementary_symmetric_polynomial
For your specific purpose of maximizing $f$, that happens when $x,y,z$ split $n$ as evenly as possible, i.e. the difference between any two variables is $0$ or $1$, i.e., each variable $=\lfloor n/3 \rfloor$ or $\lceil n/3 \rceil$.
Here is a simple proof.  Consider a fixed $x$, then $f = x(y+z) + yz = x(n-x) + yz$ and it is easy to show that, when constrained by the choice of $x$, $f$ is maximized when $y, z$ split $(n-x)$ as evenly as possible.  Obviously, this is true for any pair of variables.  Therefore, any triplet $(x,y,z)$ where some pair of variables differ by $2$ or more cannot be a maximizing triplet.
A: Observe that $|s1|*|s3|+ |s2|*|s3|+|s2|*|s1|=\frac{n^2-|s_1|^2-|s_2|^2-|s_3|^2}{2}$, so what you really need to do is minimize this square-sum. From the Cauchy-Schwarz inequality we obtain $(|s_1|^2+|s_2|^2+|s_3|^2)(1+1+1)\geq(|s_1|+|s_2|+|s_3|)^2$, so $|s_1|^2+|s_2|^2+|s_3|^2\geq n^2/3$, which is obtained for $s_1=s_2=s_3=n/3$. Then taking your sets with cardinalities as close to each other as possible does the trick. 
