Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 212 posts.

2025
98

Lánczos Interpolation Explained (2022)

When you resize, rotate, or in any way transform an image; or more generally when you resample some discrete signal, the software you are using must _interpolate_ between the discrete points to produce a result. Linear and cubic interpolation are easy to explain, but Lánczos interpolation, one of the most popular…

102

Entropy of a Large Language Model output

Large language models like ChatGPT & Claude have become ubiquitous in today’s world. I visited a friend for the New years eve and was impressed by how ChatGPT was being extensively used within the family. The friend’s little kid is going to grow up in a world, where turning to large language models (LLM) for quick…

105

Erdős Problem #1026

Problem 1026 on the Erdős problem web site recently got solved through an interesting combination of existing literature, online collaboration, and AI tools. The purpose of this blog post is to try…

106

My favourite small hash table

I'm the kind of person who thinks about the design and implementation of hash tables. One design which I find particularly cute, and I think deserves a bit more publicity, is Robin Hood open-addressing with linear probing and power-of-two table size. If you're not familiar with hash table terminology, that might look…

109

CRDT: Text Buffer

Collaboratively editing strings of text is a common desire in peer-to-peer applications. For example, a note-taking app might represent each document as a single collaboratively-edited string of text.

113

Learn you Galois fields for great good (2023)

This is the introduction to a series on Abstract Algebra. In particular, our focus will be on Galois Fields (also known as Finite Fields) and their applications in Computer Science. This is a project I've been excited about for many years now, but have been too busy to dedicate the adequate effort to meet my…

114

Beautiful Abelian Sandpiles

I can't remember where I first saw them, but ever since, I have been unable to forget them: abelian sandpiles. I'm far from the only one . They're remarkably simple, yet produce lovely symmetric patterns. I loved them so much that I adorned the title banner of this blog with an animation of an abelian sandpile. But…

118

Hilbert space: Treating functions as vectors

The tools of linear algebra are extremely useful when working in Euclidean space (e.g. \mathbb{R}^3 ). Wouldn’t it be great if we could apply these tools to additional mathematical constructs, such as functions and sequences? Hilbert space allows us to do exactly this - apply linear algebra to functions.

119

Sorting algorithms with CUDA

Building on my previous post on sorting algorithms, I implemented the same algorithms using CUDA to explore performance improvements through parallel computing. The goal is to see how we can leverage the power of parallel computing to speed up our sorting algorithms. I went for a NVIDIA recruiting event some days ago…

120

Unparalleled Misalignments

This is a list of Unparalleled Misalignments, pairs of non-synonymous phrases where the words in one phrase are each synonyms of the words in the other. I've maintained this list since 2018; attributions (when known) can be seen on hover.