My Mathematical Regression

aleda1451 pts0 comments

My Mathematical Regression :: blog.dahl.dev

My Mathematical Regression

2026-06-19

:: Alex Dahl

I came across my 10 year old repo for project Euler solutions. (N.B! Euler spoilers onwards).

Naturally it’s full of python files. One file stood out. It was just called problem15.txt.

I pulled up the problem.

I imagined getting this at work. I think I would reach for python. Maybe start with a naive brute force. Throw a bunch of loops together. If that didn’t solve it, reach for memoization. Dynamic programming, let’s go! (this is just me fantasizing. At work I would just give it to an AI and continue with my day)

And let’s see how I solved it when I was still an engineering student

problem15.txt⌗

doesnt even need to program anything for this problem<br>there are 6 solutions to the 2x2 grid<br>there are 2 solutions to 1x1 grid<br>there are 20 solutions to a 3x3 grid<br>this follows the pattern of (2n) choose n<br>so (2*20) choose 20 = 137846528820<br>(If you aren&rsquo;t familiar with discrete math, see the binomial coefficient for syntax)

I&rsquo;m impressed by past self! And present me became sad. It feels like an Asimov book where the main character finds past knowledge, codified by the ancients. But it&rsquo;s just me when I was in school.

I remixed this picture to cope.

Read other posts

Brevity as a human advantage

rsquo solutions mathematical regression grid dahl

Related Articles