<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mathematics on kenji.blog</title><link>http://kenji.blog/en/tags/mathematics/</link><description>Recent content in Mathematics on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Sat, 05 Sep 2026 02:26:13 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/mathematics/index.xml" rel="self" type="application/rss+xml"/><item><title>The True Mathematical Structure of the General Number Field Sieve (GNFS)</title><link>http://kenji.blog/en/p/%E4%B8%80%E8%88%AC%E6%95%B0%E4%BD%93%E7%AF%A9%E6%B3%95gnfs%E3%81%AE%E7%9C%9F%E3%81%AE%E6%95%B0%E5%AD%A6%E7%9A%84%E6%A7%8B%E9%80%A0/</link><pubDate>Sat, 05 Sep 2026 02:26:13 +0900</pubDate><guid>http://kenji.blog/en/p/%E4%B8%80%E8%88%AC%E6%95%B0%E4%BD%93%E7%AF%A9%E6%B3%95gnfs%E3%81%AE%E7%9C%9F%E3%81%AE%E6%95%B0%E5%AD%A6%E7%9A%84%E6%A7%8B%E9%80%A0/</guid><description>&lt;img src="http://kenji.blog/p/%E4%B8%80%E8%88%AC%E6%95%B0%E4%BD%93%E7%AF%A9%E6%B3%95gnfs%E3%81%AE%E7%9C%9F%E3%81%AE%E6%95%B0%E5%AD%A6%E7%9A%84%E6%A7%8B%E9%80%A0/rsa_encryption_break_1788542156523.jpg" alt="Featured image of post The True Mathematical Structure of the General Number Field Sieve (GNFS)" />&lt;h1 id="the-true-mathematical-structure-of-the-general-number-field-sieve-gnfs">The True Mathematical Structure of the General Number Field Sieve (GNFS)
&lt;/h1>&lt;p>The ultimate goal of GNFS is to find $X^2 \equiv Y^2 \pmod N$.
To achieve this, mathematicians built a bridge between the &lt;strong>&amp;ldquo;world of real integers&amp;rdquo;&lt;/strong> and the &lt;strong>&amp;ldquo;world of algebraic number fields&amp;rdquo;&lt;/strong>. That bridge is the &amp;ldquo;homomorphism&amp;rdquo;.&lt;/p>
&lt;h2 id="stage-1-the-homomorphism-connecting-worlds">Stage 1: The &amp;ldquo;Homomorphism&amp;rdquo; Connecting Worlds
&lt;/h2>&lt;h3 id="1-polynomial-selection-and-root-definition">1. Polynomial Selection and Root Definition
&lt;/h3>&lt;p>For a massive composite number $N$, select an integer $m$ and a polynomial $f(x)$ such that $f(m) \equiv 0 \pmod N$.
(Example: Expand $N$ in base $m$ and create $f(x)$ from its coefficients. Here, assume $f(x)$ is irreducible (cannot be factored further) over the field of rational numbers $\mathbb{Q}$).&lt;/p>
&lt;p>Next, let one of the &amp;ldquo;complex roots&amp;rdquo; of the equation $f(x) = 0$ be $\alpha$.
Naturally, $f(\alpha) = 0$. $\alpha$ is not an integer but a complex number (an algebraic number) that may involve square roots or imaginary numbers.&lt;/p>
&lt;h3 id="2-construction-of-rings-and-homomorphisms">2. Construction of Rings and Homomorphisms
&lt;/h3>&lt;p>Now, prepare two mathematical &amp;ldquo;rings&amp;rdquo; (worlds where addition and multiplication are defined).&lt;/p>
&lt;ul>
&lt;li>&lt;strong>World A: $\mathbb{Z}[\alpha]$&lt;/strong> (Ring of algebraic integers containing $\alpha$)
A world of numbers represented in the form $a + b\alpha + c\alpha^2 + \dots$.&lt;/li>
&lt;li>&lt;strong>World B: $\mathbb{Z}/N\mathbb{Z}$&lt;/strong> (Ring of residues modulo $N$)
A modulo arithmetic world consisting only of integers from $0$ to $N-1$.&lt;/li>
&lt;/ul>
&lt;p>Here, we define a mapping $\phi$ from World A to World B as follows:
&lt;strong>$$\phi : \mathbb{Z}[\alpha] \to \mathbb{Z}/N\mathbb{Z}$$&lt;/strong>
&lt;strong>$$\phi(\alpha) = m \pmod N$$&lt;/strong>&lt;/p>
&lt;p>This mapping $\phi$ is a magical operation that completely replaces the variable $\alpha$ in World A with the integer $m$ in World B.
This $\phi$ possesses an extremely powerful property known as a &lt;strong>&amp;ldquo;Ring Homomorphism&amp;rdquo;&lt;/strong>.
A homomorphism is the property of &lt;strong>&amp;ldquo;warping to another world without breaking the structure of addition and multiplication&amp;rdquo;&lt;/strong>. In other words, the following equations hold:&lt;/p>
&lt;ul>
&lt;li>$\phi(X \times Y) = \phi(X) \times \phi(Y)$&lt;/li>
&lt;li>$\phi(X^2) = \phi(X)^2$&lt;/li>
&lt;/ul>
&lt;p>What does this mean? If we can create a &lt;strong>&amp;ldquo;square ($\gamma^2$)&amp;rdquo;&lt;/strong> of some complex element $\gamma$ in &amp;ldquo;World A (the world of $\alpha$)&amp;rdquo;, warping it to &amp;ldquo;World B (the modulo world)&amp;rdquo; via $\phi$ will ** perfectly preserve the square form $\phi(\gamma)^2$**.&lt;/p>
&lt;hr>
&lt;h2 id="stage-2-the-collapse-of-prime-factorization-and-the-birth-of-the-ideal">Stage 2: The Collapse of Prime Factorization and the Birth of the &amp;ldquo;Ideal&amp;rdquo;
&lt;/h2>&lt;p>We want to collect many appropriate elements $(a - b\alpha)$ in World A ($\mathbb{Z}[\alpha]$) and multiply them together to create a &amp;ldquo;perfect square (square element)&amp;rdquo;.
Normally, we could simply &amp;ldquo;prime factorize&amp;rdquo; each collected $(a - b\alpha)$ and combine them (solving via matrices) so that all prime exponents become even, thus creating a square.&lt;/p>
&lt;p>&lt;strong>However, here a devastating wall of algebra stands in our way.&lt;/strong>
In algebraic number fields like $\mathbb{Z}[\alpha]$, the &lt;strong>&amp;ldquo;uniqueness of prime factorization (any number can be uniquely expressed as a product of primes in exactly one way)&amp;rdquo;, which we learn in middle school, collapses.&lt;/strong>&lt;/p>
&lt;p>(Example: In a certain algebraic number field, $6 = 2 \times 3$, but at the same time $6 = (1+\sqrt{-5}) \times (1-\sqrt{-5})$, making it impossible to know which are the true primes.)&lt;/p>
&lt;p>If prime factorization is not uniquely determined, the puzzle (sieve method) of &amp;ldquo;counting the number of primes to make them even&amp;rdquo; becomes fundamentally impossible to execute.&lt;/p>
&lt;h3 id="the-salvation-by-kummer-and-dedekind-the-ideal">The Salvation by Kummer and Dedekind: The &amp;ldquo;Ideal&amp;rdquo;
&lt;/h3>&lt;p>What saved us from this collapse was the concept of the &lt;strong>&amp;ldquo;Ideal (ideal number)&amp;rdquo;&lt;/strong> created by 19th-century mathematicians.
By considering not the elements themselves but the &amp;ldquo;set of multiples (ideals)&amp;rdquo; generated by those elements, they made prime factorization possible again.&lt;/p>
&lt;p>In the ring of integers of an algebraic number field $\mathcal{O}_K$ (a more complete ring containing $\mathbb{Z}[\alpha]$), even if elements cannot be uniquely prime-factorized, it is proven that &lt;strong>&amp;ldquo;an ideal can always be uniquely prime-factorized into a product of &amp;lsquo;prime ideals ($\mathfrak{p}$)&amp;rsquo; in exactly one way&amp;rdquo;&lt;/strong>.&lt;/p>
&lt;p>Therefore, in GNFS, instead of factorizing the element $(a - b\alpha)$ itself, we perform &lt;strong>prime ideal factorization on the principal ideal $\langle a - b\alpha \rangle$&lt;/strong> that it generates.&lt;/p>
&lt;hr>
&lt;h2 id="stage-3-norms-and-the-two-sieves">Stage 3: Norms and the Two Sieves
&lt;/h2>&lt;p>So, how do we know which prime ideals the ideal $\langle a - b\alpha \rangle$ factors into?
Here, we use a function called the &lt;strong>&amp;ldquo;Norm&amp;rdquo;&lt;/strong>. The norm is a function that converts complex elements of an algebraic number field into &amp;ldquo;ordinary real integers $\mathbb{Z}$&amp;rdquo;.&lt;/p>
&lt;p>The norm of the element $(a - b\alpha)$ can be calculated by a simple polynomial calculation $b^d f(a/b)$ (where $d$ is the degree of $f(x)$).&lt;/p>
&lt;p>Due to algebraic theorems, it is known that &lt;strong>&amp;ldquo;if the norm of a certain ideal can be completely factored into small primes (is smooth), then the original ideal can also be completely factored into small prime ideals.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>Thus, GNFS simultaneously calculates the following two values for a massive number of integer pairs $(a, b)$ and collects only the pairs where both values are &amp;ldquo;smooth numbers&amp;rdquo;.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Rational Sieve&lt;/strong>: $a - bm$ (Values in the real world)&lt;/li>
&lt;li>&lt;strong>Algebraic Sieve&lt;/strong>: $b^d f(a/b)$ (Norm in the algebraic number field world)&lt;/li>
&lt;/ol>
&lt;p>By collecting tens of millions of pairs $(a, b)$ where both are smooth, and solving the prime factorization data of ideals (how many prime ideals are included) as a giant matrix (linear algebra over GF(2)), we find a set $S$ of pairs such that &amp;ldquo;when multiplied together, the exponents of all prime ideals become even&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="stage-4-the-two-confronting-obstructions-and-the-ideal-class-group">Stage 4: The Two Confronting &amp;ldquo;Obstructions&amp;rdquo; and the Ideal Class Group
&lt;/h2>&lt;p>Through matrix calculations, we found that multiplying all the ideals of $(a - b\alpha)$ belonging to set $S$ results in the square of a certain ideal $I$.
&lt;/p>
$$\prod_{S} \langle a - b\alpha \rangle = I^2$$
&lt;p>&lt;strong>However, it doesn&amp;rsquo;t end here. The deepest and most difficult mathematical wall in GNFS lies here.&lt;/strong>&lt;/p>
&lt;p>What we ultimately want is not the &amp;ldquo;square of an ideal&amp;rdquo;, but the &lt;strong>&amp;ldquo;square of an element ($\gamma^2$)&amp;rdquo;&lt;/strong> to plug into the mapping $\phi$.
Just because the ideal is squared doesn&amp;rsquo;t necessarily mean the element itself is squared. There exist &lt;strong>two formidable mathematical obstructions&lt;/strong> here.&lt;/p>
&lt;h3 id="obstruction-1-the-wall-of-the-ideal-class-group">Obstruction 1: The Wall of the Ideal Class Group
&lt;/h3>&lt;p>The ideal $I$ is not always an &amp;ldquo;ideal generated by a single element (principal ideal)&amp;rdquo;.
It is impossible to extract a concrete element $\gamma$ from an ideal that is not principal.&lt;/p>
&lt;p>Here, the concept of the &lt;strong>&amp;ldquo;Ideal Class Group ($Cl_K$)&amp;rdquo;&lt;/strong> comes into play. The ideal class group is a group that measures &amp;ldquo;how many non-principal ideals exist in that algebraic number field (how much the uniqueness of prime factorization is broken)&amp;rdquo;.
Even if $\prod \langle a - b\alpha \rangle$ becomes $I^2$, if $I$ is not the identity element (principal ideal) in the ideal class group, it cannot be pulled back to the square of an element.&lt;/p>
&lt;h3 id="obstruction-2-the-wall-of-the-unit-group">Obstruction 2: The Wall of the Unit Group
&lt;/h3>&lt;p>Suppose we get lucky and $I$ is a principal ideal $\langle \gamma \rangle$.
Then, $\prod \langle a - b\alpha \rangle = \langle \gamma^2 \rangle$.
You might think, &amp;ldquo;Great, the element is squared too!&amp;rdquo;, but that is a huge mistake.&lt;/p>
&lt;p>The fact that ideals (sets of multiples) are equal does not mean the elements are completely equal. A deviation by a &lt;strong>&amp;ldquo;Unit (a number whose reciprocal is also an integer, like 1 or -1)&amp;rdquo;&lt;/strong> inevitably occurs.
In other words, the actual equality of the elements is as follows:
&lt;/p>
$$\prod_{S} (a - b\alpha) = u \cdot \gamma^2$$
&lt;p>
($u$ is an element of the unit group $U_K$)&lt;/p>
&lt;p>Unless this unit $u$ itself is the square of something (a square element), the left side can absolutely never become a &amp;ldquo;perfect square of an element&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="stage-5-adlemans-magic-quadratic-characters">Stage 5: Adleman&amp;rsquo;s Magic &amp;ldquo;Quadratic Characters&amp;rdquo;
&lt;/h2>&lt;p>The obstruction of the ideal class group and the obstruction of the unit group. How do we overcome these two?
Here, a genius method called &lt;strong>&amp;ldquo;Quadratic Characters&amp;rdquo;&lt;/strong>, introduced by cryptographer Leonard Adleman (the &amp;ldquo;A&amp;rdquo; in RSA) and others, makes its appearance.&lt;/p>
&lt;p>To determine &amp;ldquo;whether a certain element is a perfect square in the algebraic number field&amp;rdquo;, we use an algebraic number field version of the Legendre symbol (quadratic residue).
To the giant matrix from earlier (the puzzle to make the count of prime ideals even), we secretly append dozens of additional conditions (columns) stating that &lt;strong>&amp;ldquo;the quadratic characters for some special prime ideals $\mathfrak{q}$ also all become $1$ (even)&amp;rdquo;.&lt;/strong>&lt;/p>
&lt;p>When we find a set $S$ that satisfies even these additional conditions through matrix calculations, deep theorems of algebraic number theory guarantee that &lt;strong>&amp;ldquo;both the obstruction of the ideal class group and the obstruction of the unit group will naturally vanish with overwhelming probability.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>With this, we finally obtain the true equation.
&lt;/p>
$$\prod_{S} (a - b\alpha) = \gamma^2$$
&lt;hr>
&lt;h2 id="final-stage-the-convergence-of-worlds-and-the-fall-of-encryption">Final Stage: The Convergence of Worlds and the Fall of Encryption
&lt;/h2>&lt;p>Finally, all the pieces of the puzzle are in place.&lt;/p>
&lt;p>&lt;strong>[Element in the Algebraic Number Field World (World A)]&lt;/strong>
$\gamma^2 = \prod (a - b\alpha)$
(We find $\gamma$ from this using a square root algorithm)&lt;/p>
&lt;p>&lt;strong>[Element in the Real World (World of Rational Numbers)]&lt;/strong>
$V^2 = \prod (a - bm)$
(Since this is just ordinary integer multiplication, the square root $V$ can be found normally)&lt;/p>
&lt;p>Now, it&amp;rsquo;s time for the magical bridge we built at the very beginning, the &lt;strong>homomorphism $\phi$&lt;/strong>, to take the stage.
We warp the element $\gamma$ from World A to World B (the world modulo $N$) using $\phi$ (the mapping that substitutes $m$ for $\alpha$).
&lt;/p>
$$Y = \phi(\gamma) \pmod N$$
&lt;p>Meanwhile, we take the $V$ created in the real world directly to the modulo world and call it $X$.
&lt;/p>
$$X = V \pmod N$$
&lt;p>Due to the homomorphism&amp;rsquo;s property of &amp;ldquo;preserving structure&amp;rdquo;, the square relationship that held in World A is perfectly preserved in World B (the world modulo $N$) as well.
Furthermore, because the original pairs $(a, b)$ were correspondingly created in the forms $a - b\alpha$ and $a - bm$, these $X$ and $Y$ collide in the world modulo $N$ to produce the following absolute equation:&lt;/p>
&lt;p>&lt;strong>$$X^2 \equiv Y^2 \pmod N$$&lt;/strong>&lt;/p>
&lt;p>All that is left is to pray that these $X$ and $Y$ are not trivial solutions ($X \equiv \pm Y$) and calculate:
&lt;strong>$\gcd(X - Y, N)$&lt;/strong>&lt;/p>
&lt;p>If it is a non-trivial solution, the Euclidean algorithm will race through in 0.001 seconds, and the secret primes $p$ and $q$, which are the heart of RSA encryption, will be printed on the output screen.&lt;/p>
&lt;hr>
&lt;p>This is the &lt;strong>complete form of the &amp;ldquo;General Number Field Sieve (GNFS)&amp;rdquo;&lt;/strong>, gathering the essence of modern mathematics.&lt;/p></description></item><item><title>A Simple Explanation of Kepler's Conjecture</title><link>http://kenji.blog/en/p/%E3%82%B1%E3%83%97%E3%83%A9%E3%83%BC%E4%BA%88%E6%83%B3%E3%82%92%E3%82%8F%E3%81%8B%E3%82%8A%E3%82%84%E3%81%99%E3%81%8F%E8%A7%A3%E8%AA%AC/</link><pubDate>Mon, 21 Jul 2025 22:53:03 +0900</pubDate><guid>http://kenji.blog/en/p/%E3%82%B1%E3%83%97%E3%83%A9%E3%83%BC%E4%BA%88%E6%83%B3%E3%82%92%E3%82%8F%E3%81%8B%E3%82%8A%E3%82%84%E3%81%99%E3%81%8F%E8%A7%A3%E8%AA%AC/</guid><description>&lt;img src="http://kenji.blog/p/%E3%82%B1%E3%83%97%E3%83%A9%E3%83%BC%E4%BA%88%E6%83%B3%E3%82%92%E3%82%8F%E3%81%8B%E3%82%8A%E3%82%84%E3%81%99%E3%81%8F%E8%A7%A3%E8%AA%AC/img.png" alt="Featured image of post A Simple Explanation of Kepler's Conjecture" />&lt;h1 id="a-simple-explanation-of-keplers-conjecture-the-best-way-to-pack-watermelons-tightly">A Simple Explanation of Kepler&amp;rsquo;s Conjecture! &lt;del>The Best Way to Pack Watermelons Tightly&lt;/del>
&lt;/h1>&lt;p>Hello, this is kenji!&lt;/p>
&lt;p>Today, I&amp;rsquo;d like to explain a mathematical concept with a somewhat difficult-sounding name, &amp;ldquo;Kepler&amp;rsquo;s Conjecture,&amp;rdquo; as simply as possible.&lt;/p>
&lt;p>At first glance, it seems like a very niche topic, but it&amp;rsquo;s actually a quite familiar problem: &amp;ldquo;How can we pack watermelons as tightly as possible in a box?&amp;rdquo; It relates to convenience store refrigerators and how cargo is loaded.&lt;/p>
&lt;p>And in the world of mathematics, it&amp;rsquo;s a super romantic story because it &lt;strong>could not be proven for over 400 years&lt;/strong>.&lt;/p>
&lt;p>Let&amp;rsquo;s get started!&lt;/p>
&lt;hr>
&lt;h2 id="who-is-kepler-anyway">Who is Kepler anyway?
&lt;/h2>&lt;p>First of all, who is the &amp;ldquo;Kepler&amp;rdquo; in &amp;ldquo;Kepler&amp;rsquo;s Conjecture&amp;rdquo;?&lt;/p>
&lt;p>This is the name of a German astronomer and mathematician, &lt;strong>Johannes Kepler&lt;/strong>.&lt;/p>
&lt;p>He was a truly amazing person.
For example, he&amp;rsquo;s the one who discovered that planetary orbits are elliptical. It&amp;rsquo;s common knowledge now, but back then (around 1600), even the heliocentric theory wasn&amp;rsquo;t widely believed.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Galileo = The genius of observation&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Kepler = The genius who explained the universe with mathematical formulas&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Newton = The super genius who compiled those theories into physical laws&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>In that kind of positioning, Kepler was a pioneer of &amp;ldquo;explaining the universe with mathematical formulas.&amp;rdquo;&lt;/p>
&lt;p>And then, one day, he brought this up.&lt;/p>
&lt;hr>
&lt;h2 id="what-is-keplers-conjecture">What is Kepler&amp;rsquo;s Conjecture?
&lt;/h2>&lt;p>Put simply, &amp;ldquo;Kepler&amp;rsquo;s Conjecture&amp;rdquo; is about this:&lt;/p>
&lt;hr>
&lt;blockquote>
&lt;p>&lt;strong>When packing spheres of the same size (like watermelons or oranges) into a box, which arrangement packs them the tightest?&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;p>That&amp;rsquo;s the problem.&lt;/p>
&lt;p>And what Kepler conjectured in the 1600s was:&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Isn&amp;rsquo;t it most efficient to stack them in a triangle-like shape, just like how oranges are displayed at a greengrocer?&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;p>That was it.&lt;/p>
&lt;p>To say this more mathematically, it&amp;rsquo;s called the &amp;ldquo;&lt;strong>Sphere Packing Problem&lt;/strong>,&amp;rdquo; which is the problem of finding the densest way to pack spheres into space.&lt;/p>
&lt;p>Kepler conjectured that an arrangement called &amp;ldquo;&lt;strong>Face-Centered Cubic (FCC)&lt;/strong>&amp;rdquo; structure (like stacking watermelons in a triangle) is the most efficient.&lt;/p>
&lt;p>And, while everyone thought, &amp;ldquo;That certainly seems right,&amp;rdquo; it was incredibly difficult to mathematically prove that &amp;ldquo;This is absolutely the best!&amp;rdquo;&lt;/p>
&lt;hr>
&lt;h2 id="400-years-until-it-was-proven">400 Years Until It Was Proven!?!
&lt;/h2>&lt;p>So, when was it actually proven?&lt;/p>
&lt;p>Surprisingly, around &lt;strong>1998 to 2005&lt;/strong>.
In other words, &lt;strong>no one could prove it for nearly 400 years&lt;/strong>. That&amp;rsquo;s crazy.&lt;/p>
&lt;p>Moreover, it was proven by an American mathematician named &lt;strong>Thomas Hales&lt;/strong>.&lt;/p>
&lt;p>He decided it was impossible to do by hand calculations alone, and &lt;strong>proved it using computers&lt;/strong>.
However, the proof was so complex that a problem arose: humans couldn&amp;rsquo;t properly check it!&lt;/p>
&lt;p>This sparked a huge debate in the mathematical world: &amp;ldquo;So, can we really trust a proof done by a computer?&amp;rdquo;&lt;/p>
&lt;p>In the end, the proof that said, &amp;ldquo;We have rigorously verified it, including the computer part!&amp;rdquo; (formally known as a &amp;ldquo;formal proof&amp;rdquo;) was completed in &lt;strong>2014&lt;/strong>.&lt;/p>
&lt;p>In other words, it took &lt;strong>over 400 years to prove that Kepler&amp;rsquo;s intuition was right&lt;/strong>. What a romantic story.&lt;/p>
&lt;hr>
&lt;h2 id="its-used-a-lot-in-real-life-too">It&amp;rsquo;s Used a Lot in Real Life Too
&lt;/h2>&lt;p>You might think that &amp;ldquo;how to arrange spheres&amp;rdquo; is just a topic for math nerds, but it&amp;rsquo;s actually super practical.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Efficiently packing drinks in a convenience store refrigerator&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Loading canned goods onto transport pallets&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Applied to communications (like digital signal compression)&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Used in 3D printers and the design of crystal structures&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>And so on, it&amp;rsquo;s a theory that&amp;rsquo;s actually heavily used behind the scenes in our daily lives.&lt;/p>
&lt;hr>
&lt;h2 id="summary-human-intuition-is-amazing">Summary: Human Intuition is Amazing
&lt;/h2>&lt;p>So, let&amp;rsquo;s summarize.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Kepler&amp;rsquo;s Conjecture&lt;/strong> = The problem of how to pack spheres as tightly as possible&lt;/li>
&lt;li>&lt;strong>Mr. Kepler&lt;/strong> = The mathematician and astronomer who discovered planetary orbits&lt;/li>
&lt;li>&lt;strong>Conjectured in the 1600s! But proven in the 2000s!&lt;/strong>&lt;/li>
&lt;li>&lt;strong>It&amp;rsquo;s highly applied in real life!&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>And the most interesting part is that
&lt;strong>&amp;ldquo;the way greengrocers intuitively stacked things was mathematically the strongest.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>In short, &lt;strong>human intuition is amazing&lt;/strong>.
And the fact that &lt;strong>it can take 400 years to prove it&lt;/strong> is such a romantic story.&lt;/p>
&lt;hr>
&lt;p>If you&amp;rsquo;re interested, please try searching for things like &amp;ldquo;Thomas Hales&amp;rdquo;, &amp;ldquo;Formal Proof&amp;rdquo;, and &amp;ldquo;Sphere Packing&amp;rdquo;. It&amp;rsquo;s incredibly fascinating when you dig deeper into it.&lt;/p>
&lt;p>See you!&lt;/p>
&lt;hr>
&lt;p>[PR]&lt;/p>
&lt;div style="background:#fff;width:120px;height:215px;box-sizing:border-box;border:1px solid #ccc;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;">&lt;div style="line-height:0;">&lt;img src="https://static.jp.mercari.com/assets/img/common/jp/logo_horizontal.png" width="105">&lt;/div>&lt;a href="https://jp.mercari.com/item/m71496725612?afid=1916658352" style="width:100px;height:100px;background:#eee;" target="_blank">&lt;img src="https://ambassador-system.mercari.com/v1/i?id=m71496725612&amp;svc=m" style="line-height:0;width:100px;height:100px;object-fit:contain;"/>&lt;/a>&lt;div style="padding:12px 0;width:100%;text-align:center;">&lt;a href="https://jp.mercari.com/item/m71496725612?afid=1916658352" style="width:100px;height:32px;background-color:#E32B36;border-radius:4px;line-height:14px;text-align:center;color:#fff;font-weight:bold;border:0;font-size:12px;display:inline-flex;justify-content:center;align-items:center;" target="_blank">Buy Now&lt;/a>&lt;/div>&lt;/div></description></item><item><title>C Language Code to Generate Prime Numbers</title><link>http://kenji.blog/en/p/%E7%B4%A0%E6%95%B0%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8Bc%E8%A8%80%E8%AA%9E%E3%82%B3%E3%83%BC%E3%83%89/</link><pubDate>Sat, 24 Aug 2024 09:38:10 +0900</pubDate><guid>http://kenji.blog/en/p/%E7%B4%A0%E6%95%B0%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8Bc%E8%A8%80%E8%AA%9E%E3%82%B3%E3%83%BC%E3%83%89/</guid><description>&lt;img src="http://kenji.blog/p/%E7%B4%A0%E6%95%B0%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8Bc%E8%A8%80%E8%AA%9E%E3%82%B3%E3%83%BC%E3%83%89/img.png" alt="Featured image of post C Language Code to Generate Prime Numbers" />&lt;p>Here is a simple C language code that generates prime numbers within a specified range. In this example, it enumerates prime numbers from 1 to n.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;span class="lnt">28
&lt;/span>&lt;span class="lnt">29
&lt;/span>&lt;span class="lnt">30
&lt;/span>&lt;span class="lnt">31
&lt;/span>&lt;span class="lnt">32
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-cpp" data-lang="cpp">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;stdio.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;stdbool.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">bool&lt;/span> &lt;span class="nf">isPrime&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span> &lt;span class="n">num&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">num&lt;/span> &lt;span class="o">&amp;lt;=&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">return&lt;/span> &lt;span class="nb">false&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">num&lt;/span> &lt;span class="o">&amp;lt;=&lt;/span> &lt;span class="mi">3&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">return&lt;/span> &lt;span class="nb">true&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">num&lt;/span> &lt;span class="o">%&lt;/span> &lt;span class="mi">2&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="mi">0&lt;/span> &lt;span class="o">||&lt;/span> &lt;span class="n">num&lt;/span> &lt;span class="o">%&lt;/span> &lt;span class="mi">3&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">return&lt;/span> &lt;span class="nb">false&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">for&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">5&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">&amp;lt;=&lt;/span> &lt;span class="n">num&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">+=&lt;/span> &lt;span class="mi">6&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">num&lt;/span> &lt;span class="o">%&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="mi">0&lt;/span> &lt;span class="o">||&lt;/span> &lt;span class="n">num&lt;/span> &lt;span class="o">%&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">i&lt;/span> &lt;span class="o">+&lt;/span> &lt;span class="mi">2&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="k">return&lt;/span> &lt;span class="nb">false&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="nb">true&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">void&lt;/span> &lt;span class="nf">printPrimes&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span> &lt;span class="n">n&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;2 &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">for&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">3&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">&amp;lt;=&lt;/span> &lt;span class="n">n&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">+=&lt;/span> &lt;span class="mi">2&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">isPrime&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">))&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;%d &amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s">&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">int&lt;/span> &lt;span class="nf">main&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">int&lt;/span> &lt;span class="n">n&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Please enter the maximum value of the range to generate prime numbers: &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">scanf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;%d&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="o">&amp;amp;&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;The prime numbers from 1 to %d are as follows:&lt;/span>&lt;span class="se">\n&lt;/span>&lt;span class="s">&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">n&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">printPrimes&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>This code works as follows:&lt;/p>
&lt;ol>
&lt;li>isPrime function: Determines whether a given number is a prime number. For efficiency, it first checks if it is divisible by 2 or 3, and then proceeds to check using steps of 6.&lt;/li>
&lt;li>printPrimes function: Outputs the prime numbers within the specified range. It outputs 2 first, and then checks only odd numbers.&lt;/li>
&lt;li>main function: Prompts the user to input the maximum value of the range and outputs the prime numbers within that range.&lt;/li>
&lt;/ol>
&lt;p>When you compile and run this code, it will display the prime numbers within the specified range.&lt;/p></description></item><item><title>What is the Birthday Paradox?</title><link>http://kenji.blog/en/p/%E3%83%90%E3%83%BC%E3%82%B9%E3%83%87%E3%82%A4%E3%83%91%E3%83%A9%E3%83%89%E3%83%83%E3%82%AF%E3%82%B9%E3%81%A8%E3%81%AF/</link><pubDate>Tue, 02 Apr 2024 01:20:50 +0900</pubDate><guid>http://kenji.blog/en/p/%E3%83%90%E3%83%BC%E3%82%B9%E3%83%87%E3%82%A4%E3%83%91%E3%83%A9%E3%83%89%E3%83%83%E3%82%AF%E3%82%B9%E3%81%A8%E3%81%AF/</guid><description>&lt;img src="http://kenji.blog/p/%E3%83%90%E3%83%BC%E3%82%B9%E3%83%87%E3%82%A4%E3%83%91%E3%83%A9%E3%83%89%E3%83%83%E3%82%AF%E3%82%B9%E3%81%A8%E3%81%AF/img.png" alt="Featured image of post What is the Birthday Paradox?" />&lt;h2 id="do-you-know-the-birthday-paradox">Do you know the Birthday Paradox?
&lt;/h2>&lt;p>Let me tell you a slightly mysterious story.
How many people do you think need to gather for the &amp;ldquo;probability of people having the same birthday&amp;rdquo; to become high?&lt;/p>
&lt;p>For example, a year has 365 days, so when you&amp;rsquo;re told &amp;ldquo;if 23 people gather, the probability of someone sharing a birthday is over 50%&amp;rdquo;&amp;hellip; it feels somewhat counterintuitive, right?&lt;/p>
&lt;p>But this is &lt;strong>actually over 50%.&lt;/strong>&lt;/p>
&lt;hr>
&lt;h2 id="why-does-this-happen">Why does this happen?
&lt;/h2>&lt;p>This phenomenon is called the &amp;ldquo;Birthday Paradox&amp;rdquo;.
Its name contains &amp;ldquo;paradox&amp;rdquo;, but there is a proper mathematical reason for it.&lt;/p>
&lt;p>When the number of people is &amp;ldquo;n&amp;rdquo;, the &lt;strong>probability that no one shares a birthday&lt;/strong> can be calculated with the following formula:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">P(No one shares) = 365/365 × 364/365 × 363/365 × ... × (365 - n + 1)/365
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>By subtracting that from 1, you get the &amp;ldquo;probability of sharing a birthday with someone&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="looking-at-the-results">Looking at the results&amp;hellip;
&lt;/h2>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Number of People&lt;/th>
&lt;th>Probability of people having the same birthday&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>10 people&lt;/td>
&lt;td>Approx. 11.7%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>20 people&lt;/td>
&lt;td>Approx. 41.1%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>23 people&lt;/td>
&lt;td>&lt;strong>Approx. 50.7% (Focus here!)&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>30 people&lt;/td>
&lt;td>Approx. 70.6%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>70 people&lt;/td>
&lt;td>&lt;strong>A whopping approx. 99.9%!&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>In other words, with just &lt;strong>23 people&lt;/strong>, there is a more than half chance that someone will share a birthday.
It seems like this could apply quite often in a school class or a workplace meeting, right?&lt;/p>
&lt;hr>
&lt;h2 id="conclusion-the-gap-between-intuition-and-mathematics-is-interesting">Conclusion: The gap between intuition and mathematics is interesting
&lt;/h2>&lt;p>The &amp;ldquo;Birthday Paradox&amp;rdquo; is an interesting example where our intuition and actual mathematical probabilities diverge.
Knowing this kind of story might make for lively small talk or a fun quiz!&lt;/p>
&lt;hr>
&lt;h2 id="reference-links">Reference Links
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://en.wikipedia.org/wiki/Birthday_problem" target="_blank" rel="noopener"
>Birthday problem (Wikipedia)&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Unsolved Problems in Mathematics</title><link>http://kenji.blog/en/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%9C%AA%E8%A7%A3%E6%B1%BA%E5%95%8F%E9%A1%8C/</link><pubDate>Sat, 02 Mar 2024 22:57:36 +0900</pubDate><guid>http://kenji.blog/en/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%9C%AA%E8%A7%A3%E6%B1%BA%E5%95%8F%E9%A1%8C/</guid><description>&lt;img src="http://kenji.blog/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%9C%AA%E8%A7%A3%E6%B1%BA%E5%95%8F%E9%A1%8C/img.png" alt="Featured image of post Unsolved Problems in Mathematics" />&lt;h1 id="unsolved-problems-in-mathematics">Unsolved Problems in Mathematics
&lt;/h1>&lt;p>This is an explanation of unsolved problems in mathematics. Although the problems themselves are simple, there are still many that have not been proven.&lt;/p>
&lt;h2 id="are-there-infinitely-many-perfect-numbers">Are there infinitely many perfect numbers?
&lt;/h2>&lt;p>A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself.
For example,&lt;/p>
&lt;ul>
&lt;li>6 has divisors 1, 2, and 3, and 1+2+3=6, so it is a perfect number.&lt;/li>
&lt;li>28 has divisors 1, 2, 4, 7, and 14, and 1+2+4+7+14=28, so it is a perfect number.&lt;/li>
&lt;/ul>
&lt;p>Currently, only 51 perfect numbers have been discovered. It is conjectured that there are infinitely many, but this has not yet been proven.&lt;/p>
&lt;h2 id="goldbachs-conjecture">Goldbach&amp;rsquo;s Conjecture
&lt;/h2>&lt;p>Goldbach&amp;rsquo;s conjecture states that every even integer greater than 2 can be expressed as the sum of two primes.
(Here, a prime number is a natural number that has no positive divisors other than 1 and itself.)&lt;/p>
&lt;p>For example,&lt;/p>
&lt;ul>
&lt;li>4=2+2&lt;/li>
&lt;li>6=3+3&lt;/li>
&lt;li>8=3+5&lt;/li>
&lt;li>10=3+7=5+5&lt;/li>
&lt;/ul>
&lt;p>The problem itself is very simple, but it remains unproven.&lt;/p>
&lt;h2 id="riemann-hypothesis">Riemann Hypothesis
&lt;/h2>&lt;p>The Riemann hypothesis is the conjecture that the zeros of the Riemann zeta function are restricted to negative even integers and complex numbers with real part 1 / 2.&lt;/p>
&lt;p>The Riemann zeta function is the function $\zeta$ defined by:&lt;/p>
$$\zeta(s):=\sum _{n=1}^{\infty }{\frac {1}{n^{s}}}=1+{\frac {1}{2^{s}}}+{\frac {1}{3^{s}}}+{\frac {1}{4^{s}}}+\cdots$$
&lt;p>where $s$ is a complex number and $n$ is a natural number.&lt;/p></description></item><item><title>History of Mathematics</title><link>http://kenji.blog/en/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%AD%B4%E5%8F%B2/</link><pubDate>Sat, 22 Jul 2023 15:25:10 +0900</pubDate><guid>http://kenji.blog/en/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%AD%B4%E5%8F%B2/</guid><description>&lt;img src="http://kenji.blog/p/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%AD%B4%E5%8F%B2/img.png" alt="Featured image of post History of Mathematics" />&lt;h3 id="the-three-classic-problems-of-ancient-greek-mathematics">The Three Classic Problems of Ancient Greek Mathematics
&lt;/h3>&lt;ol>
&lt;li>Given a circle, construct a square with the same area (Squaring the circle)&lt;/li>
&lt;li>Given an arbitrary angle, trisect it (Angle trisection)&lt;/li>
&lt;li>Given a cube, construct a cube with twice the volume (Doubling the cube)&lt;/li>
&lt;/ol>
&lt;h3 id="archimedean-spiral">Archimedean Spiral
&lt;/h3>&lt;p>On a plane, let a ray OB rotate around a fixed point O at a uniform speed. Assuming the initial position is OA, when point P starts from O simultaneously as the ray begins moving from OA, and moves along OB at a constant speed, the curve drawn by point P is an Archimedean spiral.&lt;/p>
&lt;h3 id="pappuss-theorem">Pappus&amp;rsquo;s Theorem
&lt;/h3>&lt;ul>
&lt;li>Cycloid&lt;/li>
&lt;li>Conchoid of Nicomedes&lt;/li>
&lt;li>Cissoid of Diocles&lt;/li>
&lt;li>Fermat&amp;rsquo;s tangent method&lt;/li>
&lt;li>Descartes&amp;rsquo; normal method&lt;/li>
&lt;/ul>
&lt;h3 id="timeline">Timeline
&lt;/h3>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Year&lt;/th>
&lt;th>Event&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>c. 3400 BC&lt;/td>
&lt;td>Sumerians perform calculations using clay tokens&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>c. 3000 BC&lt;/td>
&lt;td>Hieroglyphic mathematics appears in Egypt&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>c. 2800 BC&lt;/td>
&lt;td>Weights and measures based on the decimal system are used in the Indus Valley Civilization&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>c. 2700 BC&lt;/td>
&lt;td>Egyptians use ropes and Pythagorean triples to verify angles&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>c. 2500 BC&lt;/td>
&lt;td>The abacus, a calculating tool, is discovered&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>c. 2500 BC&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="reference">Reference
&lt;/h3>&lt;ul>
&lt;li>&lt;a class="link" href="https://ja.wikipedia.org/wiki/%E6%95%B0%E5%AD%A6%E3%81%AE%E6%AD%B4%E5%8F%B2" target="_blank" rel="noopener"
>History of Mathematics&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>How to enable KaTeX (LaTeX-style math formulas) in Hugo</title><link>http://kenji.blog/en/p/hugo%E3%81%A7katexlatex%E9%A2%A8%E6%95%B0%E5%BC%8F%E8%A1%A8%E7%A4%BA%E3%82%92%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</link><pubDate>Fri, 31 Mar 2023 23:11:26 +0900</pubDate><guid>http://kenji.blog/en/p/hugo%E3%81%A7katexlatex%E9%A2%A8%E6%95%B0%E5%BC%8F%E8%A1%A8%E7%A4%BA%E3%82%92%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/hugo%E3%81%A7katexlatex%E9%A2%A8%E6%95%B0%E5%BC%8F%E8%A1%A8%E7%A4%BA%E3%82%92%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post How to enable KaTeX (LaTeX-style math formulas) in Hugo" />&lt;h1 id="what-is-katex">What is KaTeX
&lt;/h1>&lt;p>KaTeX is a JavaScript library for displaying LaTeX-style mathematical formulas in HTML.&lt;/p>
&lt;p>Specifically, it can display formulas like the following:&lt;/p>
$$f(x) = x^2 + x + 41$$
&lt;p>There seem to be other LaTeX-style math rendering libraries, but KaTeX is known for being simple and fast.&lt;/p>
&lt;h1 id="how-to-introduce-it-to-hugo">How to introduce it to Hugo
&lt;/h1>&lt;ol>
&lt;li>Create a new &lt;code>layouts/partials/math.html&lt;/code> in your Hugo folder hierarchy.&lt;/li>
&lt;/ol>
&lt;p>Make the contents as follows:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">&amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css&amp;#34; integrity=&amp;#34;sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0&amp;#34; crossorigin=&amp;#34;anonymous&amp;#34;&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&amp;lt;script defer src=&amp;#34;https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js&amp;#34; integrity=&amp;#34;sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4&amp;#34; crossorigin=&amp;#34;anonymous&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&amp;lt;script defer src=&amp;#34;https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js&amp;#34; integrity=&amp;#34;sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05&amp;#34; crossorigin=&amp;#34;anonymous&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&amp;lt;script&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">document.addEventListener(&amp;#34;DOMContentLoaded&amp;#34;, function() {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> renderMathInElement(
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> document.body,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> delimiters: [
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {left: &amp;#34;$$&amp;#34;, right: &amp;#34;$$&amp;#34;, display: true},
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {left: &amp;#34;\\[&amp;#34;, right: &amp;#34;\\]&amp;#34;, display: true},
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {left: &amp;#34;$&amp;#34;, right: &amp;#34;$&amp;#34;, display: false},
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> {left: &amp;#34;\\(&amp;#34;, right: &amp;#34;\\)&amp;#34;, display: false}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> });
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> });
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&amp;lt;/script&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="2">
&lt;li>Next, add the following code to the existing file &lt;code>layouts/partials/extend_head.html&lt;/code>.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">{{ if or .Params.math .Site.Params.math }}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{{ partial &amp;#34;math.html&amp;#34; . }}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">{{ end }}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="3">
&lt;li>Now you are ready to use KaTeX.&lt;/li>
&lt;/ol>
&lt;p>You can enable KaTeX by adding &lt;code>math: true&lt;/code> to the front matter of a page.&lt;/p>
&lt;ol start="4">
&lt;li>All you have to do is write formulas in LaTeX style in the body of the page article.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">$$ e^{i \pi} = -1 $$
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>If you describe it as above, it will be displayed as follows:&lt;/p>
$$ e^{i \pi} = -1 $$
&lt;h1 id="references">References
&lt;/h1>&lt;ul>
&lt;li>&lt;a class="link" href="https://reorx.github.io/hugo-PaperModX/docs/math-typesetting/" target="_blank" rel="noopener"
>Math Typesetting | PaperModX&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://katex.org/docs/autorender.html" target="_blank" rel="noopener"
>KaTex Auto-render Extension&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://www.storange.jp/2017/02/katex.html" target="_blank" rel="noopener"
>Introduction to KaTeX | The Strange Storage&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Solving the Traveling Salesperson Problem with Mathematica</title><link>http://kenji.blog/en/p/mathematica%E3%81%A7%E5%B7%A1%E5%9B%9E%E3%82%BB%E3%83%BC%E3%83%AB%E3%82%B9%E3%83%9E%E3%83%B3%E5%95%8F%E9%A1%8C%E3%82%92%E8%A7%A3%E3%81%8F/</link><pubDate>Wed, 12 Oct 2022 19:05:58 +0900</pubDate><guid>http://kenji.blog/en/p/mathematica%E3%81%A7%E5%B7%A1%E5%9B%9E%E3%82%BB%E3%83%BC%E3%83%AB%E3%82%B9%E3%83%9E%E3%83%B3%E5%95%8F%E9%A1%8C%E3%82%92%E8%A7%A3%E3%81%8F/</guid><description>&lt;img src="http://kenji.blog/p/mathematica%E3%81%A7%E5%B7%A1%E5%9B%9E%E3%82%BB%E3%83%BC%E3%83%AB%E3%82%B9%E3%83%9E%E3%83%B3%E5%95%8F%E9%A1%8C%E3%82%92%E8%A7%A3%E3%81%8F/img.png" alt="Featured image of post Solving the Traveling Salesperson Problem with Mathematica" />&lt;h1 id="solving-the-traveling-salesperson-problem-with-mathematica">Solving the Traveling Salesperson Problem with Mathematica
&lt;/h1>&lt;h2 id="problem">Problem
&lt;/h2>&lt;blockquote class="twitter-tweet">&lt;p lang="ja" dir="ltr">電車でこんな広告を見かけました😁📸 &lt;a href="https://t.co/iXEgvtXrpL">pic.twitter.com/iXEgvtXrpL&lt;/a>&lt;/p>&amp;mdash; 早稲田大学 早水桃子研究室 (@hayamizu_lab) &lt;a href="https://x.com/hayamizu_lab/status/1579806418982825984?ref_src=twsrc%5Etfw">October 11, 2022&lt;/a>&lt;/blockquote>
&lt;script async src="https://platform.x.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h2 id="solution">Solution
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">d=SparseArray[{{1,2}-&amp;gt;10,{2,1}-&amp;gt;10,{1,5}-&amp;gt;15,{5,1}-&amp;gt;15,{1,4}-&amp;gt;12,{4,1}-&amp;gt;12,{1,3}-&amp;gt;20,{3,1}-&amp;gt;20,{2,5}-&amp;gt;10,{5,2}-&amp;gt;10,{3,4}-&amp;gt;10,{4,3}-&amp;gt;10,{3,8}-&amp;gt;30,{8,3}-&amp;gt;30,{3,7}-&amp;gt;20,{7,3}-&amp;gt;20,{3,6}-&amp;gt;25,{6,3}-&amp;gt;25,{4,5}-&amp;gt;15,{5,4}-&amp;gt;15,{4,8}-&amp;gt;20,{8,4}-&amp;gt;20,{5,9}-&amp;gt;18,{9,5}-&amp;gt;18,{5,8}-&amp;gt;15,{8,5}-&amp;gt;15,{6,7}-&amp;gt;5,{7,6}-&amp;gt;5,{7,8}-&amp;gt;35,{8,7}-&amp;gt;35,{8,9}-&amp;gt;12,{9,8}-&amp;gt;12},{9,9},Infinity];
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>We create a matrix using the SparseArray function. Each element represents the distance between cities at the row and column of that element. For example, the first element &lt;code>{1,2}-&amp;gt;10&lt;/code> means the distance between 1 and 2 is 10. The second to last element &lt;code>{9,9}&lt;/code> indicates the size of the matrix, and the final element &lt;code>Infinity&lt;/code> means the length of paths between unspecified cities is infinite, meaning there is no path.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">{len,tour}=FindShortestTour[{1,2,3,4,5,6,7,8,9},DistanceFunction-&amp;gt;(d[[#1,#2]]&amp;amp;)]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>You can easily solve the traveling salesperson problem with the FindShortestTour function. &lt;code>{1,2,3,4,5,6,7,8,9}&lt;/code> represents the city numbers. &lt;code>DistanceFunction-&amp;gt;(d[[#1,#2]]&amp;amp;)&lt;/code> passes the matrix d which represents the distance between cities.&lt;/p>
&lt;h2 id="output">Output
&lt;/h2>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">{137, {1, 2, 5, 9, 8, 7, 6, 3, 4}}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The output gives the shortest distance and the tour route for it. The shortest distance is &lt;code>137&lt;/code>, and the route is &lt;code>1→2→5→9→8→7→6→3→4→1&lt;/code>. Converting this to ABC order gives &lt;code>A, B, E, I, H, G, F, C, D&lt;/code>.&lt;/p></description></item><item><title>Favorite Mathematical Formulas</title><link>http://kenji.blog/en/p/%E5%A5%BD%E3%81%8D%E3%81%AA%E6%95%B0%E5%BC%8F/</link><pubDate>Wed, 05 Oct 2022 13:24:50 +0900</pubDate><guid>http://kenji.blog/en/p/%E5%A5%BD%E3%81%8D%E3%81%AA%E6%95%B0%E5%BC%8F/</guid><description>&lt;img src="http://kenji.blog/p/%E5%A5%BD%E3%81%8D%E3%81%AA%E6%95%B0%E5%BC%8F/img.png" alt="Featured image of post Favorite Mathematical Formulas" />&lt;h2 id="wilsons-theorem">Wilson&amp;rsquo;s Theorem
&lt;/h2>&lt;p>When $p$ is a prime number, $(p−1)!≡−1 \pmod p$ holds.&lt;/p>
&lt;h2 id="eulers-formula">Euler&amp;rsquo;s Formula
&lt;/h2>&lt;p>$e^{iπ}+1=0$&lt;/p>
&lt;h2 id="fermats-last-theorem">Fermat&amp;rsquo;s Last Theorem
&lt;/h2>&lt;p>For any integer $n≥3$, there are no positive integer solutions $x, y, z$ to the equation $x^n+y^n=z^n$.&lt;/p>
&lt;h2 id="basel-problem">Basel Problem
&lt;/h2>&lt;p>$1/1^2+1/2^2+1/3^2+1/4^2+...=π^2/6$&lt;/p>
&lt;h2 id="eulers-prime-generating-polynomial">Euler&amp;rsquo;s Prime-Generating Polynomial
&lt;/h2>&lt;p>$n^2+n+41$ is a prime number for all integers $n$ from $0$ to $39$.&lt;/p></description></item><item><title>[Complete Mathematical Guide] Why the Ultimate Classical 'GNFS' Loses to Quantum Algorithms: The Paradigm Shift in Prime Factorization</title><link>http://kenji.blog/en/p/gnfs-to-shors-algorithm-math-deepdive/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://kenji.blog/en/p/gnfs-to-shors-algorithm-math-deepdive/</guid><description>&lt;img src="http://kenji.blog/p/gnfs-to-shors-algorithm-math-deepdive/quantum_vs_gnfs_eyecatch_1788616101508.jpg" alt="Featured image of post [Complete Mathematical Guide] Why the Ultimate Classical 'GNFS' Loses to Quantum Algorithms: The Paradigm Shift in Prime Factorization" />&lt;p>Information security in the modern internet society is protected by public-key cryptography, such as RSA cryptography. The basis for the security of RSA relies on the fact that &lt;strong>&amp;ldquo;the prime factorization of huge composite numbers is computationally extremely difficult.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>In this article, we will unravel the mathematical mechanism of the &lt;strong>&amp;ldquo;General Number Field Sieve&amp;rdquo;&lt;/strong> (GNFS), which is the most powerful prime factorization algorithm for classical computers. We will also dive deeply into why it is completely defeated by &lt;strong>&amp;ldquo;Shor&amp;rsquo;s Algorithm,&amp;rdquo;&lt;/strong> discovered by Peter Shor, exploring this paradigm shift thoroughly with mathematical formulas and conceptual diagrams.&lt;/p>
&lt;hr>
&lt;h2 id="1-the-approach-to-prime-factorization-in-classical-computing-evolution-from-fermats-factorization-method">1. The Approach to Prime Factorization in Classical Computing: Evolution from Fermat&amp;rsquo;s Factorization Method
&lt;/h2>&lt;p>The prime factorization problem is the problem of finding prime numbers $p$ and $q$ such that $N = p \times q$ for a given composite number $N$.&lt;/p>
&lt;p>The basic idea reduces to finding non-trivial $x$ and $y$ that satisfy the following congruence:&lt;/p>
$$ x^2 \equiv y^2 \pmod N $$
&lt;p>By rearranging this, we get:&lt;/p>
$$ x^2 - y^2 \equiv 0 \pmod N $$
$$ (x - y)(x + y) \equiv 0 \pmod N $$
&lt;p>Here, if $x \not\equiv \pm y \pmod N$, we can obtain a non-trivial factor of $N$ by calculating $\gcd(x-y, N)$ or $\gcd(x+y, N)$. This fact is the foundation of modern prime factorization algorithms like GNFS.&lt;/p>
&lt;hr>
&lt;h2 id="2-the-ultimate-classical-algorithm-the-depths-of-the-general-number-field-sieve-gnfs">2. The Ultimate Classical Algorithm: The Depths of the &amp;ldquo;General Number Field Sieve&amp;rdquo; (GNFS)
&lt;/h2>&lt;p>&lt;strong>&amp;ldquo;GNFS&amp;rdquo;&lt;/strong> is the fastest known prime factorization algorithm for classical computers today. Its time complexity requires sub-exponential time.&lt;/p>
&lt;h3 id="complexity-of-gnfs">Complexity of GNFS
&lt;/h3>&lt;p>Letting the number of digits (bits) of the number $N$ be $b = \log_2 N$, the computational complexity of GNFS is expressed as follows:&lt;/p>
$$ O\left( \exp \left( \left(\frac{64}{9} b\right)^{1/3} (\log b)^{2/3} \right) \right) $$
&lt;p>As can be seen from this formula, the computational complexity is not polynomial time, but &lt;strong>&amp;ldquo;sub-exponential time,&amp;rdquo;&lt;/strong> which is slightly slower than exponential time. Still, as the number of digits increases, the computation time grows astronomically.&lt;/p>
&lt;h3 id="mathematical-mechanism-of-gnfs">Mathematical Mechanism of GNFS
&lt;/h3>&lt;p>GNFS consists broadly of four steps:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Polynomial Selection&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Sieving&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Matrix Reduction&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Square Root&lt;/strong>&lt;/li>
&lt;/ol>
&lt;h4 id="21-polynomial-selection-and-number-fields">2.1. Polynomial Selection and Number Fields
&lt;/h4>&lt;p>First, we select irreducible polynomials $f(x)$ and $g(x)$ with integer coefficients. These are set to have a common root $m$ modulo $N$. That is,&lt;/p>
$$ f(m) \equiv 0 \pmod N $$
$$ g(m) \equiv 0 \pmod N $$
&lt;p>Usually, $g(x)$ is chosen as a linear polynomial $g(x) = x - m$. If we let $\alpha$ be a root of $f(x)$, a &lt;strong>&amp;ldquo;Number Field&amp;rdquo;&lt;/strong> $\mathbb{Q}(\alpha)$ is constructed. We compare operations in the ring of $\mathbb{Q}(\alpha)$ and operations in the normal integer ring $\mathbb{Z}$ through the homomorphism $\phi: \alpha \mapsto m$.&lt;/p>
&lt;h4 id="22-sieving">2.2. Sieving
&lt;/h4>&lt;p>Next, we search for a massive number of coprime integer pairs $(a, b)$. The goal is to find pairs such that the following two values are both &lt;strong>&amp;ldquo;B-smooth&amp;rdquo;&lt;/strong> (composed only of relatively small prime factors):&lt;/p>
&lt;ol>
&lt;li>$a - bm$ (value over the integer ring)&lt;/li>
&lt;li>$b^d f(a/b)$ (corresponding to the norm $N(a - b\alpha)$ over the number field)&lt;/li>
&lt;/ol>
&lt;p>Here, a high-speed search method called a &lt;strong>&amp;ldquo;Sieve&amp;rdquo;&lt;/strong> is used. This efficiently extracts $(a, b)$ pairs that satisfy the conditions from a vast number of candidates.&lt;/p>
&lt;h4 id="23-linear-algebra-over-gf2-matrix-reduction">2.3. Linear Algebra over GF(2) (Matrix Reduction)
&lt;/h4>&lt;p>From the collected pairs $(a, b)$, we construct exponent vectors and find the left null space of a massive sparse matrix over $\mathbb{F}_2$ (the field with only elements 0 and 1).&lt;/p>
&lt;p>We find a vector $v$ as a solution so that the relations $ \prod (a_i - b_i m) $ and $ \prod (a_i - b_i \alpha) $ both become squares. This is nothing but solving a system of linear equations:&lt;/p>
$$ M \mathbf{x} \equiv \mathbf{0} \pmod 2 $$
&lt;p>Advanced numerical algorithms such as the Block Lanczos Algorithm and the Block Wiedemann Algorithm are utilized here.&lt;/p>
&lt;h4 id="24-square-root">2.4. Square Root
&lt;/h4>&lt;p>Finally, we take square roots in both the number field and the integer ring to derive the relation $x^2 \equiv y^2 \pmod N$. Then, we calculate $\gcd(x-y, N)$ to obtain the factor.&lt;/p>
&lt;hr>
&lt;h2 id="3-the-breakthrough-by-quantum-computing-shors-algorithm">3. The Breakthrough by Quantum Computing: &amp;ldquo;Shor&amp;rsquo;s Algorithm&amp;rdquo;
&lt;/h2>&lt;p>While GNFS requires sub-exponential time, &lt;strong>&amp;ldquo;Shor&amp;rsquo;s Algorithm,&amp;rdquo;&lt;/strong> published by Peter Shor in 1994, can solve this problem in &lt;strong>&amp;ldquo;polynomial time&amp;rdquo;&lt;/strong> by using a quantum computer.&lt;/p>
&lt;h3 id="complexity-of-shors-algorithm">Complexity of Shor&amp;rsquo;s Algorithm
&lt;/h3>&lt;p>When the number of qubits is $O(\log N)$, the time complexity is as follows:&lt;/p>
$$ O((\log N)^3) $$
&lt;p>This means it does not cause an exponential explosion with respect to the number of bits. This is an astonishing result: even for huge composite numbers where the complexity of &lt;strong>&amp;ldquo;classical computing&amp;rdquo;&lt;/strong> exceeds the lifespan of the universe, they can be cracked in hours to days with &lt;strong>&amp;ldquo;quantum computing.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;h3 id="overview-of-shors-algorithm-reduction-to-the-period-finding-problem">Overview of Shor&amp;rsquo;s Algorithm: Reduction to the Period-Finding Problem
&lt;/h3>&lt;p>Shor&amp;rsquo;s algorithm cleverly reduces the prime factorization problem to a &lt;strong>&amp;ldquo;period-finding problem.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Choose a random integer $a$ coprime to $N$ ($1 &lt; a &lt; N$).&lt;/li>
&lt;li>Define the function $f(x) = a^x \bmod N$.&lt;/li>
&lt;li>Find the period $r$ of $f(x)$, i.e., the smallest positive integer $r$ such that $a^r \equiv 1 \pmod N$.&lt;/li>
&lt;li>If $r$ is even, check if $a^{r/2} \not\equiv -1 \pmod N$, and calculate $\gcd(a^{r/2} \pm 1, N)$ to obtain a prime factor.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>&amp;ldquo;Finding the period $r$&amp;rdquo;&lt;/strong> in step 3 is the bottleneck that requires exponential time on classical computers, but quantum computers solve this instantly using &lt;strong>&amp;ldquo;quantum superposition&amp;rdquo;&lt;/strong> and the &lt;strong>&amp;ldquo;Quantum Fourier Transform&amp;rdquo;&lt;/strong> (QFT).&lt;/p>
&lt;hr>
&lt;h2 id="4-quantum-fourier-transform-qft-and-period-extraction">4. Quantum Fourier Transform (QFT) and Period Extraction
&lt;/h2>&lt;p>Let&amp;rsquo;s look in detail with formulas at the manipulation of quantum states, which is the core of Shor&amp;rsquo;s algorithm.&lt;/p>
&lt;h3 id="41-generation-of-quantum-superposition">4.1. Generation of Quantum Superposition
&lt;/h3>&lt;p>First, we prepare two quantum registers. Register 1 holds a superposition state of inputs $x$, and Register 2 holds the computation result $f(x)$. We apply the Hadamard Transform to the initial state $|0\rangle |0\rangle$ to create a superposition of all possible $x$.&lt;/p>
$$ |\psi_1\rangle = \frac{1}{\sqrt{Q}} \sum_{x=0}^{Q-1} |x\rangle |0\rangle $$
&lt;p>
(Here $Q$ is a power of 2 satisfying $N^2 \le Q &lt; 2N^2$)&lt;/p>
&lt;p>Next, we use a quantum oracle $U_f$ to compute $f(x) = a^x \bmod N$ and store it in Register 2.&lt;/p>
$$ |\psi_2\rangle = U_f |\psi_1\rangle = \frac{1}{\sqrt{Q}} \sum_{x=0}^{Q-1} |x\rangle |a^x \bmod N\rangle $$
&lt;p>Let&amp;rsquo;s assume here that we measure Register 2 (in reality, the mathematical structure is the same even without measurement). If a value $y = a^{x_0} \bmod N$ is observed, the state of Register 1 collapses into a superposition of all $x$ such that $f(x) = y$. Letting the period be $r$, such $x$ are $x_0, x_0 + r, x_0 + 2r, \dots$&lt;/p>
$$ |\psi_3\rangle = \frac{1}{\sqrt{M}} \sum_{k=0}^{M-1} |x_0 + kr\rangle $$
&lt;p>
(Here $M \approx Q/r$ is the number of terms)&lt;/p>
&lt;p>This state inherently contains information about the period $r$, but direct measurement will only yield a random $x_0 + kr$, and the period $r$ remains unknown. This is where QFT comes in.&lt;/p>
&lt;h3 id="42-application-of-the-quantum-fourier-transform-qft">4.2. Application of the Quantum Fourier Transform (QFT)
&lt;/h3>&lt;p>QFT is an operation that performs a discrete Fourier transform on the amplitudes of quantum states. The action of QFT on state $|x\rangle$ is defined as follows:&lt;/p>
$$ \text{QFT} |x\rangle = \frac{1}{\sqrt{Q}} \sum_{y=0}^{Q-1} e^{2\pi i \frac{xy}{Q}} |y\rangle $$
&lt;p>When this is applied to $|\psi_3\rangle$, phase interference (quantum interference) occurs.&lt;/p>
$$ |\psi_4\rangle = \text{QFT} |\psi_3\rangle = \frac{1}{\sqrt{MQ}} \sum_{y=0}^{Q-1} \sum_{k=0}^{M-1} e^{2\pi i \frac{(x_0 + kr)y}{Q}} |y\rangle $$
&lt;p>Expanding the sum in this equation reveals the part:&lt;/p>
$$ \sum_{k=0}^{M-1} e^{2\pi i \frac{kry}{Q}} $$
&lt;p>This sum of a geometric series reinforces each other (Constructive Interference) only when $ry/Q$ is close to an integer, and cancels each other out (Destructive Interference) otherwise.&lt;/p>
&lt;p>Therefore, the state $|y\rangle$ measured with high probability will be an integer $y$ that satisfies the condition:&lt;/p>
$$ \frac{y}{Q} \approx \frac{c}{r} $$
&lt;p>(where $c$ is some integer).&lt;/p>
&lt;h3 id="43-identifying-the-period-via-continued-fraction-expansion">4.3. Identifying the Period via Continued Fraction Expansion
&lt;/h3>&lt;p>After obtaining $y$ through measurement, we perform a &lt;strong>&amp;ldquo;Continued Fraction Expansion&amp;rdquo;&lt;/strong> of $y/Q$ using a classical computer. This allows us to calculate the convergent fraction $c/r$ of $y/Q$, and extract candidates for the period $r$ from the denominator with high efficiency.&lt;/p>
&lt;hr>
&lt;h2 id="5-comparison-of-conceptual-models-and-the-paradigm-shift">5. Comparison of Conceptual Models and the Paradigm Shift
&lt;/h2>&lt;p>To intuitively understand the difference between GNFS and Shor&amp;rsquo;s algorithm, we present a conceptual diagram using Mermaid notation.&lt;/p>
&lt;h3 id="conceptual-diagram-of-shors-algorithm-via-quantum-circuit">Conceptual Diagram of Shor&amp;rsquo;s Algorithm via Quantum Circuit
&lt;/h3>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">graph TD
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> A[Initial State: 0...0] --&amp;gt; B[Superposition of all states via Hadamard Transform]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> B --&amp;gt; C[Modular exponentiation a^x mod N]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> C --&amp;gt;|Quantum Entanglement| D[Collapse to a state with periodicity]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> D --&amp;gt; E[Quantum Fourier Transform QFT]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> E --&amp;gt;|Probability amplification via interference| F[Measurement: Obtain y]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> F --&amp;gt; G[Classical processing: Continued Fraction Expansion]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> G --&amp;gt; H[Discovery of period r]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> H --&amp;gt; I[Calculate prime factors of N]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> style A fill:#f9f,stroke:#333,stroke-width:2px
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> style E fill:#bbf,stroke:#333,stroke-width:2px
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> style I fill:#bfb,stroke:#333,stroke-width:2px
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="the-essence-of-the-paradigm-shift">The Essence of the Paradigm Shift
&lt;/h3>&lt;p>GNFS takes the approach of &lt;strong>&amp;ldquo;searching for relations within a mathematical space (number field).&amp;rdquo;&lt;/strong> However, since the search space expands exponentially with the number of digits, it becomes virtually unsolvable for classical computer capabilities (even including parallelization) when the key length exceeds 2048 bits.&lt;/p>
&lt;p>On the other hand, Shor&amp;rsquo;s algorithm utilizes the &lt;strong>&amp;ldquo;wave nature of quantum interference.&amp;rdquo;&lt;/strong> It simultaneously evaluates all computation paths in a superposition state, uses QFT to cancel out (destructively interfere) unnecessary answers, and amplifies (constructively interferes) only the probability amplitude of the period that is the correct answer. Through this, instead of searching space, it realizes a completely different dimensional approach of &lt;strong>&amp;ldquo;making the correct answer itself surface.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;h2 id="6-summary">6. Summary
&lt;/h2>&lt;p>In this article, we deeply compared the mathematical backgrounds and algorithmic structures of &lt;strong>&amp;ldquo;GNFS,&amp;rdquo;&lt;/strong> the pinnacle of classical limits, and &lt;strong>&amp;ldquo;Shor&amp;rsquo;s Algorithm,&amp;rdquo;&lt;/strong> which demonstrates the power of quantum computing.&lt;/p>
&lt;p>While GNFS drove computational complexity down to sub-exponential time by employing mathematical tricks such as polynomial selection and massive matrix calculations, Shor&amp;rsquo;s algorithm fused the fundamental principles of quantum mechanics—superposition and interference—with a mathematical tool (QFT), achieving a breakthrough to polynomial time in one stroke.&lt;/p>
&lt;p>Currently, Fault-Tolerant Quantum Computers (FTQC) capable of executing Shor&amp;rsquo;s algorithm at a practical scale (thousands of qubits) do not exist. However, the very existence of this mathematical and theoretical paradigm shift is the primary reason why the transition to Post-Quantum Cryptography (PQC) is urgently being accelerated worldwide today.&lt;/p></description></item></channel></rss>