Topics /
Math & Algorithms
The most popular blog posts about math & algorithms on Hacker News. 2,851 posts.
Introduction to Locality-Sensitive Hashing
Locality-sensitive hashing (LSH) is a set of techniques that dramatically speed up search-for-neighbors or near-duplication detection on data. These techniques can be used, for example, to filter out duplicates of scraped web pages at an impressive speed, or to perform near-constant-time lookups of nearby points from…
Is the frequency domain a real place?
Dissing Fourier, exploring the Hadamard-Walch transform, and making square-wave spectrograms.
Problems harder than NP-Complete
People always talk about "P vs NP" like P problems are easy and NP problems are hard. This is a useful day-to-day model but also an oversimplification....
A practical introduction to constraint programming using CP-SAT and Python
We discuss constraint programming, an approach to solve discrete optimization problems, and illustrate how it works with a scheduling code example implemented in Python with the CP-SAT solver.
Escher-Like Spiral Tilings
The artist M.C. Escher drew many lovely tilings, which he called “regular divisions of the plane”. He worked hard to ensure that his tilings were of lifelike animal forms such as birds and fish. He filled notebooks with hand-drawn sketches of tilings, many of which later found their way into his woodcuts. If you’d…
Direct Coupling of the Higgs Boson to the Top Quark Observed
Das Team Media Relations steht Journalistinnen und Journalisten gerne zur Verfügung. Suchen Sie unsere Expertinnen und Experten direkt, finden Sie Bilder der UZH und Medienberichte oder kontaktieren Sie Ihre Medien-Ansprechpartner.
Algorithmic Solution to My Insomnia
I’ve struggled with insomnia for all of my adult life. It began in college and has waxed and waned in severity ever since, correlating with stress levels…
Image unshredder by simulated annealing (2015)
On another page , I unleash the simulated annealing algorithm on a toy problem. It generates an image full of random colorful pixels, and rearranges the pixels so that similar colors are near each other.
Dungeon Generation in Diablo 1
Diablo1 is a classic 1996 hack and slash rogue-like. several fans took it upon themselves to reverse-engineer the source code. I began a week long deep dive into how exactly did lead developer, Dav…
Generating random points inside a sphere
Visualization of different methods of generating random points inside a sphere
Category Theory Illustrated: Logic (2021)
Now let’s talk about one more seemingly unrelated topic just so we can “surprise” ourselves when we realize it’s category theory. By the way, in this chapter there will be another surprise in addition to that, so don’t fall asleep.
Category Theory Illustrated – Orders
Given a set of objects, there can be numerous criteria, based on which to order them (depending on the objects themselves) — size, weight, age, alphabetical order etc.
Planets in the Fourth Dimension
You probably that planets go around the sun in elliptical orbits. But do you know why? In fact, they’re moving in circles in 4 dimensions. But when these circles are projected down to 3-dimen…
Decoding the Thought Vector
Neural networks have the rather uncanny knack for turning meaning into numbers. Data flows from the input to the output, getting pushed through a series of transformations which process the data into increasingly abstruse vectors of representations. These numbers, the activations of the network, carry useful…
Your yearly dose of is-the-universe-a-simulation
Yesterday Ryan Mandelbaum, at Gizmodo, posted a decidedly tongue-in-cheek piece about whether or not the universe is a computer simulation. (The piece was filed under the category “LOL.…
The zombie misconception of theoretical computer science
In Michael Sipser’s Introduction to the Theory of Computation textbook, he has one Platonically perfect homework exercise, so perfect that I can reconstruct it from memory despite not having …
Lerp
Lerp is the nickname for Linear Interpolation between two points. It's a fairly simple effect to implement but can really improve the look of your animations if you're moving an object from a point A to point B.
The Elegance of Deflate
A little while back I found need of a PNG loader for a small project of mine . Being a complete tool I of course decided to write my own -- after all, why save yourself effort when there are still wheels waiting to be reinvented? You can check the source to the inflater code here if you so like - it's quite cleanly…
Subtraction is functionally complete
To be precise, IEEE-754 floating point subtraction is functionally complete . That means you can construct any binary circuit using nothing but floating point subtraction.
Reverse-Engineering Xkcd's 'Frequency'
About a week ago, Randall Munroe published Frequency , the 1331st entry in his xkcd webcomic series. Unlike most xkcd comics, it's animated — actually, 5-by-10 grid of animated GIFs. Each describes a scenario (e.g., "one birth," or "someone locks their keys in their care") and blinks at the scenario's purported…
No country for mediocre mathematicians
White lies of AI from a struggling geometer
Why isn't everything normally distributed?
Heights are normally distributed because height is determined by many factors. But why are other things with many inputs not normally distributed?
AlphaProof's Greatest Hits
Here I’ll try to explain the coolest ideas in each of AlphaProof’s IMO 2024 solutions. AlphaProof produces proofs in Lean, and each Lean proof is composed of a series of tactics. So I’ll pick out the tactics that correspond to these ideas in the proofs for problems 1, 2 and 6 (the three problems that AlphaProof…
The StarCraft path-finding hack
StarCraft pathfinding looked impossible to fix until one ugly hack changed everything. Here's the trick that shipped.
How machines learned precision
How do you make an accurate machine without one to copy? Explore flat surfaces, screw-cutting lathes, and millionth-of-an-inch measurements through interactive 3D figures.
A Theory of Deep Learning
Where noise hides when deep neural networks generalize.