Sagot :
Answer:
Let's say that I am being given a sequence of positive integers. We are given the min and max of this sequence. I randomly delete two numbers. How do I find them.
What we could do is create two equations from two observations: for a given sequence, we know the sum and product of all numbers. Subtracting the sum and product of the sequence from known sum and product will yield two equations of the form:
x∗y=constantx∗y=constant
and
x+y=constantx+y=constant
Now, let's think about constraints.
1) x is a positive integer
2) y is a positive integer
3)
x≠yx≠y
because the two deleted numbers cannot be the same numbers.
Thus, I am trying to find the solution for
x∗y=x+yx∗y=x+y
with a constraint that
x≠yx≠y
Simplifying above equation, we get
1/x+1/y=11/x+1/y=1
Now, one obvious solution is
x=y=2x=y=2
. However, we know that
x≠yx≠y
.
Hence, the big issue at hand is to solve above equation i.e.
1/x+1/y=11/x+1/y=1
where x and y are positive integers and x!=y.
I tried using Desmos, but it wouldn't allow me to enter constraints properly. I'd appreciate any help. My hypothesis is that above equation has no solution.
Clarification: the numbers have to be greater than 0. i.e.
x>0x>0
y>0y>0
Example: Let's say we have ten numbers: 1 through 10. I randomly delete, say, 4 and 6. The objective is to find these two numbers.
We know that the sum of 1...10 should be 55, and the product of all numbers should be 3628800.
Now, the sum and product of numbers without 4 and 6 is: 45 and 151200. So, we know that missing numbers' sum = 10 and product = 24. These are positive integers > 0. So, the values are 4 and 6.
Step-by-step explanation:
You are trying to solve
xy=ax+y=bxy=ax+y=b
given a,ba,b in the positive integers, not 1x+1y=11x+1y=1 You get a,ba,b from the sum and product as you say. Because of the symmetry we can insist y≥xy≥x and you specify x≠yx≠y. You can proceed by substitution.
x=b−yy(b−y)=ay2−by+a=0y=12(b+b2−4a−−−−−−√)x=12(b−b2−4a−−−−−−√)x=b−yy(b−y)=ay2−by+a=0y=12(b+b2−4a)x=12(b−b2−4a)
where your condition