Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 213 posts.

2017
192

Cracking random number generators (xoroshiro128+)

In software, we generate random numbers by calling a function called a "random number generator". Such functions have hidden states, so that repeated calls to the function generate new numbers that appear random. If you know this state, you can predict all future outcomes of the random number generators. O'Neill, a…

195

Is SHA-3 slow?

In a recent post , Adam Langley complains that “SHA-3 is slow”. Similar comments appear from time to time on the web (see also David Wong's post ). But what does it mean precisely? Let us dig into it.

196

Sieve of Eratosthenes in Python (2015)

Sieve of Eratosthenes animation Source: Wikipedia[0] One of the things we need to do when finding Perrin Pseudo-Primes is to recognise prime numbers so we can see if the numbers predicted by the Perrin test to be prime, are. So we need to generate primes. For small primes (for some definition of "small") this can be…

198

Understanding LSTM Networks (2015)

Humans don’t start their thinking from scratch every second. As you read this essay, you understand each word based on your understanding of previous words. You don’t throw everything away and start thinking from scratch again. Your thoughts have persistence.

201

On Melissa O’Neill’s PCG random number generator

Computers often need random numbers. Most times, random numbers are not actually random... in the sense that they are the output of a mathematical function that is purely deterministic. And it is not even entirely clear what "really random" would mean. It is not clear that we live in a randomized universe... it seems…

209

Two-part Rubik's algorithms

When Rubik’s Cube first appeared decades ago, I jumped on it. I bought one, and spent an entire summer fiddling with it. Over that summer, I developed a solving technique that has stuck with me. My technique is not the fastest; that was never the goal. My algorithms make sense to me because they are constructed, and…

210

Papers I like (part 2)

Continued from part 1. Once I was about a thousand words into describing background for GEMM, it became pretty clear that it made more sense to group the numerical math papers into one post, so her…