Topics /

Math & Algorithms

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

2023
92

Bitwise Division

Integer division is expensive. Much more expensive than multiplication. Much, much more expensive than addition. If you’re trying to make some integer operations really fast it’s bad news if you need to do division.

95

Lindenmayer systems

A Lindemayer system or LSystem for short consists of an alphabet of symbols that can be used to make strings, a collection of production that expand each symbol into some larger string of symbols, an initial “axiom” string from which to begin construction, and a mechanism for translating the generated strings into…

96

The Fibonacci Matrix

When you think about the Fibonacci sequence, you probably imagine a swirling vortex of oscillating points stretching outwards to infinity: Okay, no, obviously you don’t. Yet.

100

The Garden of Computational Delights

Beneath the utilitarian purpose of computation, computing is also a source of delight and wonder . Software is not just databases and mail merges or SaaS and spreadsheets; it's creative coding and simulated cities , code poetry and bulletin board systems . It's websites that dazzle and iPhone apps that make the heart…

101

Bayes is guaranteed to overfit

The myth A few years ago I saw a StackOverflow question (but I cannot find it now): allegedly Andrew Gelman blogged that Bayesian models would not overfit and would only underfit (I also cannot find Andrew’s blog post now but I think what he meant by “Bayesian models only underfits” is that you can never fully model…

110

Statistical Arbitrage – An Easy Walkthrough

Statistical arbitrage (stat arb) is a pillar of quantitative trading that relies on mean reversion to predict the future returns of an asset. Mean reversion believes that if a stock has risen higher it’s more likely to revert in the short term which is the opposite of a momentum strategy that believes if a stock has…

119

High Precision Mapping from Scratch

The fun of owning rural property is that knowing where your land actually starts and ends is a guess usually. Sure, you have a parcel description, and maybe even an online service with “official” GIS boundaries (for us here in New Brunswick, this is GeoNB ). However, since it’s in the middle of the forest, the odds of…

120

Lindenmayer Systems

Originally developed by Aristid Lindenmayer in 1968, an L-System is a formalism to generate self-similar structures. Although, L-Systems are capable of generating famous fractals like the Sierpinski Triangle (Axiom: FXF--FF--FF, F → FF , X → --FXF++FXF++FXF-- , angle = 60 ) or the Gosper Curve (Axiom: FX, X →…