Topics /

Math & Algorithms

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

2022
154

Making all your integers positive with zigzag encoding

You sometimes feel the need to make all of your integers positive, without losing any information. That is, you want to map all of your integers from 'signed' integers (e.g., -1, 1, 3, -3) to 'unsigned integers' (e.g., 3,2,6,7). This could be useful if you have a fast function to compress integers that fails to ……

164

Deconstructing Bézier Curves

Graphists, animators, game programmers, font designers, and other graphics professionals and enthusiasts are often working with Bézier curves. They're popular, extensively documented, and used pretty much everywhere. That being said, I find them being explained almost exclusively in 2 or 3 dimensions, which can be a…

166

Noether's Theorem in a Nutshell (2020)

Noether's theorem is an amazing result which lets physicists get conserved quantities from symmetries of the laws of nature. Time translation symmetry gives conservation of energy; space translation symmetry gives conservation of momentum; rotation symmetry gives conservation of angular momentum, and so on.

171

Torsors (2010)

When you first read about "torsors", they're bound to seem a bit too darn sophisticated for their own good. Mostly this is because nobody explains them very well. So, I want to convince you that they're actually very simple and natural. I'll do this by giving you three examples from physics: