The Emoji Problem: Part I

by greenturtle3141, Jan 19, 2022, 1:40 AM

Reading Difficulty: 2-3/5
Prerequisites: Basic polynomial theory, e.g. Vieta's Formulas, should be enough

In the event that the culture of today is lost to time, I will give some context surrounding why this problem is worth looking at.

The internet has been plagued with "emoji math problems" that look something like this:

https://engineeringdiscoveries.com/wp-content/uploads/2019/03/Untitled-2nmmmmmmmmmmmmm.jpg

They're more or less constructed so that it's easy to mess up (look carefully at the bananas), so that people get different answers sparking arguments and discussion and viralness etc. etc...

Naturally, actual math people are sick of this. In early 2017, a reddit thread titled "I'm really sick of all the facebook fruit math bull that's going on lately. Does anyone want to create a truly difficult math problem with pictures of fruit to counter this?" appeared on r/math. One user there created this:

https://i.imgur.com/IVOs9IP.png

This isn't too hard. Some patience or a brute force search can easily solve this in integers. But here's where the fun begins.

A guy by the name of Sridhar Ramesh saw the above image, and decided to make a small tweak before popularizing it.

https://i.redd.it/p92108lekoq11.jpg

And just like that, the problem became notoriously difficult. The smallest solution is more than $80$ digits long. This meme is described as a " clever... wicked, joke" by Dr. Alon Amit, and is widely believed to require a "massive level of knowledge about elliptic curves".

But since when did that stop us? In this post, we will solve this problem. Or rather, I'll described how I finally solved it. Buckle your seatbelts.


A Warmup

Let's first tackle an easier problem.

Problem: Find all Pythagorean triples.

Solution. We are trying to solve the Diophantine equation $x^2+y^2=z^2$ in non-negative integers. Except this kinda sucks. We're going to be much happier trying to instead solve
$$x_1^2+y_1^2 = 1$$where $x_1$ and $y_1$ are non-negative rationals. This is basically the same problem because solving $x^2+y^2=z^2$ is the same as solving $\left(\frac{x}{z}\right)^2+\left(\frac{y}{z}\right)^2=1$, so we're essentially letting $x_1=x/z$ and $y_1=y/z$. Caveats

The reason why we're much happier about this is because the problem is now "find all rational points on the unit circle", where a rational point is just a point with rational coordinates. Is this really any easier?

Here's the trick that blows up this problem.
  1. Start by finding some point $P = (x_1,y_1)$ that works. I'll take $(0,1)$.
  2. Draw any line with rational slope going through $P$. Something like, $y = \frac{m}{n}x+1$, where $m/n$ is rational.
    [asy]
unitsize(2cm);
draw(circle((0,0),1));
pair A,B;
A = (0,1);
B = (24/25,7/25);
draw(B+7/4*(A-B)--A+(7/4)*(B-A),arrow=Arrows,p=red);
dot("$(0,1)$",A,NE);
dot(B);
draw((-2,0)--(2,0),arrow=Arrows);
draw((0,-2)--(0,2),arrow=Arrows);
[/asy]
  3. This will (pretty much) always intersect the circle at a second point, $Q$.
  4. Then $Q$ will always be another rational point!

Why is this true? To find the coordinates of this second point, we are solving the system of equations $x_1^2+y_1^2 = 1$ and $y_1 = \frac{m}{n}x_1 + 1$. We already know one solution though: $(x_1,y_1) = (0,1)$. So when we eliminate $y_1$ to get the quadratic
$$x_1^2+\left(\frac{m}{n}x_1+1\right)^2=1, \qquad (*)$$we may reason as follows:
  • The coefficients of the quadratic are rational.
  • Therefore, by Vieta, the sum of the roots are rational.
  • We know that one root is rational, since we drew the line through a rational point. Therefore, the other root must be rational.
  • If $x_1$ is rational, then $\frac{m}{n}x_1 + 1$ is rational, hence $y_1$ is rational.
  • Therefore, the second point of intersection of this line with the circle is a rational point.

We conclude that drawing any line of rational slope through $P$ will give us another rational point on the circle. But it's even better than that. Note that if $(x_1',y_1')$ is another rational point, then the line connecting $P$ and $(x_1',y_1')$ must have rational slope. So, if we draw every line of rational point through $P$, we hit EVERY possible rational point on the circle.

Let's find that second point for all possible slopes $m/n$! Expanding out equation $(*)$, we get:
$$\frac{m^2+n^2}{n^2}x_1^2 + \frac{2m}{n}x_1 = 0$$We already know $x_1 = 0$ was a root, so the $x_1$-coordinate we're looking for is the other root, given by $x_1 = \frac{-2mn}{m^2+n^2}$. The corresponding value for $y_1$ is $\frac{n^2-m^2}{m^2+n^2}$. Clearing denominators and cleaning up signs, we see that ALL Pythagorean triples may be characterized as
$$(x,y,z) = \left(2mn,n^2-m^2,n^2+m^2\right)$$for positive integers $m,n$, up to some integer multiple. This is a very nice fact in Olympiad number theory that you may have heard before.

