People Keep Inventing Prolly Trees
A novel data structure has been invented four times now, with three different names. We think that's a good sign.
Topics /
The most popular blog posts about math & algorithms on Hacker News. 2,851 posts.
A novel data structure has been invented four times now, with three different names. We think that's a good sign.
The Laziest Programmer - Because someone else has already solved your problem.
Stephen Wolfram discusses understanding proofs discovered using automated theorem proving. Based on Wolfram’s proof of the simplest axioms of logic of Boolean algebra.
I’ve supervised a lot of great student projects in my nine years at MIT, but my inner nerdy teenager has never been as personally delighted by a project as it is right now. To…
What is special about cylinders, and why do they have specific aspect ratios?
What would the world look like if there were only 16 colors? I use k-d trees to perform nearest neighbor search to find out.
These algorithms aren't magic – but combined they can save over 90% of storage costs and speed up queries. Here’s how 5 common ones work.
I’m adding immutable vectors to my language, Ivan, and needed to pick a suitable data structure to implement them. Clojure uses Persistent Vectors (PVs) which support lookups, updates, and appends all in ‘effectively’ constant time. However, it doesn’t have efficient insert or merge operations. Relaxed Radix Balanced…
How a Python function relates to a two thousand year old debate in philosophy
In computer science, we often compare the efficiency of algorithms by describing their runtime as a function of the size of the input. Sorting is O(n * log(n)), meaning that sorting a list of N items takes an amount of time proportional to the number of items multiplied by its logarithm. Matrix multiplication is…
How TurboQuant compresses the KV cache without losing accuracy, and what that could mean for memory stocks
A new information-theoretical model of human sensory perception and memory sheds light on some peculiarities of the nervous system.
What follows is an unusual story of perseverance. We start with a conjecture and after some plot twists end up discussing the meaning of truth. While the title is a spoiler, you might not be able t…
Clifford algebra gives a unified view of many things that otherwise would need to be understood separately.
Gödel’s first incompleteness theorem states that there are mathematical statements that can neither be proven or disproven. His proof is fairly difficult to ...
Programmers on the internet often use Turing-completeness terminology. Typically, not being Turing-complete is extolled as a virtue or even a requirement in specific domains. I claim that most such discussions are misinformed --- that not being Turing complete doesn't actually mean what folks want it to mean, and is…
Timsort: A very fast , O(n log n), stable sorting algorithm built for the real world — not constructed in academia. Timsort is a sorting algorithm that is efficient for real-world data and not created in an academic laboratory. Tim Peters created Timsort for the Python programming language in 2001.
I recently wanted to take a hierarchy of items and draw them in a nice tree structure. For example, a Family Tree. At the time, I thought “This will be easy, I’ll just Google for an alg…
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.
This post is adapted from this research paper that you can read/cite for more info. It analyzes and visualizes 100 cities around the world.
Efficient filtering of polygonal shapes with closed-form solutions based on Green’s theorem with piecewise-polynomial filters (e.g. box/bilinear/bicubic).
High-degree polynomial features aren’t inherently unstable: the power basis and unscaled inputs are. This post shows how regularization and Bernstein polynomials make polynomial regression behave.
My journey making a Sudoku variant that doesn’t have rows or columns
A very late blog post announcing the readability contest winners, a new (very) annotated implementation, and a surprising sort-of security issue found along the way.
A Pi Day tour of π in Julia: how Julia represents π, computing it with inline assembly and Taylor series (Madhava and Machin), and finding guaranteed bounds with interval arithmetic.