
How do you find integer solutions to x/(y + z) + y/(x + z) + z/(x + y) = 4? - jordigh
https://www.quora.com/How-do-you-find-the-integer-solutions-to-frac-x-y+z-+-frac-y-z+x-+-frac-z-x+y-4/answer/Alon-Amit?share=1
======
mrkgnao
For anyone looking to learn more about elliptic curves, which are astoundingly
"well-connected" as math topics go, here's a good book that should be
accessible to anyone with some calculus under their belt:

[https://www.amazon.com/Elliptic-Tales-Curves-Counting-
Number...](https://www.amazon.com/Elliptic-Tales-Curves-Counting-
Number/dp/0691151199)

It's not a textbook, which is both good and bad. In my case, it did a good job
whetting my appetite for more!

A really well-written and not-extremely-difficult undergrad textbook on
elliptic curves:

[https://www.amazon.com/Rational-Points-Elliptic-
Undergraduat...](https://www.amazon.com/Rational-Points-Elliptic-
Undergraduate-Mathematics/dp/331918587X)

(Non-affiliate links, just so you know.)

~~~
onuralp
These look fascinating, thanks.

I tried to crack this problem, and ended up (very naively) resorting to
substituting division with modulo operation that is, a%(b+c) + b%(a+c) +
c%(a+b) = 4 of which the min solution is a=1, b=2, and c=4. I am glad that the
true solution involved EC which, if my understanding is correct, is basically
modular operations in high-dimensional space.

~~~
mrkgnao
Elliptic curves are "generalized modular arithmetic" only in the sense that
they involve a different kind of addition law (the set of points on a nice EC
is a _group_ ).

Also, you can look at the points on an elliptic curve where you allow the
coordinates to be real, complex, rational, or even the integers mod _p_ (any
_field_ will do), so the last choice gives you a closer link with modular
arithmetic. It's best to treat ECs as their own weird, wonderful beasts!

------
rsj_hn
This is a great article. Little puzzles like these are often the gateways to
enormous mathematical journeys. Here, I only wished the journey was more
detailed -- you could motivate all of these operations -- but that would take
many pages.

~~~
pmiller2
I admit, I had low expectations with it being on Quora. I was far from
disappointed, though.

~~~
vecter
Really? The math content on Quora is generally top notch. It depends on who
answers the question of course, but there are many high quality writers on
Quora with deep understandings of mathematics.

~~~
vbezhenar
How does Quora works? I regularly see very interesting answers there. While it
looks like SO clone, its content is different. Do they pay for good answers?
Or they just happen to have bright people in their community?

~~~
vecter
The difference seems to be in the culture of the community, which they've done
a good job of cultivating from day 1.

Quality is valued, and so are expert opinions. I doubt they pay anybody.

------
AbacusAvenger
The Wolfram Alpha results for this one are pretty intimidating:

[http://www.wolframalpha.com/input/?i=(a%2F(b%2Bc))%2B(b%2F(a...](http://www.wolframalpha.com/input/?i=\(a%2F\(b%2Bc\)\)%2B\(b%2F\(a%2Bc\)\)%2B\(c%2F\(a%2Bb\)\)%3D4)

~~~
tagrun
You can ask for integer solutions in Mathematica with

> Solve[x/(y + z) + y/(z + x) + z/(x + y) == 4, {x, y, z}, Integers]

but it gives a very long output in terms of Root[]s and conditional
expressions.

~~~
arikrak
I initially tried that on WolframAlpha but it doesn't understand Mathematica
syntax. But one can enter it on
[https://lab.wolframcloud.com](https://lab.wolframcloud.com) after creating an
account.

~~~
meshr
Thanks. At least I could check the solution there and it is correct.

------
drfuchs
In the title, read "and" as "plus". (For a while I thought they meant "logical
AND", given the HN context.)

~~~
jordigh
Yeah, I wrote "+" but HN turned it to "and".

~~~
comex
Just for fun, what if it _is_ read as AND: that is, bitwise AND?

x/(y&z) & y/(x&z) & z/(x&y) = 4.

If the / becomes integer (flooring) division, there are many solutions, such
as (6, 13, 19).

But if the division results are required to actually be integers, there are no
small solutions - at least, none where x, y, and z <= 10000 (checked by brute
force with minor optimization). I suspect that unlike the original problem,
there are actually no solutions, but it’s just a guess. Anyone want to come up
with a proof? :)

~~~
jwilk
Let's consider the lexicographically smallest triplet (x, y, z) such that:

x/(y&z) & y/(x&z) & z/(x&y) is even

That means that x/(y&z) is even, or y/(x&z) is even, or z/(x&y) is even.

If x/(y&z) is even, then x is even too, so x&z is even, so y is even
(otherwise y/(x&z) wouldn't be integer).

Similarly, we can conclude that all x, y, z are even.

But if we substitute x=x/2, y=y/2, z=z/2, the value of x/(y&z) & y/(x&z) &
z/(x&y) doesn't change.

So the (x, y, z) triplet we considered wasn't the smallest. Contradiction.

~~~
comex
Makes sense. Nice proof :)

------
jfaat
> Next up: what is the degree of our equation? The degree is the highest power
> of any term showing up. For example, if you have (a^2)b(c^4), that’s a term
> of degree 7 = 2 + 1 + 4

I thought that equation was degree 4, which aligns with what the author says
later on. Am I missing something? It seems odd that he would write out that
equation accidentally, maybe just crossed wires though. I'm sure we've all
been there.

~~~
gizmo686
The wording in that paragraph is a bit confusing. In this context, "term"
refers to the entire product, For example, the equation "(a^2)b + (b)c^4 = 0"
has two terms: (a^2)b, and (b)c^4.

The degree of the entire equation is the maximum of the degree of the
individual terms. However, the degree of a term is the sum of the degree of
all of the factors.

For example, the equation "a+b+c=10" is degree 1, but "abc=10" is degree 3.

~~~
jfaat
Ah ok so he was talking about the degree of the equation but gave an example
of calculating the degree of a term, the highest of which in any equation is
its degree. That makes sense, thanks for clearing it up!

------
bmc7505
What are some other problems that appear deceptively simple, but are extremely
difficult to solve?

~~~
tzs
Let n be a positive integer.

Let s(n) be the sum of all positive divisors of n. E.g., s(2) = 1 + 2, s(4) =
1 + 2 + 4, s(20) = 1 + 2 + 4 + 5 + 10 + 20.

Let H(n) = 1 + 1/2 + 1/3 + 1/4 + ... + 1/n.

Question: is it true that s(n) < H(n) + log(H(n)) exp(H(n)) for all n > 1?

(log is natural logarithm)

It turns out that this simple looking problem is equivalent to the Riemann
Hypothesis, which is perhaps the most important unsolved problem in pure
mathematics. Many of the best minds in mathematics have attempted it in the
approximately 160 years since Riemann posed it.

What equivalent means in this context is that if the Riemann Hypothesis is
true, than the inequality above is also true, and if the inequality above is
true, then the Riemann hypothesis is true.

~~~
bmc7505
Maybe just me, but that problem does not look very simple at all. One reason
OP's problem is appealing, is because the solution can be easily checked. The
solution is a kind of "proof of work". You could never guess the solution
without a deep understanding of the problem. But once found, the solution is
immediately verifiable.

For many problems one can easily guess the solution, without necessarily
knowing the proof (like Fermat did). The answer is almost certainly negative,
and a complete solution requires a very long and tedious proof that cannot be
checked without a deep understanding of the field and many years of collective
effort.

I am specifically interested in problems which can be understood by a child,
have hard solutions which cannot be easily guessed, but are easily verified
(ex. factoring the product of two large primes). It seems like these problems
would make good candidates for one-way-functions, like the diophantine
equations and ECC. But elliptic curve cryptology is too difficult to describe
to a child.

~~~
AstralStorm
Quite easy to explain given a few graphs. The explanation boils down on how
hard is to accurately draw a curve of such an elliptic function at big x (P3)
and then figure out which two other points intersect with a given line near.
You can even show it on a big whiteboard.

You can even show how easy out would be for a simple curve where the left part
is an easy equation.

The hard part is what makes an equation easy to solve. (And how some elliptic
are broken.) It takes at least some high school math to hint at this.

------
DrTung
Agree, good article. Thanks to it I think I understand more why cryptography
based on elliptic curves (like Curve25519) is considered pretty safe for now.

------
chegra
x = 702

y = -390

z = 858

[
[http://www.wolframalpha.com/input/?i=(702%2F(-390%2B858))%2B...](http://www.wolframalpha.com/input/?i=\(702%2F\(-390%2B858\)\)%2B\(-390%2F\(702%2B858\)\)%2B\(858%2F\(702%2B-390\)))
]

Found the above solution using a hillclimbing algorithm.

[http://codepad.org/PixRUl0N](http://codepad.org/PixRUl0N)

~~~
Ended
The question asks for positive solutions, which turns out to be a bit harder!

~~~
chegra
Sorry...I was only going off of the title of the thread.

------
tim333
A bit tangential but I wonder if something like that could relate to the
slightly odd collection of fundamental particles we find in physics. They have
properties that have to come out integral like spin x 2 and charge x 3 and
have odd values like muons and tao particle being basically electrons but
approx 200 and 3500 times heavier.

------
Houshalter
I wonder if a SAT solver would be able to solve this faster than brute force.

~~~
ekiwi
Yes. You can try the following smt2 script with yices2 [0]:

    
    
      (set-logic QF_UFNIA)
      (declare-fun x () Int)
      (declare-fun y () Int)
      (declare-fun z () Int)
      (define-fun left-side () Int
      (+ (+
        (* (* x (+ x z)) (+ x y))
        (* (* y (+ y z)) (+ x y)))
        (* (* z (+ y z)) (+ x z)))
      )
      (define-fun right-side () Int
      (* (* (*
        4
        (+ y z))
        (+ x z))
        (+ x y))
      )
      ; disallow division by zero
      (assert (not (= 0 (+ y z))))
      (assert (not (= 0 (+ x z))))
      (assert (not (= 0 (+ x y))))
      (assert (= left-side right-side))
      (check-sat)
      (get-model)
    

Run this by calling _yices-smt2_ on it.

[0]: [http://yices.csl.sri.com/](http://yices.csl.sri.com/)

~~~
gizmo686
You need to add:

    
    
        (assert (> z 0)) 
        (assert (> x 0)) 
        (assert (> y 0))
    

or it will give you negative solutions.

I am running this on my machine now. Will report back if it comes up with a
solution.

~~~
jfoutz
Anything is possible, but I really doubt you'll find those 80 digit numbers.
Maybe the sat solver includes some serious number theory though. I doubt it.

------
theophrastus
using the rearranged form:

    
    
        ((x + (((2*y*z) + (y*y) + (z*z) + (((z*z*z) - (z*y*y))/(x + y)))/(x + z)))/(y + z))
    

I find by brute force (no pride!) the first solution triplet: 35, 132, 627

Edit: of course, this is _not_ a solution. It's now just an example to others
to beware of floating point errors.

~~~
hawkice
That doesn't equal 4 it equals 4.00000009534. So, there is a precision issue,
probably using floats to keep division results.

~~~
vacri
I once saw a youtube video which said that an object moving at 4m/s would be
slowed down by [thing] by 0.00006m/s, so its new velocity would be 3.99994m/s

... except that no, its new velocity would be 4m/s. The author, a physicist,
ignored sig figs. 4 - 0.00006 = 4, when you're dealing with measurements :)

~~~
ouid
sig figs are just an informal way of dealing with uncertainty that can be
applied procedurally by high school students.

~~~
vacri
It's not about uncertainty, it's about precision. Unless, of course, you think
that scientific notation is limited to only high schools.

~~~
ouid
What do you think the difference between precision and uncertainty is?

~~~
vacri
'Uncertainty' is a much more ambiguous term that means many more things than
'imprecision of measurement'.

Still, I'm interested to hear why you think sig figs are high-school only when
they're the standard way of writing in scientific notation. Do you genuinely
think that the example I gave from the video is reasonable? It sounds like
you're a theorist and have no experience in real-world application.

------
ramshanker
Now eagerly waiting for Letsencrypt to make Elliptic curve as default. Respect
to the author of the article.

------
raybb
If you count zero as a positive number then one solution is:

0, 109552575, 29354524 :)

