Here's how I like to solve my equations: just walk around randomly until I trip over a solution!<\/p>\n\n

<\/p>\n

Random walks (check my older post here<\/a>) and Diophantine equations<\/a> are two simple mathematical beasts. After a college seminar, I tried putting them together to make something neat, and came up with this: just pick a Diophantine equation, simulate a random walk, and try to see if the random walk went over any solutions! In this report<\/a> I briefly go over how I came up with this, and show the code I wrote\/some results. The Matlab code is all in here<\/a> (I also have some Python code about random walks here<\/a>, check my post<\/a>!).<\/p>\n

In the image above, the blue line represents a path taken by the random walk and in orange\/red the nodes tell us how far we are from a solution (the smaller the node, the closer we are). Note that this notion of proximity isn't given by actually computing the distance to a known solution, but just by looking at how similar the two sides of the equation are. The image below shows the evolution of three independent random walks trying to find an example solution of \\(\\frac{4}n = \\frac1x + \\frac1y + \\frac1z\\)<\/span> with \\(n = 25\\)<\/span> (that expression is the expression of the Erd\u00f6s-Straus conjecture<\/a>).<\/p>\n