New
The latest blog posts to take off on Hacker News. 2,391 posts.
How many floating-point numbers are in the interval [0,1]?
Most commodity processors support single-precision IEEE 754 floating-point numbers. Though they are ubiquitous, they are often misunderstood. One of my readers left a comment suggesting that picking an integer in [0,232) at random and dividing it by 232, was equivalent to picking a number at random in [0,1). I am not…
Two-part Rubik's algorithms
When Rubik’s Cube first appeared decades ago, I jumped on it. I bought one, and spent an entire summer fiddling with it. Over that summer, I developed a solving technique that has stuck with me. My technique is not the fastest; that was never the goal. My algorithms make sense to me because they are constructed, and…
I Wrote My Fastest Hashtable
I had to get there eventually. I had a blog post called “I Wrote a Fast Hashtable” and another blog post called “I Wrote a Faster Hashtable.” Now I finally wrote the fastest…
The Myers diff algorithm: part 1
If you enjoy this article, I have published a book explaining the internals of Git through implementation: Building Git .
Anagram Scoring
From the highly eclectic blog of Mark Dominus
From math to machine: translating a function to machine code
In this post I'm going to explore how a mathematical concept can be redefined in progressively more computer-oriented terms, all the way from high level languages down to machine code, ready for direct execution by a computer. To that end, I'm going to define the same logic in several different but related formats:
Multiplying and dividing with Hindu-Arabic numerals and with Roman ones
Last Sunday the eminent British historian of the twentieth century, Richard Evans, tweeted the following: Let’s remember we use Arabic numerals – 1, 2, 3 etc. Try dividing MCMLXVI by XX…
The Three Ways of XOR
We all know the XOR operation. It’s the cousin of NOT, AND and OR. Like AND and OR, it is a binary boolean function. Unlike them, most programming languages ...
The Axiom of Choice Is Wrong (2007)
When discussing the validity of the Axiom of Choice, the most common argument for not taking it as gospel is the Banach-Tarski paradox. Yet, this never particularly bothered me. The argument …
The beauty of mixed-radix bases
On the relationship between mixed-radix bases and array indexing
Kalman filters and functional programming
A paper on Kalman filtering and functional folds that I alluded to previously has been split into several papers and posted online.
A very casual introduction to Fully Homomorphic Encryption (2012)
Craig Gentry on board the mothership. (credit) A couple of weeks ago I polled readers for the subjects that they were interested in. You gave me some excellent responses, and I promise they’r…
Game Theory Reveals the Future of Deep Learning
If you’ve been following my articles up to now, you’ll begin to perceive, what’s apparent to many advanced practitioners of Deep Learning…
Graph Isomorphism update: quasipolynomial claim restored
On January 4 I announced that Harald Helfgott pointed out an error in the analysis of my Graph Isomorphism test. The error invalidated my previous claim of quasipolynomial efficiency. The text of the announcement is appended below.
P vs. NP
For those who just want the survey itself, not the backstory, it’s here. (Note: Partly because of the feedback I’ve gotten on this blog, it’s now expanded to 121 pages!) Upda…
Writing a Faster Sorting Algorithm
These days it’s a pretty bold claim if you say that you invented a sorting algorithm that’s 30% faster than state of the art. Unfortunately I have to make a far bolder claim: I wrote a …
Why recursive data structures?
In this essay, we are going to look at recursive algorithms, and how sometimes, we can organize an algorithm so that it resembles the data structure it manipulates, and organize a data structure so that it resembles the algorithms that manipulate it.
2017 is not just another prime number
Good bye year 2016. Hello year 2017. We all know that 2017 is a prime number, but it is more than just another prime number. 2017π (roun...
Finger Trees: A Simple General-Purpose Data Structure (2006)
Finger Trees: A Simple General-purpose Data Structure
An Introduction to the Lambda Calculus (2015)
;; Done Twice as a "Dojo" at Villiers Park on Thursday 19th March 2015 ;; To groups of about 15 ultra-clever teenagers who were thi...
2D Terrain generation using midpoint displacement
Today I will present how to implement in Python a simple yet effective algorithm for proceduraly generating 2D landscapes. It is called Midpoint Displacement (or Diamond-square algorithm,…
An Introduction to Geometric Algebra
Linear Algebra Geometric Algebra Applications Multiplying Vectors Rotors Double Angle Formula Complex Numbers Characterizing B Ratios Conjugates Geometric Algebra is fascinating, and I believe solves a large number of problems that arise from a more traditional approach to vectors, but I've been very disappointed with…
Skip Lists Done Right
Skip lists are a wonderful data structure, but it is hard to get\ right. This blog post presents various techniques to optimize and\ improve the implementation of skip lists.
A Basic Introduction to Neural Networks (2007)
Although the mathematics involved with neural networking is not a trivial matter, a user can rather easily gain at least an operational understanding of their structure and function.