Topics /

Math & Algorithms

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

Any year
2642

Dynamic Programming versus Memoization

_posted by Shriram Krishnamurthi_ [Edit on 2012-08-27, 12:31EDT: added code and pictures below. 2012-08-27, 13:10EDT: also incorporated some comments.] I wrote this on the Racket educators' mailing list, and Eli Barzilay suggested I post it here as well...

2643

Estimating Logarithms

While reading through the fantastic book *[The Lost Art of Logarithms](https://www.lostartoflogarithms.com/)* by [Charles Petzold](https://www.charlespetzold.com/) I was nerd-sniped by a [simple method](https://www.lostartoflogarithms.com/chapter04/) of estimating the logarithm of any number base 10. According to the…

2645

Fast and Easy Levenshtein distance using a Trie (2011)

<img src="http://stevehanov.ca/blog/images/acer.jpg"/> If you have a web site with a search function, you will rapidly realize that most mortals are terrible typists. Many searches contain mispelled words, and users will expect these searches to magically work. This magic is often done using levenshtein distance. In…

2647

Minimal Boolean Formulas (2011)

28 . That's the minimum number of AND or OR operators you need in order to write any Boolean function of five variables. Alex Healy and I computed that in April 2010. Until then, I believe no one had ever known that little fact. This post describes how we computed it and how we almost got scooped by Knuth's Volume 4A…

2650

Stock Option Pricing Inference

I’m a stock market enthusiast 📈, so lately I have spent my spare time on the topic of stock option pricing, and I was curious to find out whether or not I could build a script that accurately reflected real market option prices. It turns out I came close, and learned a lot along the way, which I share in this article.

2651

Math versus Dirty Data

At Google, our organization designs, owns, and maintains a number of optimization models that automate the planning of Google’s datacenter growth and health. As is pretty standard in supply chain optimization and planning, these models are often integer linear programs. It’s a core competency of operations research…

2662

Does anybody know this fractal? (2012)

Experimenting with the "divisibility" of complex numbers, I stumbled across this thingy. It looks like a fractal. Although the formula does not do any iterations. It reminds me of something. But I dont know what. Doing a Google image search brings up a couple of galaxies :) This image shows the region from (-1/-1) to…

2667

Entropy Attacks

The conventional wisdom is that hashing more entropy sources can't hurt: if H is any modern cryptographic hash function then H(x,y,z) is at least as good a random number as H(x,y), no matter how awful z is. So we pile one source on top of another, hashing them all together and hoping that at least one of them is good.