Topics /

Math & Algorithms

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

2022
99

What Are the Odds?

An unusual lottery result made the news recently: on October 1, 2022, the PCSO Grand Lotto in the Philippines, which draws six numbers from $latex {1}&fg=000000$ to $latex {55}&fg=000000$ a…

102

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…

103

The Algorithm for Hard Problems: Shake and Pull Gently

(Or, “regularized greedy algorithms and their applications.”) James Gilles “Algorithm” is one of those words that sounds fancier than it really deserves. We hear all the time about the “facebook algorithm”, the “youtube algorithm”, “high frequency trading algorithms”, “artificial intelligence algorithms”, and so on…

106

How thick is a three-sided coin?

Matt Parker, employing the enviably pithy prose typical of a content creator forged on the unforgiving fires of social media, asked the simple question back in 2018: > How thick is a three-sided coin? Translated into mathematician-ese, this means > What aspect ratio of a flipped coin leads to the chance of landing on…

109

Ramanujan Factorial Approximation (2012)

Ramanujan came up with an approximation for factorial that resembles Stirling's famous approximation but is much more accurate. As with Stirling's approximation, the relative error in Ramanujan's approximation decreases as n gets larger. Typically these approximations are not useful for small values of n. For n = 5…

110

A pair of dice which never roll 7 (2004)

Some friends of mine play the board game Settlers Of Catan . In this game, each player rolls two ordinary dice on their turn, and the number which comes up determines what resources people get for the turn. When a seven is rolled, something special happens: no resources are generated, and instead a robber moves on the…

118

Understanding Convolutions in Probability

In this post we take a look a how the mathematical idea of a convolution is used in probability. In probability a convolution is a way to add two random variables. Using a slightly ridiculous, mad-science, example we walk through multiple way to compute a convolution and ultimate arrive at the formu