The important takeaway is that "drawing lines can get you more points". Here, we just drew one line through a point to get another point. Although this won't quite work for the original problem, the idea is very similar. Let's do it!

Getting Started

So we're starting with the following equation:
$$\frac{x}{y+z}+\frac{y}{x+z}+\frac{z}{x+y}=4$$Clearing denominators, this eventually becomes this:
$$x^3+y^3+z^3 = 3(x^2(y+z)+y^2(x+z)+z^2(x+y)) + 8xyz$$Instead of trying to solve this in positive integers, we're going to write this in terms of $x_1$ and $y_1$ and try and find rational points, positive or negative. Hopefully, this will make things easier.

Dividing the equation by $z^3$, this becomes:
$$(x/z)^3+(y/z)^3+1 = 3((x/z)^2(y/z+1)+(y/z)^2(x/z+1)+x/z+y/z) + 8(x/z)(y/z)$$$$x_1^3+y_1^3+1 = 3(x_1^2(y_1+1)+y_1^2(x_1+1)+x_1+y_1) + 8x_1y_1$$If we graph this equation, it looks like this:
https://i.imgur.com/bzCVSqs.png
You might notice that this is "tilted $45^\circ$". This makes sense because switching $x_1$ and $y_1$ should not change anything in the above equation.

For my own convenience (this step isn't strictly necessary, but it's what I did), I decided to rotate this graph so that it was symmetrical across the $x$ axis. I did this by substituting $x_2-y_2 = x_1$ and $x_2+y_2=y_1$. Now it's an equation involving new rational variables $x_2$ and $y_2$, and the equation became:
$$1 - 6 x_2 - 11 x_2^2 - 4 x_2^3 - y_2^2 + 12 x_2y_2^2 = 0$$This is a lot nicer. The graph looks like this now:
https://i.imgur.com/NDn5txV.png
Nice and symmetrical! We call this curve an elliptic curve.

