From cab44e03d3fdc2f1d6eba7c81b8e07162f2c5cd2 Mon Sep 17 00:00:00 2001 From: filifa Date: Sun, 27 Jul 2025 14:16:03 -0400 Subject: [PATCH] add page description --- eulerbooks/eulerbooks.html | 52 +++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/eulerbooks/eulerbooks.html b/eulerbooks/eulerbooks.html index 28d275a..4a3efe4 100644 --- a/eulerbooks/eulerbooks.html +++ b/eulerbooks/eulerbooks.html @@ -14,7 +14,57 @@
-

Eulerbooks

+

Eulerbooks

+

This is a collection of Jupyter notebooks containing solutions and + discussions for the first 100 Project Euler problems using SageMath.

+ +

My main goal with these notebooks is not simply to provide working + code for solving the problems. Frequently, solutions to these problems + are short, but they’re not always easy to follow without understanding + some important mathematical principles. Therefore, my aim is to provide + insight into the underlying algorithms and mathematical concepts that + make an efficient solution possible. I personally find that these + topics are frequently even more interesting than the problems + themselves, which I see as mainly existing to provide situations to + apply the concepts after learning about them. In short, it’s more about + the journey, not the destination, so these notebooks mainly exist to + discuss the former.

+ +

Approach

+

Frequently, either Python or SageMath provide functions and + libraries that make it trivially easy to write a solution. I don’t have + a problem with presenting solutions that use these, since for practical + purposes, it’s better to use what’s already available than to reinvent + the wheel. It also tends to lead to code that is easy to read and + understand, which is the best kind of code.

+ +

However, when a function already exists that does the heavy lifting, + I also tend to provide my own basic implementation and an explanation + of why it works. This is especially true if a solution or algorithm is + based off of an important mathematical concept that is not especially + intuitive.

+ +

When not especially tedious, I like writing up solutions that do not + require programming at all, since these approaches often require + interesting mathematical techniques.

+ +

Another thing to note is that I don’t prioritize a solution’s + performance above all. When a solution is fast enough (using Project + Euler’s own “one-minute rule” as a rule of thumb), I instead usually + focus on making the code easy to read. You can basically always + optimize, but there are frequently diminishing returns, and it tends to + negatively impact readability. Once a solution is fast enough to solve + the problem at hand, I only consider optimizing further if the concepts + are reusable.

+ +

Solutions

+

Solutions are provided as non-interactive HTML renderings that you + can view directly in your browser. Alternatively, you can download the + Jupyter notebooks to play with them yourself. I've also marked some of + my favorite problems.

+
Project Euler solutions