All combinations for $x_i+y_j$ in a finite sets of real numbers

96 Views Asked by At

Consider $m, n \in \mathbb{N}$ and $\{x_1, x_2, \cdots, x_n\},\{y_1, y_2, \cdots, y_m\} \subset \mathbb{R}\setminus \{0\}$.

Question. How many possible combinations we can form with elements of the form $ x_i+y_j $, for $i=1,\cdots,n$ and $j=1,\cdots, m$?

In the sense that, suppose $n=2$ and $m=3$, then we would have $$ x_1+y_1, x_1+y_2, x_1+y_3, x_2+y_1,x_2+y_2, x_2+y_3. \tag{1} $$

Intuitively, I think it's all possible combinations is $m \cdot n$. I made the operation table (for the operation $+$) for some particular cases of $m$ and $n$ and I was able to conclude $m\cdot n$ possibilities. But how to prove this for the general case?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $X:=\{x_1,\ldots,x_n\}$ and $Y:=\{y_1,\ldots,y_m\}$, the goal is to find ${\rm Card}(X+Y)$ where $X+Y:=\{x+y,(x,y)\in X\times Y\}$. First of all, $(x,y)\mapsto x+y$ is a surjection from $X\times Y$ to $X+Y$ therefore ${\rm Card}(X+Y)\leqslant{\rm Card}(X\times Y)=nm$. On the other hand, suppose without loss of generality that $x_1<\ldots<x_n$ and $y_1<\ldots<y_m$, then $x_1+y_1<\ldots<x_n+y_1<x_n+y_2<\ldots<x_n+y_m$ and each of these elements are in $X+Y$, therfore ${\rm Card}(X+Y)\geqslant n+m-1$. To summarize, $$ n+m-1\leqslant{\rm Card}(X+Y)\leqslant nm $$ These bounds are optimal because when $X=\{1,\ldots,n\}$ and $Y=\{n,2n,\ldots,mn\}$, the map $(x,y)\mapsto x+y$ is one to one because if $x+y=x'+y'$, then $x-x'=y'-y$ where $|x-x'|\leqslant n-1$ and $|y-y'|\geqslant n$ if $x\neq x'$ and $y\neq y'$, therefore $x=x'$ or $y=y'$, which implies $x=x'$ and $y=y'$ thus ${\rm Card}(X+Y)=mn$. On the other hand, if $X=\{x_0,x_0+r,\ldots,x_0+(n-1)r\}$ and $Y=\{y_0,y_0+r,\ldots,y_0+(m-1)r\}$ then $X+Y=\{x_0+y_0+(i+j)r,0\leqslant i\leqslant n-1,0\leqslant j\leqslant m-1\}$. Since $\{i+j,0\leqslant i\leqslant n-1,0\leqslant j\leqslant m-1\}=\{0,\ldots,m+n-2\}$, we have ${\rm Card}(X+Y)=m+n-1$.