Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.
Why Do Buses Bunch?
Created by Lewis Lehe (of Setosa and UC Berkeley Trans. Eng. ) with design and art by Dennys Hess . Thanks to Ian Johnson for good advice. Tools: d3 , Angular Material , Coffeescript , Browserify , Gulp and Five-Hour Energy Drink .
The unreasonable effectiveness of the Fourier transform
New : You can now watch a recording of my talk on my YouTube channel ! Or you can just click "play" below, I suppose.
Demystifying financial leverage
Leverage is actually reasonably easy to understand, both in the math and in the implications for financial firms.
Estimating square roots in your head
Imagine we want to compute the square root of a number n n n . The basic idea of Heron’s method , named after the mathematician and engineer, Heron of Alexandria, is to find a number g g g that is close to n \sqrt{n} n and to then average that with the number n / g n/g n / g , which corrects for the fact that g g g…
Bayesian Statistics: The three cultures
A traditional subjective Bayesian will assume a data generating distribution (aka a likelihood when viewed as a function of the parameters). Then, conditional on this assumption, they encode their prior beliefs as a prior distribution over parameters. After this, they turn the crank on posterior inference and don’t…
Two dozen mathematicians wrote a 600 page book in 6 months on GitHub
Since spring, and even before that, I have participated in a great collaborative effort on writing a book on Homotopy Type Theory. It is finally finished and ready for public consumption. You can get the book freely at http://homotopytypetheory.org/book/ . Mike Shulman has written about the contents of the book , so I…
The shadows lurking in the equations
If you've ever graphed equations, chances are you have only ever graphed equations in what I refer to as "Binary mode" - which draws a line where the equation is EXACTLY equal, and leaves white everywhere else.
Shor, I’ll do it (2007)
I’ve been talking a lot recently about how quantum algorithms don’t work. But last week JR Minkel, an editor at Scientific American, asked me to write a brief essay about how quantum al…
Some of the most important deep learning papers
Engineering at Forward | UCLA CS '19
Quantum Computers Are Not a Threat to 128-Bit Symmetric Keys
There is no need to update symmetric key sizes as part of the post-quantum transition, due to the details of how Grover's algorithm scales. Most authorities agree.
The Truth About Linear Regression (2015)
This is basically a compilation of the lecture notes I wrote when teaching 36-401, Modern Regression, in fall 2015 . I offer it here on the chance that it might be of interest to those learning, or teaching, linear regression. There's no shortage of resources on that, but I have tried to present the subject as though…
Damn Cool Algorithms: Fountain Codes
Posted by Nick Johnson | Filed under bittorrent , lt-codes , damn-cool-algorithms , fountain-codes
What3Words – The Algorithm
What3Words is a widely promoted system that is used for sharing a location using just three words. For example, ///wedge.drill.mess is located in Hyde Park.The globe is divided into 3m squares, eac…
Masterclass on mathematical thinking
About a year ago, I was contacted by Masterclass (a subscription-based online education company) on the possibility of producing a series of classes with the premise of explaining mathematical ways…
A Gentle Introduction to Bayes’ Theorem for Machine Learning
Bayes Theorem provides a principled way for calculating a conditional probability. It is a deceptively simple calculation, although it can be used to easily calculate the conditional probability of events where intuition often fails. Although it is a powerful tool in the field of probability, Bayes Theorem is also…
“Why not just use Lean?”
I have been told that when proposing to formalise mathematics these days, you have to explain why you are not using Lean. And that reminds me why I left the dependent-typed world 40 years ago: its cultism, insularity and conformity. Lean is a great language with good tools, a large library and a huge, enthusiastic…
The Wavefunction Collapse Algorithm Explained
The Wavefunction Collapse Algorithm teaches your computer how to riff. The algorithm takes in an archetypical input, and produces procedurally-generated outputs that look like it.
Functorio
You might have heard people say that functional programming is more academic, and real engineering is done in imperative style. I’m going to show you that real engineering is functional, and …
A Branchless UTF-8 Decoder
This week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. You can find the source code here along with a test suite and benchmark:
Why isn't there a replication crisis in math?
The replication crisis is a major problem in medicine and social science; we know that a huge fraction of the published literature is outright wrong. But in math we don't seem to have a similar crisis, despite reasonably frequent minor errors in published papers. Why not, and what can this tell us about the fields…
BB(3, 4) > Ack(14)
Pavel has found a new 3-state 4-symbol Busy Beaver champion which can compute an “Ackermann-level” function and halts with exactly
Probabilistic Programming and Bayesian Methods for Hackers (2013)
Bayesian Methods for Hackers : An intro to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view.
Important machine learning equations
A reference guide to fundamental machine learning equations with correct implementations and clear explanations of how they connect to each other.
An Interactive Guide to the Fourier Transform (2012)
The Fourier Transform is one of the deepest insights ever made. Unfortunately, the meaning is buried within dense equations: