Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.

Any year
218

When Random Isn't

This post is an anecdote from over a decade ago, of which I lost the actual code. So please forgive me if I do not accurately remember all the details. Some details are also simplified so that anyone that likes computer security can enjoy this article, not just those who have played World of Warcraft (although the…

233

Image Kernels explained visually

An image kernel is a small matrix used to apply effects like the ones you might find in Photoshop or Gimp, such as blurring, sharpening, outlining or embossing. They're also used in machine learning for 'feature extraction', a technique for determining the most important portions of an image. In this context the…

236

Images Created from Prime Numbers

Inspired by James McKee’s Trinity Hall prime, physics researcher Gilles Esposito-Farese (of the self-descriptive pangram) has worked out that this 2,258-digit prime number: 53084469288402965415857953902888840109250315594591772197851275320 59910735745658243457138160802170063601085186072703319516241231606…

238

You can beat the binary search

We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values one by one, until we encounter the value, or exhaust the … Continue reading…

239

Biggest image in the smallest space

What’s the biggest pixel size of a PNG image in the smallest number of bytes? I wanted to try to create an image that could be downloaded but whose pixel buffer would be too big to store in the RAM of a PC. Here is a PNG image of 6,132,534 bytes (5.8 MB) and 225,000 × 225,000 pixels (50.625 gigapixels), which, if…