Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 2,394 posts.
Quake's Fast Inverse Square Root
I'm no graphics expert, but appreciate why square roots are useful. The Pythagorean theorem computes distance between points, and dividing by distance helps…
Q* Hypothesis: Enhancing Reasoning, Rewards, and Synthetic Data
Emergency special: The information we need to understand what Q* is was right in front of us, but the memes are more fun than reality.
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.
Types versus sets in math and programming languages
For several years I have been designing and implementing a functional teaching language especially for use in the context of a Discrete Mathematics course. The idea is for students to be exposed to…
Film grain synthesis in AV1 (2019)
Description of the film grain synthesis algorithm in AV1. This page provides information on the film grain synthesis algorithm and links for further study
Creating a rogue CA certificate with MD5 hash collisions
We have identified a vulnerability in the Internet Public Key Infrastructure (PKI) used to issue digital certificates for secure websites. As a proof of concept we executed a practical attack scenario and successfully created a rogue Certification Authority (CA) certificate trusted by all common web browsers. This…
The Fourth Operation: What Comes After Exponentiation
Tetration -- repeated exponentiation a fractional number of times.
Bresenham's Circle Drawing Algorithm (2021)
Once upon a time I was given the following problem for a technical programming interview:
Quantum transitions take time – the news is its experimental demonstration
A number of people have asked me to weigh in on this story in Quanta Magazine (based on this paper [ PDF version ] and also reported in t...
Holes in Bayesian Statistics
Every philosophy has holes, and it is the responsibility of proponents of a philosophy to point out these problems. Here are a few holes in Bayesian data analysis: (1) the usual rules of conditional probability fail in the quantum realm, (2) flat or weak priors lead to terrible inferences about things we care about…
Using Self-Organizing Maps to Solve the Traveling Salesman Problem
Using Self-Organizing Maps to solve the Traveling Salesman Problem The Traveling Salesman Problem is a well known challenge in Computer Science: it consists on finding the shortest route possible that traverses all cities in a given map only once. Although its simple explanation, this problem is, indeed, NP-Complete…
Warning Signs in Experimental Design and Interpretation (2007)
When an experimental study states "The group with treatment X had significantly less disease ( p = 1%)", many people interpret this statement as being equivalent to "there is a 99% chance that if I do treatment X it will prevent disease." This essay explains why these statements are not equivalent. For such an…
How to keep lambda calculus simple
Once upon a time, my curiosity of dependent types transitioned into an endeavour to learn how they work under the bonnet. Then I found the paper called “A Tutorial Implementation of a Dependently Typed Lambda Calculus” or just “Simply Easy” – and began reading it. However, the affairs happening there were so complex…
Lint for Math
Can we remove simple errors from math proofs? simple-talk interview source Stephen Johnson is one of the world’s top programmers. Top programmers are inherently lazy: they prefer to build too…
How to compile with continuations
In terms of unreasonable effectiveness, the transformation to continuation-passing style (CPS) ranks with the Y combinator .
The Joy of Condensed Matter
I published a slightly different version of this article in Nautilus on February 24, 2021. Everyone seems to be talking about the problems with physics: Woit’s book Not Even Wrong, SmolinR…
Code golfing a tiny demo using maths and a pinch of insanity
The number of characters was 464 characters at first, but thanks to the community it got reduced further, and the article updated accordingly.
The Generalist – On Alexander Grothendieck
I never met Alexander Grothendieck. I was never in the same room with him. I never even saw him from a distance. But whenever I think about math — which is to say, pretty much every day ̵…
Lambda Calculus and Lisp, part 1
The first of a series of envisioned blog posts on lambda calculus, and Lisp. It’s unclear exactly where to start: there is a whole heap of interesting issues, both theoretical and in terms of concrete implementations, which tangle and interconnect. A particular application of lambda calculus is a very salient…
Stable Fiddusion: Frequency-domain blue noise generator
Frequency-domain blue noise generator
Making of “Introduction to A*”
(Warning: these notes are rough – the main page is here and these are some notes I wrote for a few colleagues and then I kept adding to it until it became a longer page)
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 …
Crit-bit Trees: the best way to store sets
A crit-bit tree can be used as a high-speed associative array. For example, an array mapping 54 to 1, 19 to 2, 99 to 3, 85 to 4, and 88 to 5 can be stored as a crit-bit tree containing 54=1, 19=2, 99=3, 85=4, and 88=5. The smallest string in the crit-bit tree larger than 85= is 85=4.
Predicting When P=NP Is Resolved
Has it outlasted the ability to estimate when? Composite of src1, src2 Ryohei Hisano and Didier Sornette wrote in 2012 a paper titled, “On the distribution of time-to-proof of mathematical co…
What comes next: π/2, π/2, π/2, π/2, π/2, π/2, π/2, ...?
I’m eager to summarize the (largely excellent) discussion of last week’s nightmares and to talk about what it all means. I’ll surely get to that in the next few days. But meanwhil…
Sieve of Eratosthenes in Python (2015)
Sieve of Eratosthenes animation Source: Wikipedia[0] One of the things we need to do when finding Perrin Pseudo-Primes is to recognise prime numbers so we can see if the numbers predicted by the Perrin test to be prime, are. So we need to generate primes. For small primes (for some definition of "small") this can be…