Topics /

Math & Algorithms

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

2022
121

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…

125

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…

126

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…

134

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

137

Against Bayesianism – David Deutsch

Bayesianism, the doctrine that it's always rational to represent our beliefs in terms of probabilities, dominates the intellectual world, from decision theory to the philosophy of science. But does it make sense to quantify our beliefs about such ineffable things as scientific theories or the future? And what separates

139

An Algorithm for Polygon Intersections

In this post we'll work our way towards an algorithm that can compute convex polygon intersections. We'll also explore a method for intersections between axis-aligned rectangles, a function that can determine the intersection of two line segments, as well as a point in polygon test.

143

Discovering Novel Algorithms with AlphaTensor

In our paper, published today in Nature, we introduce AlphaTensor, the first artificial intelligence (AI) system for discovering novel, efficient, and provably correct algorithms for fundamental tasks such as matrix multiplication. This sheds light on a 50-year-old open question in mathematics about finding the…

147

Binary Lambda Calculus (2020)

Binary lambda calculus ( BLC ) is a minimal, pure functional programming language invented by John Tromp in 2004, 1 based on a binary encoding of the untyped lambda calculus in De Bruijn index notation.