Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.
Dates That Don't Exist (2015)
In 1582, under the inter gravissimas papal bull, the Catholic world transitioned from the Julian Calendar to the Gregorian Calendar . This new calendar shortened the length of the year from 365.25 days to 365.2425 , a reduction of just 0.002% .
A Tale of Java Hash Tables
The intended audience for this article is undergrad students who already have a good grasp of Java, or seasoned Java developers who would like to explore an in-depth analysis of various hash table implementations that use Open Addressing. The reader should be familiar with Java generics, collections, basic data…
Abacus use can boost math skills
The abacus counting device dates back thousands of years but has, in the past century, been replaced by calculators and computers. But studies show that abacus
Revisiting Moneyball
Data, sports, payrolls, and memes
A Perceptron in Age of Empires II
An operational NAND gate in Age of Empires II , built with the game's scenario editor. This one can also be built within the game in a two-player setup but it's a lot easier (so to speak) to just script it.
Arithmetic Without Numbers – How LLMs Do Math
What happens inside an LLM when it tries to calculate with nothing but matrices.
The Intel 8087 chip: floating-point addition and subtraction
In 1980, Intel introduced the 8087, a chip that made floating-point operations much faster in the IBM PC and other systems. Although the 808...
Breaking Pills
From the highly eclectic blog of Mark Dominus
Rathbun's Operator
First, I’m a human typing this post. I’m not going to tell you who I am. Sure, many will say that is cowardly and fair, but I actually don’t think it would bring much value. What matters more is that I describe why, and what I did and didn’t do during the last two weeks or so with the OpenClaw agent I set up, known as…
Twenty questions is a weird game
Let’s play a game. I’m thinking of a number from 1 to 100. You guess, and I tell you whether my number is higher or lower.
A Bridge Too Far: E.W. Dijkstra and Logic
1. Introduction Shortly after the death of E.W. Dijkstra (1930-2002), K.R. Apt wrote an obituary under the title Portrait of a Genius [1]. At the time it seemed to me a bit over the top. Now, with …
Structuralism as a Philosophy of Mathematics
For mathematical insight, according to the structuralist imperative, investigate mathematical structure and consider mathematical concepts only as invariant under isomorphism.
The Dawn of Formalized Mathematics
Here are the slides of my talk “The dawn of formalized mathematics” from the 8th European Congress of Mathematics , which is taking place online and in Protorož, Slovenia, from June 20 to 26, 2021:
Worst Puzzle Ever (2009)
It breaks my heart to write this post because the puzzle in question was 1) very expensive and 2) given to me by someone very dear to me who...
Breaking the Zyzzyva encryption
The article here sums up pretty well the debacle that North American tournament Scrabble players have been faced with since the…
Shannon’s Source Coding Theorem (2020)
The mathematical field of information theory attempts to mathematically describe the concept of “information”. In the first two posts, we discussed the concepts of self-information and information entropy. In this post, we step through Shannon’s Source Coding Theorem to see how the information entropy of a probability…
Squaring two digit numbers in your head
All my life I've done mental arithmetic the 'wrong way': I've calculated from left-to-right, instead of right-to-left. So when I do somethi...
Prime After Prime
Are the prime numbers sprinkled randomly along the number line, like windblown seeds? Of course not: Primality is not a matter of chance but a product of simple arithmetic. A number is prime if and only if no smaller positive integer other than 1 divides it evenly.
Watertight vector maps from raster images
Or, “how not to GIS”.
All 23-Bit Still Lifes Are Glider Constructible
In the Game of Life, which still lifes can be produced by crashing gliders together? We’ve known for a few years that the answer cannot be “all of them”, because in 2022 Ilkka Törmä and Ville Salo found a patch of still life that, if it exists in the universe, must have existed since the beginning of time. And so…
The Amazing Power of Word Vectors (2016)
For today’s post, I’ve drawn material not just from one paper, but from five! The subject matter is ‘word2vec’ – the work of Mikolov et al. at Google on efficient vect…
Basketball has evolved into a game of calculated decision-making
Basketball has evolved into a game of calculated decision-making. From a game of points, assists, and rebounds, it has progressed into using thousands of data points to optimize every element of the game.
How does your programming language handle “minus zero” (-0.0)?
The ubiquitous IEEE floating-point standard defines two numbers to represent zero, the positive and the negative zeros. You also have the positive and negative infinity. If you compute the inverse of the positive zero, you get the positive infinity. If you compute the inverse of the negative zero, you get the negative…
The two cultures of mathematics and biology
I’m a (50%) professor of mathematics and (50%) professor of molecular & cell biology at UC Berkeley. There have been plenty of days when I have spent the working hours with biologists and…