Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 266 posts.
The Point of the Banach Tarski Theorem (2015)
One of my favourite Limited Audience Jokes (although technically it's actually a riddle) goes:
Harvard Railroad Economics Exam (1906)
Final exam from Dr. Stuart Daggett's Harvard economics course on Railroad Practice taught in 1906-07.
Spherical Harmonics
3D visualization tool of spherical harmonics. Visualize and compare real, imaginary, and complex components by adjusting the degree l and order m parameters.
Bresenham's Circle Drawing Algorithm (2021)
Once upon a time I was given the following problem for a technical programming interview:
Speeding Slows You Down (By a Lot)
I often drive between Boston and New Haven. While on the road, I find myself pondering a simple question: If my only goal is to arrive as fast as possible, how fast should I drive? Ignoring things …
Randomness extractors: making fair coins out of biased coins
I discuss various models of biased bit sequences, and how to extract uniform random (or close to it) output bit sequences from them, illustrated with Python code.
Solving puzzles faster than humanly possible
Can anyone solve 1000 Opus Magnum puzzles in 24 hours? What about with assistance from bots? Will the solutions be any good? Let's find out!
A Hamiltonian Circuit for Rubik's Cube
At last, the Hamiltonian circuit problem for Rubik's Cube has a solution! To be a little more mathematically precise, a Hamiltonian circuit of the quarter-turn metric Cayley graph for the Rubik's Cube group has been found.
Fractran: Computer architecture based on the multiplication of fractions
By Devine Lu Linvega
What are the "worst" spelling bee pangrams?
Thomas Ptacek wondered on mastodon whether there were any Spelling Bee pangrams that would get you to the highest scoring level on spelling bee just by finding that word.
Penrose Mazes (2020)
Mazes are typically constructed on regular grids: square, triangular, hexagonal, etc. But what if you generate a maze on top of a Penrose tiling, which is guaranteed to be irregular? (It is an aperiodic tiling .) The resulting mazes have a very characteristic appearance: they are filled with circles and stars, but the…
The theory of concatenative combinators (2007)
This article attempts to outline, in informal terms, a new theory of combinators, related to the theory of Combinatory Logic pioneered by Moses Schonfinkel, Haskell Curry, and others in the 1930s. Although not essential, an understanding of the classical theory of combinators may be helpful (see the links at the…
Why Python's integer division floors (2010)
I was asked (again) today to explain why integer division in Python returns the floor of the result instead of truncating towards zero like...
The Algorithm Behind Jim Simons's Success
Reflections on a Wall Street legend.
Understanding Stein's Paradox (2021)
An intuitive explanation of the James-Stein estimator.
New work extends the thermodynamic theory of computation
In a paper published in Physical Review X on May 13, a quartet of physicists and computer scientists expand the modern theory of the thermodynamics of computation. By combining approaches from statistical physics and computer science, the researchers introduce mathematical equations that reveal the minimum and maximum…
TLA from First Principles
Building an intuition for the mathematics behind the "TLA" in "TLA+"
A smooth and sharp image interpolation you probably haven't heard of
An image interpolation that gives us a continuous and smooth image, where every interpolated value only depends on the four neighboring pixel values. The image becomes smooth, but sharp features remain sharp.
Does anybody know this fractal? (2012)
Experimenting with the "divisibility" of complex numbers, I stumbled across this thingy. It looks like a fractal. Although the formula does not do any iterations. It reminds me of something. But I dont know what. Doing a Google image search brings up a couple of galaxies :) This image shows the region from (-1/-1) to…
How good can you be at Codenames without knowing any words?
About eight years ago, I was playing a game of Codenames where the game state was such that our team would almost certainly lose if we didn't correctly guess all of our remaining words on our turn. From the given clue, we were unable to do this. Although the game is meant to be a word guessing game based on word…
Sinusoidal Sunlight
The graph of daylight over the course of a year looks like a sine wave, but is it?
Formally Modeling Dreidel, the Sequel
2 model 2 dreidel
52 Factorial
They seem harmless enough, 52 thin slices of laminated cardboard with colorful designs printed on their sides. Yet, as another illustration of the mantra that complexity begins from the most simple systems, the number of variations that these 52 cards can produce is virtually endless. The richness of most playing card…