Topics /

Math & Algorithms

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

Any year
275

The Inconsistency of Arithmetic (2011)

Note: These pages make extensive use of the latest XHTML and CSS Standards . They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in…

280

2+1=4, by quinoa

I was struck the other day by the following: The cooking instructions on my Bob’s tri-colored quinoa package said to combine 2 cups of water with 1 cup of dried quinoa, which would ultimately create 4 cups of cooked quinoa. See image above. My first reaction was to believe …

284

Just A New Fractal Detail In The Big Picture (2015)

When the central heating takes effect I'll get up and make myself some tea and porridge to which I'll add some nuts and fruit. I'll switch on The World Service to hear the news, and then make a few phone calls about damp-proofing. And I'll probably plant the daffodil bulbs for Spring (it says on the packet they should…

286

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…

289

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…

291

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…

293

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…