Topics /

Math & Algorithms

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

Any year
1803

The Shape of Inequalities

…symmetry isn’t just a preference for “pretty” shapes. Contents Introduction The HM-GM-AM-QM Inequality The two circles The Semicircle The Container The 3D container The Sum of Squares Inequality Nesbitt’s Inequality Conclusion Introduction While I was randomly browsing the web, I came across this nice picture: Roland…

1804

Bounty to Recover NIST's Elliptic Curve Seeds

This is a fun challenge: The NIST elliptic curves that power much of modern cryptography were generated in the late ’90s by hashing seeds provided by the NSA. How were the seeds generated? Rumor has it that they are in turn hashes of English sentences, but the person who picked them, Dr. Jerry Solinas, passed away in…

1805

Hacking physics from the back of a napkin (2020)

February 24, 2020. The computational power of a humble napkin is awesome. I discuss three napkin algorithms — dimensional analysis, Fermi estimates, and random walks — and use them to figure out why rain falls, the length of the E. coli genome, and the mass of a proton, among other things. These examples suggest a…

1811

Against Bayesianism – David Deutsch

Bayesianism, the doctrine that it's always rational to represent our beliefs in terms of probabilities, dominates the intellectual world, from decision theory to the philosophy of science. But does it make sense to quantify our beliefs about such ineffable things as scientific theories or the future? And what separates

1817

Quicksort with Jenkins for fun and no profit

I first encountered Jenkins in 2007 while contributing to the Apache Nutch project. It was called Hudson back then. The nightly builds for the project ran on Hudson at that time. I remember sifting through my emails and reviewing build result notifications to keep an eye on the patches that got merged into the trunk…

1820

Principles of TLA+

TLA+ is a formal specification and verification language intended to help engineers specify, design and reason about complex, real-life algorithms and software or hardware systems. We explore its motivation, application and principles of design.

1825

Floating-Point Printing and Parsing Can Be Simple and Fast

A floating point number f has the form f = m · 2 e where m is called the mantissa and e is a signed integer exponent . We like to read numbers scaled by powers of ten, not two, so computers need algorithms to convert binary floating-point to and from decimal text. My 2011 post “ Floating Point to Decimal Conversion is…

1826

An Overview of Bayesian Inference (2019)

A few weeks ago I wrote about Kuhn’s theory of paradigm shifts and how it relates to Bayesian inference. In this post I want to back up a little bit and explain what Bayesian inference is, and eventually rediscover the idea of a paradigm shift just from understanding how Bayesian inference works.