13

Are two sequences $(x_i)_{i=1,\ldots,n}$ and $(y_i)_{i=1,\ldots,n}$ equal if $\sum_{i=1}^nx_i=\sum_{i=1}^ny_i$ and $\sum_{i=1}^nx_i^2=\sum_{i=1}^ny_i^2$?

  • 11
    Consider two random variables $X$ and $Y$ that take on values $x_1, x_2, \ldots, x_n$ and $y_1, y_2, \ldots, y_n$ respectively with equal probabilities $1/n$. Then, your question effectively asks whether $E[X]=E[Y]$ and var$(X) = $ var$(Y)$ suffices to guarantee that the two random variables have the same distribution. Ponder whether such a result is plausible... – Dilip Sarwate Oct 25 '16 at 21:23
  • 1
    It's a simple matter to construct data sets (i.e. multisets) for which the first $k$ moments are the same but which data sets are not identical, for any $k$ (though admittedly it gets tedious for large $k$; I have constructed cases up to the ninth moment before, for example, and if I had reason to, could progress further). A number of questions on site deal with the related problem of whether all moments - an infinite sequence - are sufficient to characterize a distribution. The answer turns out to be "not in general" ... ctd – Glen_b Oct 25 '16 at 22:05
  • ctd ... and specific counterexamples are known (and some are described on site). The basic test is "does the MGF exist in a neighborhood of 0?" -- if it does then the moment sequence identifies the distribution, but if it doesn't then you may have more than one distribution with the same moment sequence. – Glen_b Oct 25 '16 at 22:05
  • 7
    I'm a bit puzzled why this has so many upvotes? – Matthew Gunn Oct 25 '16 at 22:27
  • 1
    Did you even consider what happens if you permute the terms in a sequence? – Marc van Leeuwen Oct 26 '16 at 11:30

5 Answers5

28

No.

$$ x = (1,1,1,-3) $$ $$ y = (-1,-1,-1,3) $$

$$\sum x_i = \sum y_i = 0$$ $$ \sum x_i^2 = \sum y_i^2 =12$$

  • Both are multisets, not sets. – Rodrigo de Azevedo Oct 25 '16 at 15:14
  • 3
    @RodrigodeAzevedo: the OP's notation suggested to me that he is interested in vectors or sequences, not sets as such. – Stephan Kolassa Oct 25 '16 at 15:15
  • 7
    Here is the counterexample for sets: $X={1,2,3,-4}$ and $Y={-1,2,-3,4}$. – Stephan Kolassa Oct 25 '16 at 15:17
  • @StephanKolassas Yes, you are right. Sorry for the clunky notation. Im changing it to sequences. –  Oct 25 '16 at 15:21
  • 2
    @StephanKolassa: a set example closer to you original might be ${1,2,-3}$ and ${-1,-2,3}$ – Henry Oct 25 '16 at 17:31
  • "the OP's notation suggested to me that he is interested": our gender biases are showing. – Greg Martin Oct 26 '16 at 15:56
  • @GregMartin: I'm a Bayesian. 90% of people I have dealt with in person in math/stats were male. Unless someone has a decidedly female nick, I'll go with my priors. – Stephan Kolassa Oct 26 '16 at 18:39
  • @Henry: Take any sequence that adds up to zero, where positive and negative numbers don't occur in pairs. (a, b, -a-b) and (-a, -b, a+b). – gnasher729 Oct 26 '16 at 18:47
  • 1
    @StephanKolassa: First of all, I'll bet any amount of money you want that your 90% figure is too high. Already that is your implicit bias showing. Second, there is no need whatsoever to select a gender at all. Third, the environment in STEM is unwelcoming to women, and your "algorithm" makes that worse, and that's harmful. That should matter to you, much more than "yay I guess right a lot". – Greg Martin Oct 26 '16 at 18:53
20

No! You need $n$ polynomial equations.

If I remember correctly, given a set of $n$ distinct real numbers $\mathcal Y :=\{y_1, y_2, \dots, y_n\}$, the following system of $n$ polynomial equations

$$\begin{array}{rl} x_1 + x_2 + \dots + x_n &= c_1\\ x_1^2 + x_2^2 + \dots + x_n^2 &= c_2\\ \vdots \\ x_1^n + x_2^n + \dots + x_n^n &= c_n\end{array}$$

where

$$c_k := y_1^k + y_2^k + \dots + y_n^k$$

has $n!$ solutions, namely, all $n!$ permutations of the $n$ distinct elements of $\mathcal Y$. One can use algebraic geometry to prove this. I vaguely recall this being related to moment problems.


Example

Let $\mathcal Y := \{1,3,6\}$. Intersecting the plane with the sphere,

$$\begin{array}{rl} x_1 + x_2 + x_3 &= 10\\ x_1^2 + x_2^2 + x_3^2 &= 46\end{array}$$

we obtain a circle on the plane, as depicted below

enter image description here

However, intersecting these two with the cubic surface,

$$\begin{array}{rl} x_1 + x_2 + x_3 &= 10\\ x_1^2 + x_2^2 + x_3^2 &= 46\\ x_1^3 + x_2^3 + x_3^3 &= 244\end{array}$$

we obtain the $3!=6$ permutations of the elements of $\mathcal Y$, which are colored in red

enter image description here

If we plot the quadratic and the cubic surfaces, but not the plane,

enter image description here

and, from another point of view, we have what looks like a stylish hat

enter image description here

enter image description here

11

To consider an even more basic counterexample. What happens if you simply reorder your sequence? Take $x = (0,1)$ and $y = (1,0)$. (I assume you're talking about sequences, so above $x \neq y$; of course, as sets, $\{0,1\} = \{1,0\}$.)

Sam OT
  • 6,675
3

There are many examples. Here's the first in a long sequence: $$ (1,4,6,7) \quad (2,3,5,8). $$ This comes from the first eight entries in the Thue Morse sequence (third line below). The fourth line specifies two sets of eight numbers with the same sum, sum of squares and sum of cubes.

AB 
AB BA 
ABBA BAAB  
ABBABAAB BAABABBA
...

The Prouhet-Tarry-Escott problem and generalized Thue-Morse sequences. J. Comb. 7 (2016), no. 1, 117--133, [Bolker, Ethan D. and Offner, Carl and Richman, Robert and Zara, Catalin]

Here's the preprint: https://arxiv.org/abs/1304.6756

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
2

Something interesting. On all $3 \times 3$ magic squares, the sums of the top and bottom rows is the same (of course) but, also, the sums of the squares of the top and bottom rows is the same. For example

\begin{array}{|c|c|c|} \hline 8 & 3 & 4 \\ \hline 1 & 5 & 9 \\ \hline 6 & 7 & 2 \\ \hline \end{array}

$8 + 3 + 4 = 6 + 7 + 2 = 15$

$8^2 + 3^2 + 4^2 = 6^2 + 7^2 + 2^2 = 89$

Also

$8 + 1 + 6 = 4 + 9 + 2 = 15$

$8^2 + 1^2 + 6^2 = 4^2 + 9^2 + 2^2 = 101$

This seems to work for some families of larger order magic squares, but I haven't been able to prove it.