Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 2,394 posts.

Any year
2284

Two-part Rubik's algorithms

When Rubik’s Cube first appeared decades ago, I jumped on it. I bought one, and spent an entire summer fiddling with it. Over that summer, I developed a solving technique that has stuck with me. My technique is not the fastest; that was never the goal. My algorithms make sense to me because they are constructed, and…

2287

Side-stepping the Secretary Problem, unwittingly

Having played both parts in the kabuki play that is employee-employer matchmaking, I feel the way we play it is a zero-sum game. I wish it were not so. When this post started life in 2024, as a wall of text chat message, it was brutal out there, on both sides of the software industry interview table. The ZIRP had…

2293

Papers I like (part 2)

Continued from part 1. Once I was about a thousand words into describing background for GEMM, it became pretty clear that it made more sense to group the numerical math papers into one post, so her…

2294

Mathematically correct but psychologically wrong

The snowball strategy says to pay off your smallest debt first, then the next smallest, and so on until you're out of debt. When I first heard of this I thought it was silly. Clearly the optimal strategy is to pay off the debt with the highest interest rate first. That assessment is mathematically correct,

2295

Divisibility by 7

How can you tell whether a number is divisible by 7? Almost everyone knows how to easily tell whether a number is divisible by 2, 3, 5, or 9. A few less know tricks for testing divisibility by 4, 6, 8, or 11. But not many people have ever seen a trick for testing divisibility

2296

P vs. NP for Dummies

A reader named Darren commented on my last post: I have this feeling that this whole P and NP thing is not only a profound problem that needs solving, but something that can be infinitely curious t…

2300

The New Science of Causation

It seems like each new day brings another one of those headlines: regular sleep “linked to” life expectancy, playing video games “associated with” surgical prowess, bullies “at risk” of becoming criminals, and “does breastfeeding reduce a baby’s blood pressure?” (the old rhetorical question gambit). Sometimes the…

2304

SciPy - the embarrassing way to code

I’ve programmed in many languages before, indeed I’ve spent at least a year working in Basic, C, C++, C#, java, assembler, modula-2, powerhouse and prolog. One thing I’ve never done before is Matlab, well except a few basic exercises for some course I did way back. A couple of years ago I started using python and more…

2308

52 Factorial

They seem harmless enough, 52 thin slices of laminated cardboard with colorful designs printed on their sides. Yet, as another illustration of the mantra that complexity begins from the most simple systems, the number of variations that these 52 cards can produce is virtually endless. The richness of most playing card…