Topics /

Math & Algorithms

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

Any year
1141

Win your fantasy league using operations research

I’ve never been good at playing football 1 . I started playing again last year and I have scored more own goals than goals for my team. Also, I support the RCD Espanyol 2 , which has spent last season in the second division and has miraculously ascended to the first division last week. And to be honest, I only watch…

1143

Math For Programmers

Probability theory might be the most useful area for programmers, but it is also a blurry field, difficult to learn right. You might check this book for details, and there is also an free, online draft version available. The Logic of Science

1144

I hate the Pumping Lemma

I hate the Pumping Lemma for regular languages. It’s a complicated way to express an idea that is fundamentally very simple, and it isn’t even a very good way to prove that a language is not regula…

1149

Decision Tables

I really like decision tables but they’ve fallen out of common knowledge. Let’s fix that. A decision table is a means of concisely representing branching and conditional computations. In the most basic form, you have some columns that represent the “inputs” as booleans and some columns that represent outputs and…

1153

Lánczos Interpolation Explained (2022)

When you resize, rotate, or in any way transform an image; or more generally when you resample some discrete signal, the software you are using must _interpolate_ between the discrete points to produce a result. Linear and cubic interpolation are easy to explain, but Lánczos interpolation, one of the most popular…

1160

Kelly Criterion (2007)

It’s fairly clear when one should buy a particular stock. One should buy stock when it is undervalued. What I have always wondered about is how much stock one should buy. A few months ago I stumbled upon the answer which is given by the Kelly criterion . It says that one should invest an amount to maximize one’s…

1164

Constructing a Four-Point Egg

For reasons beyond the scope of this entry, I have been investigating elliptical and ovoid shapes. The Wikipedia article for Moss’s egg has a link to a tutorial on Euclidean Eggs by Freyja Hreinsdóttir which (amongst other things) describes how to construct the “four point egg”. I think it is a nicer shape than Moss’s…

1165

Exact numeric nth derivatives

Automatic differentiation is a well-studied technique for computing exact numeric derivatives. Dan Piponi has a great introduction on the subject , but to give you an overview, the idea is that you introduce an algebraic symbol such that but . Formulas involving are called dual numbers (e.g., , ) in much the same way…

1170

The Fallacy of Cracking Contests (1998)

In this issue: The Fallacy of Cracking Contests How to Recognize Plaintext News The Doghouse: Iomega Zip Disks Counterpane Systems News Final Report from the Commerce Department Technical Advisory Committee on Key Recovery Comments From Readers About "CRYPTO-GRAM"