Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 2,851 posts.
Fermat's Last Theorem – how it’s going
So I’m two months into trying to teach a proof of Fermat’s Last Theorem to a computer. We already have one interesting story, which I felt was worth sharing.
Classical music generation with recurrent neural networks
Writeup for my first major machine learning project.
An illustrated introduction to linear algebra
Chapter 1: Row vs column picture
Someone’s Been Messing with My Subnormals
TL;DR: After noticing an annoying warning, I went on an absurd yak shave, and discovered that because of a tiny handful of Python packages b...
You need to know what right-half-plane zeros are
Why some systems -- as a consequence of their intrinsic dynamics -- require a control action that first pushes them the wrong way and makes things worse before it gets better.
Challenging algorithms and data structures every programmer should try
Bored of algorithms? Here are my recommendations that are exciting, understandable, and sometimes even useful!
Don't use cosine similarity carelessly
Cosine similarity - the duct tape of AI. Convenient but often misused. Let's find out how to use it better.
Eigenmorality
This post is about an idea I had around 1997, when I was 16 years old and a freshman computer-science major at Cornell. Back then, I was extremely impressed by a research project called CLEVER, wh…
Shortest-possible walking tour to 81,998 bars in South Korea
We have solved a traveling salesman problem (TSP) to walk to 81,998 bars in South Korea. The problem was created using the Open Source Routing Machine (OSRM) to build a table of the 3,361,795,003 point-to-point travel times, one for each pair of bar locations. Our computation produced a tour together with a proof that…
A leap year check in three instructions
How to test for leap years (until year 102499) in the proleptic Gregorian calendar with just three 32-bit instructions, with detailed explanation of the bit-level tricks.
If math is more than proof, we need to better celebrate the rest of it
[This is a guest post by Grant Sanderson. This blog post was initially written in a different file format and converted using AI. — T.] A sentiment echoing throughout the mathematics communit…
Functions are vectors
Conceptualizing functions as infinite-dimensional vectors lets us apply the tools of linear algebra to a vast landscape of new problems, from image and geometry processing to curve fitting and machine learning.
Gödel, Escher, Bach: an in-depth explainer
[Thanks to Jacob Falkovich, Eric Neyman, and my LessWrong reviewer, among others, for their feedback on earlier drafts.] …
Habits of highly mathematical people
The most common question students have about mathematics is “when will I ever use this?” Many math teachers would probably struggle to give…
4D Toys: how objects bounce and roll in 4D – paper accepted to SIGGRAPH 2020
Excited to announce that my technical paper “ N-Dimensional Rigid Body Dynamics ” was accepted to SIGGRAPH 2020 ! Very proud to present research developed for 4D Toys & Miegakure at such a prestigious conference.
That XOR Trick (2020)
There are a whole bunch of popular interview questions that can be solved in one of two ways: Either using common data structures and algorithms in a sensible manner, or by using some properties of...
Introduction to Linear Algebra for Applied Machine Learning with Python
Linear algebra is to machine learning as flour to bakery: every machine learning model is based in linear algebra, as every cake is based in flour . It is not the only ingredient, of course. Machine learning models need vector calculus, probability, and optimization, as cakes need sugar, eggs, and butter. Applied…
Intel Underestimates Error Bounds by 1.3 Quintillion
Intel’s manuals for their x86/x64 processor clearly state that the fsin instruction (calculating the trigonometric sine) has a maximum error, in round-to-nearest mode, of one unit in the last place…
“Dynamic programming” is not referring to “computer programming”
When seeing the phrase “dynamic programming” in an algorithms class or leetcode study guide, the first question people ask is “what does ‘dynamic’ mean in this context?”.
An Interactive Introduction to Fourier Transforms
Fourier transforms are a tool used in a whole bunch of different things. This is a explanation of what a Fourier transform does, and some different ways it can be useful.
An Almost-Secret Algorithm Researchers Used to Break Thousands of RSA Keys
RSA encryption allows for anyone to send me messages that only I can decode. To set this up, I select two large random primes $latex p$ and $latex q$ (each of which is hundreds of bits long), and r…
Let’s Invent B(+)-Trees
Say we have some things, and we want to be able to store and look them up in order. We could just put them in a big sorted array:
SHA-3 Buffer Overflow
Update: This result appeared in the proceedings of CT-RSA 2023. A preprint is available.
When do we stop finding new music?
When does our taste in music stagnate?
Why do arrays start at 0?
It's not the reason you think. No, it's not that reason either.
The Remarkable Number 1/89 (2004)
The Fibonacci series is a famous example of an object with a simple mathematical description, but a nearly inexhaustable list of bizarre and complicated properties. Originally, the series was described by Fibonacci in the 15th century in connection with the following problem: