<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Denis Akhiyarov</title>
<link>https://den-run-ai.github.io/</link>
<atom:link href="https://den-run-ai.github.io/index.xml" rel="self" type="application/rss+xml"/>
<description>Notes on math, code, AI, chess and running.</description>
<image>
<url>https://den-run-ai.github.io/assets/avatar.jpg</url>
<title>Denis Akhiyarov</title>
<link>https://den-run-ai.github.io/</link>
</image>
<generator>quarto-1.5.57</generator>
<lastBuildDate>Tue, 24 Sep 2024 00:00:00 GMT</lastBuildDate>
<item>
  <title>Math, Code, AI, Chess, and Sports</title>
  <dc:creator>Denis A.</dc:creator>
  <link>https://den-run-ai.github.io/posts/welcome/</link>
  <description><![CDATA[ 




<p>Welcome to the posts by <strong>den-run-ai</strong> about:</p>
<section id="math-code-ai-chess-sports" class="level2">
<h2 class="anchored" data-anchor-id="math-code-ai-chess-sports">Math 📐 | Code 👨‍💻 | AI 🧠 | Chess ♔ | Sports 🏃‍♂️</h2>
<p><img src="https://den-run-ai.github.io/posts/welcome/truck.jpeg" class="img-fluid"></p>
<p>Guess the year and where is this picture from?</p>


</section>

 ]]></description>
  <category>news</category>
  <guid>https://den-run-ai.github.io/posts/welcome/</guid>
  <pubDate>Tue, 24 Sep 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>OpenAI O1-mini AI Solving an Integer Equation</title>
  <dc:creator>Denis Akhiyarov + AI</dc:creator>
  <link>https://den-run-ai.github.io/posts/post-with-code/</link>
  <description><![CDATA[ 




<p>This is a post about non-trivial <strong>math</strong> problem solved using <strong>OpenAI O1-mini</strong>.</p>
<section id="solving-a-symmetrical-diophantine-equation-ai-approach" class="level1">
<h1>Solving a Symmetrical Diophantine Equation: AI Approach</h1>
<p>Diophantine equations (DE), are polynomial equations with integer solutions. You probably remember from school: <img src="https://latex.codecogs.com/png.latex?a%5E2%20+%20b%5E2%20=%20c%5E2"></p>
<p>This DE has a beautiful and simple collection of integer solutions.</p>
<p>In this blog post, let’s explore the symmetric equation without a known trivial solution. The best solution has over 100 digits!!!</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Cfrac%7Ba%7D%7Bb%20+%20c%7D%20+%20%5Cfrac%7Bb%7D%7Ba%20+%20c%7D%20+%20%5Cfrac%7Bc%7D%7Ba%20+%20b%7D%20=%204"></p>
<p>For more details, please see this math discussion:</p>
<p><a href="https://math.stackexchange.com/questions/402537/find-integer-in-the-form-fracabc-fracbca-fraccab">Solving a DE of Symmetric Fractions</a></p>
<p>A more recent math lecture discusses the hardness of finding small solutions:</p>
<p><a href="https://ami.uni-eszterhazy.hu/uploads/papers/finalpdf/AMI_43_from29to41.pdf">Cubic representation problem</a></p>
<p>This equation is symmetric in its variables. Such symmetry often hints at potential strategies for finding solutions, as it allows us to assume certain relationships between the variables without loss of generality.</p>
<section id="solution-generated-by-openai-o1-mini-reasoning-llm" class="level2">
<h2 class="anchored" data-anchor-id="solution-generated-by-openai-o1-mini-reasoning-llm">Solution Generated by OpenAI O1-mini Reasoning LLM</h2>
<p>The solution below is generated by the OpenAI O1-mini reasoning LLM system using the following prompt:</p>
<blockquote class="blockquote">
<p><strong>Solve for integers, use techniques from solved Diophantine equations:</strong> <strong>a/(b+c)+b/(a+c)+c/(a+b)=4</strong></p>
</blockquote>
<p>No other AI model or LLM has been able to solve this problem!</p>
<p><img src="https://den-run-ai.github.io/posts/post-with-code/solution_openai.png" class="img-fluid" alt="Symmetrical Equation"> <em>Figure 1: Screenshot from ChatGPT interface.</em></p>
</section>
<section id="breaking-down-the-problem" class="level2">
<h2 class="anchored" data-anchor-id="breaking-down-the-problem">Breaking Down the Problem</h2>
<p>To tackle this equation, we’ll employ techniques commonly used in solving DE, such as symmetry exploitation, substitution, and systematic trial and error.</p>
<section id="step-1-leveraging-symmetry" class="level3">
<h3 class="anchored" data-anchor-id="step-1-leveraging-symmetry">Step 1: Leveraging Symmetry</h3>
<p>Given the equation’s symmetry, we can assume, without loss of generality, that one of the variables is negative.</p>
</section>
<section id="step-2-introducing-substitution" class="level3">
<h3 class="anchored" data-anchor-id="step-2-introducing-substitution">Step 2: Introducing Substitution</h3>
<p>Let’s assume <img src="https://latex.codecogs.com/png.latex?c%20=%20-k">, where <img src="https://latex.codecogs.com/png.latex?k"> is a positive integer. Substituting this into our original equation transforms it into:</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Cfrac%7Ba%7D%7Bb%20-%20k%7D%20+%20%5Cfrac%7Bb%7D%7Ba%20-%20k%7D%20-%20%5Cfrac%7Bk%7D%7Ba%20+%20b%7D%20=%204"></p>
<p>This substitution simplifies the problem by reducing the number of negative terms, making it easier to handle the equation’s balance.</p>
</section>
<section id="step-3-systematic-trial-and-error" class="level3">
<h3 class="anchored" data-anchor-id="step-3-systematic-trial-and-error">Step 3: Systematic Trial and Error</h3>
<p>With <img src="https://latex.codecogs.com/png.latex?c%20=%20-k">, we now seek positive integers <img src="https://latex.codecogs.com/png.latex?a"> and <img src="https://latex.codecogs.com/png.latex?b"> such that <img src="https://latex.codecogs.com/png.latex?a%20%3E%20k"> and <img src="https://latex.codecogs.com/png.latex?b%20%3E%20k"> to avoid division by zero or negative denominators. Through systematic trial, varying <img src="https://latex.codecogs.com/png.latex?k"> and solving for <img src="https://latex.codecogs.com/png.latex?a"> and <img src="https://latex.codecogs.com/png.latex?b">, we aim to satisfy the equation.</p>
<section id="discovering-the-solution-a-b-c-9-11--5" class="level4">
<h4 class="anchored" data-anchor-id="discovering-the-solution-a-b-c-9-11--5">Discovering the Solution: <img src="https://latex.codecogs.com/png.latex?(a,%20b,%20c)%20=%20(9,%2011,%20-5)"></h4>
<p>It appears O1-mini applied some threshold analysis to find pairs that sum to nearly 4, but without providing any details.</p>
<p>Through diligent testing, one solution stands out:</p>
<ul>
<li><p><strong>Case <img src="https://latex.codecogs.com/png.latex?k%20=%205">:</strong></p>
<ul>
<li>Let <img src="https://latex.codecogs.com/png.latex?a%20=%209"> and <img src="https://latex.codecogs.com/png.latex?b%20=%2011">.</li>
</ul>
<p>Substituting these values:</p>
<p>(9 / (11 - 5)) + (11 / (9 - 5)) - (5 / (9 + 11)) = (9 / 6) + (11 / 4) - (5 / 20) = 1.5 + 2.75 - 0.25 = 4.0</p>
<p>The equation holds true, confirming that <img src="https://latex.codecogs.com/png.latex?(9,%2011,%20-5)"> is a valid solution.</p></li>
</ul>
</section>
</section>
</section>
<section id="the-uniqueness-of-the-solution" class="level2">
<h2 class="anchored" data-anchor-id="the-uniqueness-of-the-solution">The Uniqueness of the Solution</h2>
<p>Given the symmetry of the equation, any permutation of <img src="https://latex.codecogs.com/png.latex?(9,%2011,%20-5)"> will also satisfy the equation. These permutations include:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?(11,%20-5,%209)"></li>
<li><img src="https://latex.codecogs.com/png.latex?(-5,%209,%2011)"></li>
<li><img src="https://latex.codecogs.com/png.latex?(9,%20-5,%2011)"></li>
<li><img src="https://latex.codecogs.com/png.latex?(11,%209,%20-5)"></li>
<li><img src="https://latex.codecogs.com/png.latex?(-5,%2011,%209)"></li>
</ul>
<p>Each of these triples, when substituted into the equation, will yield a sum of 4, thereby satisfying the equation.</p>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>Through the exploration of a symmetrical Diophantine equation, we’ve unveiled a unique set of integer solutions: all permutations of <img src="https://latex.codecogs.com/png.latex?(9,%2011,%20-5)">. It is fascinating that AI can solve this now in few minutes when prompted carefully!</p>


</section>
</section>

 ]]></description>
  <category>news</category>
  <category>code</category>
  <category>analysis</category>
  <guid>https://den-run-ai.github.io/posts/post-with-code/</guid>
  <pubDate>Tue, 24 Sep 2024 00:00:00 GMT</pubDate>
  <media:content url="https://den-run-ai.github.io/posts/post-with-code/diophantine.png" medium="image" type="image/png" height="124" width="144"/>
</item>
</channel>
</rss>
