Topics /

Math & Algorithms

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

Any year
1712

Feynman vs. The Abacus

A Japanese man came into the restaurant. I had seen him before, wandering around; he was trying to sell abacuses. He started to talk to the waiters, and challenged them: He said he could add numbers faster than any of them could do.

1715

Compiling with Constraints

There are lots of interesting little subproblems in compilation like instruction selection, register allocation and instruction scheduling. These can be expressed in declarative interlinked way to constraint solvers.

1718

Understanding gradient descent

Gradient descent is a standard tool for optimizing complex functions iteratively within a computer program. Its goal is: given some arbitrary function, find a minumum. For some small subset of functions - those that are convex - there's just a single minumum which also happens to be global. For most realistic…

1721

Legendre transform, better explained (2017)

The way that most physicists teach and talk about partial differential equations is horrible, and has surprisingly big costs for the typical understanding of the foundations of the field even among professionals. The chief victims are students of thermodynamics and analytical mechanics, and I've me

1726

Twenty Proofs of Euler's Formula: V-E+F=2

Many theorems in mathematics are important enough that they have been proved repeatedly in surprisingly many different ways. Examples of this include the existence of infinitely many prime numbers , the evaluation of \(\zeta(2)\), the fundamental theorem of algebra (polynomials have roots), quadratic reciprocity (a…

1729

An alternative construction of Shannon entropy

The underpinning of information theory is Shannon’s formula for the entropy H of a discrete probability distribution P. Derived in 1948 in the paper “A mathematical theory of communication”, this is given by \[ H[P] = -\sum_{i=1}^N p_i \log p_i \] where \( p_i = p(x_i) \) is the probability of sampling \( x_i \) from…

1739

The Future of Mathematics

[This is a guest post by Jeremy Avigad. This blog post was initially written in a different file format and converted using AI. — T.] “Mathematics underwent, in the nineteenth century, …

1740

Rediscovering Quaternions

How do we represent a rotation in 3 dimensions? This is a surprisingly deep question, and one we can learn a lot from. Our goal will be to “rediscover” quaternions from first principles, building them up by exploring different representations and fixing the failures along the way.