Just by looking at the graph, there are some pretty easy rational points that we can spot: $(0,1)$, $(-1,0)$, and $(0,-1)$, which I will call $P$, $3P$, and $5P$. (There is a reason for the weird labels, I'll talk about it in Part 2.)

https://i.imgur.com/jZdIjMb.png

Unfortunately, finding these points does not at all mean we are done. These points correspond to invalid solutions to the original problem. However, can we use these "easy points" to find even more points?

The Return of the Line Trick

This process will let us obtain more points.
  1. Start with two rational points $P$ and $Q$ that lie on the elliptic curve.
  2. Draw the line $\overline{PQ}$. Note that this has rational slope because $P$ and $Q$ are rational points.
  3. $\overline{PQ}$ will always intersect the elliptic curve a third time (including multiplicity), at a point $R$.
  4. Moreover, $R$ will always be another rational point!

There are some things to explain here: Why must the line intersect a third time, and why must the third intersection be a rational point? We reason as follows, analogously to the warm-up:
  • The third point $R=(x_2,y_2)$ satisfies the system of equations
    $$\begin{cases}1 - 6 x_2 - 11 x_2^2 - 4 x_2^3 - y_2^2 + 12 x_2y_2^2 = 0 \\ ax_2+by_2=1\end{cases},$$where $ax_2+by_2=1$ is the equation of the line passing through the points $P$ and $Q$.
  • If we solve for $y_2$ in the second equation, and substitute it into the first equation to eliminate the variable, then we are left with a cubic equation in $x_2$.
  • This cubic has rational coefficients. This is because the coefficients $a$ and $b$ have to be rational, since the line has rational slope and passes through rational points.
  • Therefore, by Vieta, the sum of the roots of the cubic is a rational number.
  • But two of the roots are given by the $x_2$-coordinates of $P$ and $Q$, both of which are rational.
  • Therefore, the third root is rational. This means that the $x_2$ coordinate of $R$ is rational.
  • Using $ax_2+by_2=0$, we conclude that the $y_2$ coordinate is rational as well. Thus $R$ is a rational point.

Cool! An important remark: Intersections are counted including multiplicity. It's possible, for example, to take $P$ and $Q$ to be the same point. Then the "line" is actually the tangent to the curve at $P$, and this still works. Be sure to understand why!

Anyways, we now know that if we connect two rational points on the elliptic curve, then we can get another rational point on the curve. Let's try it out.

By connecting $(0,1)$ and $(-1,0)$, with a line, we find that there is a third intersection at $(-1/2,1/2)$.

https://i.imgur.com/5KrB52C.png

And indeed, if we plug it in, it works! What else can we get?

By "connecting $(0,1)$ and $(0,1)$ with a line", or taking the tangent line to $(0,1)$, we can find yet another third intersection with the curve.

https://i.imgur.com/BMn9h0j.png

This time it's at $(-1/2,-1/2)$. That's pretty lame: We could've figured that out by taking the previous point we got and flipping it over the $x$-axis. Is there anything else we can get easily?

The answer is no. This is because these $5$ points (and another hidden "point" that I won't describe) are points of torsion. No matter how many more times we use the line trick, we won't get any more new points.

That sucks. How can we get points that can "escape" these $5$ points?

Finding More Points (of infinite order)

Since I am a dumb person, I wrote some Mathematica code to try and find some less trivial points on the curve.

https://i.imgur.com/ibVDVhX.png

This found some nice points! I experimented a lot with all the points, but the one that ended up doing the job was this first point, $(-2,1/5)$. I'll call this point $A$.

https://i.imgur.com/61rkWvt.png

Before I go on and find more points, I need to address two things.

First, what rational point am I even trying to find? If we test $A$ out, we find that it doesn't work because some of the resulting variables $x,y,z$ may end up being negative. So, we're trying to find rational points $(x_2,y_2)$ such that they correspond to a completely-positive triple $(x,y,z)$.

When does that happen? Let's reason it out by backtracking a bit.
  • We can assume that some variable (WLOG $z$) is positive, because if all variables $x,y,z$ are negative then we get an all-positive solution by flipping all the signs.
  • Now, $x,y > 0$ exactly when $x/z,y/z>0$. That is, $x_1,y_1 > 0$.
  • This means we want $x_2+y_2 > 0$ and $x_2-y_2 > 0$. In other words, $x_2 > |y_2|$.

This is captured by the following green region:
https://i.imgur.com/BEDmeWy.png
To reiterate, our goal is to find a rational point on the curve that lies in this region. Hence, this turns into a little fun game of "math football": We need to use the line trick to generate more and more points until we reach the "goal" that is the green region.

This is an absolute pain to do by hand. Fortunately, I have something called Mathematica! This brings me to the second thing I want to address: How can we streamline the line trick?

Using Mathematica to do expansions for me, I found that the cubic equation resulting from finding the third intersection of the line passing through points $(a,b)$ and $(c,d)$ has sum of roots given by:
$$\frac{-(11 a^2 - 22 a c + 11 c^2 + b^2 (1 + 24 c) + d^2 + 24 a d (-b + d) - 
    2 b (d + 12 c d))}{(4 (a^2 - 3 b^2 - 2 a c + c^2 + 6 b d - 3 d^2))}$$So, by Vieta, we can write a formula for the third intersection's $x_2$-coordinate:
$$L(a,b,c,d) := \frac{-(11 a^2 - 22 a c + 11 c^2 + b^2 (1 + 24 c) + d^2 + 24 a d (-b + d) - 2 b (d + 12 c d))}{(4 (a^2 - 3 b^2 - 2 a c + c^2 + 6 b d - 3 d^2))} - a - c$$Similarly, I managed to write a formula for the third intersection, given a tangent line at a point $(a,b)$:
$$T(a,b) := \frac{-(-9 - 282 a - 1741 a^2 - 3900 a^3 - 3204 a^4 - 864 a^5 - 47 b^2 + 
     1860 a b^2 + 4680 a^2 b^2 + 3456 a^3 b^2 + 108 b^4 - 
     2592 a b^4) }{108 + 792 a + 1884 a^2 + 1584 a^3 + 432 a^4 - 
    436 b^2 - 1488 a b^2 - 1440 a^2 b^2 + 432 b^4}-2a$$What a mess! This is precisely why our numbers are going to get huge.

Lastly, these formulas only give the $x$-coordinates. Finding the (positive) $y$-coordinate is easy via one last formula, that's pretty easy to derive (literally just solve for $y_2$):
$$Y(x) := \sqrt{\frac{1 - 6 x - 11 x^2 - 4 x^3}{1 - 12 x}}$$
Now let's finish the fight.

Finale

From $A$, I will draw a tangent line and find a third intersection at a new point $-2A$. (Again, worry not about the labels!)

https://i.imgur.com/rtBLd2Q.png

Our formulas give the coordinates for $-2A$:

https://i.imgur.com/1SfWEPD.png

From $-2A$, I will draw yet another tangent line and find a third intersection at a new point $4A$.

https://i.imgur.com/YRdhBz8.png
https://i.imgur.com/IspQusz.png

Again, Mathematica will tell us the coordinates of $4A$ via the formulas.

https://i.imgur.com/tE1PHhx.png

We're not able to get into the green region yet, so we need to keep going. Hideously, I will draw yet another tangent line at $4A$ to obtain the point $-8A$:

https://i.imgur.com/5JNs7NJ.png

Coordinates are:

https://i.imgur.com/3E4HwyT.png

We're done with tangents now! For convenience's sake, I also plotted down the point $8A$, which is just $-8A$ with negated $y_2$-coordinate, and I connected $4P$ and $8A$ with a line to get the point $-8A-4P$:

https://i.imgur.com/saSMd4j.png

Coordinates:

https://i.imgur.com/ggLuFXK.png

This was my grand plan! I needed a point way up there somehow in order to finally get into the green region with one more line. What is that line you ask? I'm glad you asked! All this time, I was hiding this one last "nice" rational point I was saving until the very end: $B = (-15/2,7/2)$! By drawing the line between $B$ and $-8A-4P$, we finally end up with a point in the green region:

https://i.imgur.com/mAegeBX.png

Coordinates:

https://i.imgur.com/SrCf2px.png

The light at the end of the tunnel is near! Letting this final point be $(x_2,y_2)$, we compute $x_2+y_2$ and $x_2-y_2$ to get $x_1$ and $y_1$:
$$x_1 = \frac{36875131794129999827197811565225474825492979968971970996283137471637224634055579}{
4373612677928697257861252602371390152816537558161613618621437993378423467772036}$$$$y_1 = \frac{154476802108746166441951315019919837485664325669565431700026634898253202035277999}{
4373612677928697257861252602371390152816537558161613618621437993378423467772036}$$Recalling that these are equal to $x/y$ and $x/z$ respectively, we let $z$ be the LCM of the denominators and $x,y$ be the resulting numerators when we find a common denominator. This gives us the following humungous solution... in positive integers!

$$X = 36875131794129999827197811565225474825492979968971970996283137471637224634055579$$$$Y = 154476802108746166441951315019919837485664325669565431700026634898253202035277999$$$$Z = 4373612677928697257861252602371390152816537558161613618621437993378423467772036$$
And finally, to truly admire our work, we can confirm that, indeed, this works.

https://i.imgur.com/JXcc55N.png
This post has been edited 9 times. Last edited by greenturtle3141, Dec 18, 2024, 7:09 PM

Comment

4 Comments

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
wow $$                            $$

by mlgjeffdoge21, Jan 23, 2022, 3:20 AM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
very interesting

by IceWolf10, Jan 23, 2022, 4:53 AM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathematica :eyes:

by depsilon0, Feb 9, 2022, 10:28 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ORZOROZROZO

by samrocksnature, Feb 15, 2022, 2:48 AM

Turtle math!

avatar

greenturtle3141
Archives
+ October 2024
Shouts
Submit
  • Can you give some thought to dropping a guide to STS? Just like how you presented your research (in your paper), what your essays were about, etc. Also cool blog!

    by Shreyasharma, Mar 13, 2025, 7:03 PM

  • this is so good

    by purpledonutdragon, Mar 4, 2025, 2:05 PM

  • orz usamts grader

    by Lhaj3, Jan 23, 2025, 7:43 PM

  • Entertaining blog

    by eduD_looC, Dec 31, 2024, 8:57 PM

  • wow really cool stuff

    by kingu, Dec 4, 2024, 1:02 AM

  • Although I had a decent college essay, this isn't really my specialty so I don't really have anything useful to say that isn't already available online.

    by greenturtle3141, Nov 3, 2024, 7:25 PM

  • Could you also make a blog post about college essay writing :skull:

    by Shreyasharma, Nov 2, 2024, 9:04 PM

  • what gold

    by peace09, Oct 15, 2024, 3:39 PM

  • oh lmao, i was confused because of the title initially. thanks! great read

    by OlympusHero, Jul 20, 2024, 5:00 AM

  • It should be under August 2023

    by greenturtle3141, Jul 11, 2024, 11:44 PM

  • does this blog still have the post about your math journey? for some reason i can't find it

    by OlympusHero, Jul 10, 2024, 5:41 PM

  • imagine not tortoise math

    no but seriously really interesting blog

    by fruitmonster97, Apr 2, 2024, 12:39 AM

  • W blog man

    by s12d34, Jan 24, 2024, 11:37 PM

  • very nice blog greenturtle it is very descriptive and fascinating to pay attention to :-D

    by StarLex1, Jan 3, 2024, 3:12 PM

  • orz blog

    by ryanbear, Dec 6, 2023, 9:23 PM

67 shouts
Tags
About Owner
  • Posts: 3554
  • Joined: Oct 14, 2014
Blog Stats
  • Blog created: Oct 23, 2021
  • Total entries: 54
  • Total visits: 41009
  • Total comments: 126
Search Blog
a