我的数学回归
My Mathematical Regression

原始链接: https://blog.dahl.dev/posts/my-mathematical-regression/

回顾一个十年前的欧拉计划(Project Euler)代码仓库时,作者发现了一份关于“第15题”的存档,这揭示了过去与现在的自己之间惊人的反差。 作者指出,现代开发者在面对此类编程挑战时,可能会本能地选择使用 Python、暴力破解或人工智能辅助,但学生时代的作者却完全绕过了编程。相反,他们识别出了其中的数学模式,将这一网格问题定义为经典的二项式系数计算——具体来说,就是中心二项式系数 $\binom{2n}{n}$。 这一发现引发了对“丧失”智力敏锐度的忧郁反思。作者将这种经历比作发现古老而被人遗忘的知识,却意识到这些“古人”其实就是曾经那个更敏锐的自己。面对这种因过度依赖现代工具而导致基础解决问题能力退化的现实,作者打趣道,他们只能靠制作表情包来缓解这种怀旧之情。

Hacker News最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交登录我的数学回归 (dahl.dev)11 分,由 aleda145 于 1 小时前发布 | 隐藏 | 过往 | 收藏 | 讨论 帮助 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

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.

Problem 15

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
there are 6 solutions to the 2x2 grid
there are 2 solutions to 1x1 grid
there are 20 solutions to a 3x3 grid
this follows the pattern of (2n) choose n
so (2*20) choose 20 = 137846528820

(If you aren’t familiar with discrete math, see the binomial coefficient for syntax)

I’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’s just me when I was in school.

I remixed this picture to cope.

AI life skills
联系我们 contact @ memedata.com