Can we prove that $\sum_{i=1}^k x_i$ and $\prod_{i=1}^k x_i$ is unique for $x_i \in R > 0$?
I stated that conjecture to solve CS task, but I do not know how to prove it (or stop using it if it is false assumption).
Is the pair of Sum and Product of array of k real numbers > 0 unique per array? I do not want to find underlying numbers, or reverse this pair into factorisation. I just assumed that pair is unique per given set to compare two arrays of equal length to determine whether numbers inside with possible multiplicities are the same. The order in array does not matter. 0 is discarded to give meaningful sum and product.
At the input I get two arrays of equal length, one of which is sorted, and I want to determine if the elements with multiplicities are the same, but I do not want to sort the second array (this will take more than linear time, which is the objective).
So I thought to make checksums, sum and product seemed unique to me, hence the question.
For example:
I have two arrays: v=[1,3,5,5,8,9.6] and the second g=[9.6,5,3,1,5,8].
I calculate sum = 31.6, and product = 5760. For both arrays, since one is sorted version of another.
And now I calculate this for b=[1,4,4,5,8,9.6], sum is 31.6 but product is 6144.
So I assumed that if both sum and product are not the same for two given arrays, than the element differs.
Getting back to question, I am thinking that the pair {sum, product} is the same for all permutations of array (which is desired), but will change when elements are different (which is maybe wishfull thinking).
This is true when $k=1$ or $k=2$.
It is also true when $k>2$. But only if the sum is $A$ and the product is $(\frac{A}{k})^k$ (which, by AM-GM is the maximum possible product with fixed sum $A$).
To see why it isn't true in any other case:
Consider the family of tuples:
$(\frac{a-n}{k-1},\frac{a-n}{k-1}\dots ,\frac{a-n}{k-1},n)$ their sum is clearly $A$. moreover, when $n=0$ the product is $0$ and when $n$ is $\frac{a}{k}$ the product is $(\frac{a}{k})^k$. So by continuity we can find a tuple with product $x$ for $x\in(0,(\frac{a}{k})^k)$.
Now consider the family of tuples:
$(\frac{a-2n}{k-2},\frac{a-2n}{k-2}\dots ,\frac{a-2n}{k-2},n,n)$ their sum is clearly $A$. moreover, when $n=0$ the product is $0$ and when $n$ is $\frac{a}{k}$ the product is $(\frac{a}{k})^k$. So by continuity we can find a tuple with product $x$ for $x\in(0,(\frac{a}{k})^k)$.
So for every product and sum we can find at least two distinct tuples (one from each family).