Why everytime the final number comes the same?

Solution 1:

The keywords here are associativity and commutativity. The operation $x \circ y = \frac{xy}{x + y}$ clearly has the property $x \circ y = y \circ x$. Less obviously, it also has the property $$(x \circ y) \circ z = x \circ (y \circ z).$$

You can verify this by computing both sides to be $\frac{xyz}{xy + yz + zx}$. Once you know this, it follows that $x \circ y$ defines a commutative semigroup (on, say, the positive reals, to ensure that the division is always well-defined), and in a commutative semigroup the expression $$x_1 \circ x_2 \circ ... \circ x_n$$

is well-defined without the need to insert parentheses (by associativity) and moreover independent of the order of the $x_i$ (by commutativity).

One slick way to see that $\circ$ is indeed associative and commutative is to write it as $$x \circ y = \frac{1}{ \frac{1}{x} + \frac{1}{y} } = f^{-1}(f(x) + f(y))$$

where $f$ (say, as a function from the positive reals to the positive reals) denotes inversion. Then the associativity and commutativity of $\circ$ follows from the associativity and commutativity of $+$, since $$x \circ y = f^{-1}(f(x) + f(y)) = f^{-1}(f(y) + f(x)) = y \circ x$$

and $$\begin{align*} (x \circ y) \circ z &=& f^{-1}(f(f^{-1}(f(x) + f(y))) + f(z)) \\\ &=& f^{-1}(f(x) + f(y) + f(z)) \\\ &=& f^{-1}(f(x) + f(f^{-1}(f(y) + f(z)))) \\\ &=& x \circ (y \circ z). \end{align*}$$

It follows by induction that $$x_1 \circ ... \circ x_n = f^{-1}(f(x_1) + ... + f(x_n)) = \frac{1}{ \frac{1}{x_1} + ... + \frac{1}{x_n} }.$$

You can think of this as saying that $\circ$ is just another name for the addition operation, but it's being encoded in a funny way by $f$ and you need to decode it by $f^{-1}$ for everything to make sense. More formally, $f$ defines an isomorphism from the positive reals under $\circ$ to the positive reals under addition.


By writing down other choices for $f$ you can write down more complicated examples of functions with the same property using transport of structure. For example, if $f(x) = \log x$, then $f^{-1}(x) = e^x$, and $$f^{-1}(f(x) + f(y)) = e^{\log x + \log y} = e^{\log x} e^{\log y} = xy$$

so $f$ defines an isomorphism from, say, positive reals under multiplication to the reals under addition (both of which define groups).

As another example, if $f(x) = x^2$, then $f^{-1}(x) = \sqrt{x}$, and $$f^{-1}(f(x) + f(y)) = \sqrt{x^2 + y^2}$$

so $f$ defines an isomorphism from, say, the non-negative reals under the operation $x \circ y = \sqrt{x^2 + y^2}$ to the non-negative reals under addition.

As a final example, let $f(x)$ be the inverse hyperbolic arctangent, so that $f^{-1}(x) = \tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}}$. Then it turns out that $$f^{-1}(f(x) + f(y)) = \frac{x + y}{1 + xy}$$

which is (in appropriate units) the velocity-addition formula in special relativity, and $f$ defines an isomorphism from the interval $(-1, 1)$ under the above operation to the reals under addition.

Solution 2:

Hint: Assuming you meant $xy\over{x+y}$, Final answer will always be of the form

$$1\over{\sum _{i=1}^{i=20}{1\over{x_i}}}$$

Solution 3:

Let us find some characteristic of the set of numbers that does not change when you group two of them the way you describe.

The formula $\frac{xy}{x+y}$ suggests the following characteristic: $$\chi(a,b,c,\ldots)=\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\ldots$$ Indeed, if we take two numbers $m$ and $n$ and group them, then $$\chi(a,b,\ldots,m,\ldots,n,\ldots)=\frac{1}{a}+\ldots+\frac{1}{m}+\ldots+\frac{1}{n}+\ldots=\frac{1}{a}+\ldots+\frac{m+n}{mn}+\ldots=\chi(a,b,\ldots,\frac{mn}{m+n},\ldots)$$

Therefore, when you group any two numbers in the set, its characteristic does not change, and what you are going to get at the end (regardless of the sequence of pairs you choose) is one number $x$ such that $$\chi(a,b,c,\ldots)=\frac{1}{a}+\frac{1}{b}+\ldots=\chi(x)=\frac{1}{x}$$