Topics /

Math & Algorithms

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

Any year
2374

The Busy Beaver Game

This month, a bunch of ‘logic hackers’ have been seeking to determine the precise boundary between the knowable and the unknowable. The challenge has been around for a long time. But on…

2376

Decision Table Patterns

Decision tables are easy, simple, and powerful. You can teach them in five minutes and write one in half that time. You can look at a table and understand what it’s saying, see if it matches your problem, and check for design flaws. So it’s kinda weird that there’s basically nothing about them online. I wrote an…

2379

RSA: Theory and Implementation

RSA has been a staple of public key cryptography for over 40 years, and is still being used today for some tasks in the newest TLS 1.3 standard. This post describes the theory behind RSA - the math that makes it work, as well as some practical considerations; it also presents a complete implementation of RSA key…

2389

Zero-allocation Trie Traversal

As part of a demonstration in an upcoming article , I wrote a simple trie implementation. A trie is a search tree where the keys are a sequence of symbols (i.e. strings). Strings with a common prefix share an initial path down the trie, and the keys themselves are stored implicitly by the structure of the trie. It’s…

2395

Million Times Million

Is a million times a million a billion or is it a trillion ? For my entire childhood, it was a billion, only for me to grow up and realise, as an adult, that it had better be a trillion!

2397

Two Workers Are Quadratically Better Than One

For latency, anyway. A common architecture pattern is the “task queue”: tasks enter an ordered queue, workers pop tasks and process them. This pattern is used everywhere from distributed systems to thread pools. It applies just as well to human systems, like waiting in line at a supermarket or a bank. Task queues are…