Topics /

Math & Algorithms

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

Any year
1806

Let’s talk about PAKE

The first rule of PAKE is: nobody ever wants to talk about PAKE. The second rule of PAKE is that this is a shame, because PAKE — which stands for Password Authenticated Key Exchange — is actually o…

1808

Encoding tic-tac-toe in 15 bits

I recently stumbled upon a blog post by Alejandra González (a.k.a @blyxyas) that seeks to compress a tic-tac-toe game state into as few bits as possible. She arrived at a solution in 18 bits. This got me thinking, can we do better?

1813

Principal Component Analysis

In the previous article in this series we distinguished between two kinds of unsupervised learning (cluster analysis and dimensionality reduction) and discussed the former in some detail. In this installment we turn our attention to the later. In dimensionality reduction we seek a function $f : \mathbb{R}^n \mapsto…

1815

Solving Probabilistic Tic-Tac-Toe

This morning, I came accross Cameron Sun’s Probabilistic Tic-Tac-Toe on HN . However, the comments were disappointing, with people proposing probabilistic models, linear programming, minimax algorithms, and heuristic evaluations to develop AI approaches for the game, none of which quite correct. In this post, I’ll…

1817

Fast Perfect Hashing

A perfect hash function is one that is collision-free. By implication, the hash must be at least as many bytes as the key and the function is theoretically reversible, though not always tractably so. In other words, perfect hashing is a special case of encryption. Because the hash is no smaller than the key, the…

1818

How to make fake data look meaningful

If you are trying to trick somebody with your data, never share the raw data; only share the conclusions. Bonus points if you can’t share the data because it is somehow priviledged or a trade secret. The last thing you want is to allow other people to evaluate your analysis and possibly challenge your conclusions.

1821

Shenanigans With Hash Tables

One reason to know how your data structures work is so that when your problem has unusual constraints you can tweak how they work to fit the problem better or work faster. In this article I’ll talk about four different fun tweaks to the concept of a hash table that I made in the process of using hash tables to…

1823

Consistency Models

Jepsen analyzes the safety properties of distributed systems–most notably, identifying violations of consistency models. But what are consistency models? What phenomena do they allow? What kind of consistency does a given program really need?

1824

Efficient simulation through linear algebra

I spent a lot of time working on a project in which physically plausible simulation of soft materials with pressure chambers was a key part, and in doing so, we managed to improve a part of our simulation by a significant amount. I was very happy with how this small part of the whole system turned out, and I've been…

1826

The case against geometric algebra (2024)

Every once in a while the internet gets talking about Geometric Algebra (henceforth GA) and how it’s a new theory of math that fixes everything that’s wrong with linear algebra and multivariable calculus. When I come across this stance I am compelled to respond with something like: “wait wait, it’s not true! GA is…