Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 150 posts.
A lazy way to solve differential equations
Looking at Taylor series as streams of real numbers, solving differential equations becomes as easy as writing them.
Solving Wordle in 3.64 guesses on average, 99.4% of the time
Hey all, I’ve been enjoying wordle, the puzzle game recently but also wondered how a program might do at it.
The Mystery of 355/113 (2010)
Today's date is a good excuse to memorize a few more digits of 3.1415926 53589793 23846264 33832795....
Problem solving strategies in a graduate real analysis course (2010)
This is going to be a somewhat experimental post. In class, I mentioned that when solving the type of homework problems encountered in a graduate real analysis course, there are really only about a…
Simulating Wind on Procedural Terrain Using Lattice Boltzmann Method
Note: The full source code for this article can be found here (summarized version). Individual sections contain references to specific code snippets below.
Do simpler machine learning models exist and how can we find them?
The above is the title of a talk by computer scientist Cynthia Rudin. here’s the abstract:
Gödel's Incompleteness Theorem in Bash
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 ...
Timsort (2019)
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.
40k coin tosses yield ambiguous evidence for dynamical bias
However, no experiment with actual coin-tosses has been done to investigate whether the predicted effect is empirically observed. Diaconis et al noted, correctly, that to estimate the probability with a S.E. of 0.1% would require 250,000 tosses, but this seems unnecessarily precise. Let's work with numbers of tosses…
Converting a fisheye image into a panoramic, spherical or perspective projection
The source code implementing the projections below is only available on request for a small fee. It includes a demo application and an invitation to convert an image of your choice to verify the code does what you seek. For more information please contact the author .
Can you be sure to clear a line at Tetris?
Summary: it is possible to play Tetris and guarantee that you will score at least one line, no matter which pieces are given to you, i.e., even assuming they are chosen adversarially.
The control group is out of control (2014)
I. Allan Crossman calls parapsychology the control group for science. That is, in let’s say a drug testing experiment, you give some people the drug and they recover. That doesn’t tell …
Death by hockey sticks
You may be familiar with the term “hockey stick curve,” used describe a trend that has been flat/stable for a very long time, but shoots up at the end of the series in dramatic fashion, resembling the shape of a hockey stick. Hockey can be a violent sport, and it’s easy to get hurt by even one well-aimed swing…
Why Quantum Mechanics?
In the past few months, I’ve twice injured the same ankle while playing with my kids. This, perhaps combined with covid, led me to several indisputable realizations: I am mortal.Despite my se…
Money Stuff is Linear-ish
What was once a pre-market morning newsletter became an afternoon newsletter, 12 seconds at a time
A Random Distribution of Wealth (2017)
W hat happens, if 100 persons in a room are given $100 each and give away a Dollar to one randomly chosen person in this room each tick of the clock? How is wealth distributed over time by pure chance?
“I don't know the numbers”: a math puzzle
I saw a math puzzle the other day on Hacker News. It reads as follows: Two numbers are chosen randomly, both are positive integers smaller than 100. Sandy is told the sum of the numbers, while Peter is told the product of the numbers. Then, this dialog occurs between Sandy and Peter: Peter: I don’t know the numbers…
Number theory explained from first principles
A lot of modern cryptography builds on insights from number theory, which has been studied for centuries.
Why tensors? A beginner's perspective
Faizan Muhmmad is a Software Engineer at Google
An unwinnable seed of Slay the Spire
Overview In this post, I will describe a collaborative effort that proved that unwinnable Slay the Spire seeds exist. This project is joint work with gamerpuppy and ForgottenArbiter and is based on the several attempts that have been made to prove unwinnability for seeds in Slay the Spire.
The essence of Reed-Solomon coding
Let’s say we want to store some data on multiple drives, so that we can recover from drive failures.
Using GPT-3 to pathfind in random graphs
I wondered how GPT-3 might do on the following problem: given a partially-connected graph, find a path between two nodes, or determine that no path exists. I wrote some code to automate generating …
An automatic theorem proving project
I am very happy to say that I have recently received a generous grant from the Astera Institute to set up a small group to work on automatic theorem proving, in the first instance for about three y…
Learning math? Think like a cartoonist
What's the essential skill of a cartoonist? Drawing ability? Humor? A deep well of childhood trauma? I'd say it's an eye for simplification, capturing the…
A homework question in someone’s 11th grade statistics class
My son is in 11th grade. Below you’ll find a HW question which was given in my son’s statistics class. How would you answer?