Taxis and hash functions

In 2014 New York City released dump of trip and fare logs from NYC taxis in the previous year. In an attempt to protect privacy, the taxi license numbers and medallion numbers were hashed using the MD5 hash function. If you’re familiar with secure has functions, your first reaction might be that the problem with […] The post Taxis and hash functions first appeared on John D. Cook.

Posted on: 16 November 2026 | 8:46 am

Orbital footnote

A couple days ago I wrote a post about the orbit of a new dwarf planet candidate. The article says the newly discovered object, ED138, has an orbital period of 281.1 years and is “46 times farther from the sun than Earth is.” The earlier post showed that we can infer from Kepler’s third law […] The post Orbital footnote first appeared on John D. Cook.

Posted on: 15 November 2026 | 8:19 pm

The longest polynomial level set

Let p(z) be a polynomial with leading coefficient 1, i.e. a monic polynomial. What is the maximum length of the curve {z : |p(z)| = 1} for each degree n? Erdős conjectured that the maximum length was obtained by the polynomial p(z) = zn − 1. He was right, as Teng Zhang proved recently. Examples […] The post The longest polynomial level set first appeared on John D. Cook.

Posted on: 14 November 2026 | 9:54 am

Peeking inside the bash rabbit hole

I have much bigger issues to be concerned with than saving a few seconds of typing with obscure bash features. But precisely because I have bigger issues on my plate, it’s fun to take a moment and solve some little tangible problem. The shell !$ saves the last part of the latest command. (Mnemonic: bang […] The post Peeking inside the bash rabbit hole first appeared on John D. Cook.

Posted on: 14 November 2026 | 7:09 am

Kepler and the dwarf

Kepler’s third law A recent article from Smithsonian magazine says a new dwarf planet candidate is 46 times further from the sun as earth is, and it takes 281.1 years to orbit the sun. I did a back-of-the-envelope calculation and thought something was wrong. Kepler’s third law says T² = c a³. Here T is the orbital […] The post Kepler and the dwarf first appeared on John D. Cook.

Posted on: 13 November 2026 | 8:54 am

Long permutations and long cycles

A permutation rearranges the elements of a list. The number of arrangements, say of a deck of cards, is finite, so eventually you have to arrive at an arrangement you’ve produced before, and history will repeat itself. Along the way, some cards may move in smaller cycles than others. Example For example, consider the permutation […] The post Long permutations and long cycles first appeared on John D. Cook.

Posted on: 13 November 2026 | 5:59 am

Balanced Incomplete Block Designs

Suppose you have n different fertilizers you want to test. The simplest experiment would be to take a big plot of land, divide it into n sections, and apply each fertilizer to a section. That’s fine if you have one big enough plot of land, and the land itself doesn’t matter. If the fertilizer supplies […] The post Balanced Incomplete Block Designs first appeared on John D. Cook.

Posted on: 10 November 2026 | 8:26 am

Combinatorial designs

The last several posts have been building up to this one, moving from tangible to more abstract. The posts on finite geometry gave examples of Steiner triples and more generally Steiner systems, introduced in the previous post. Combinatorial designs take this one step further. The previous post gave the following definition: A Steiner triple system, […] The post Combinatorial designs first appeared on John D. Cook.

Posted on: 9 November 2026 | 7:38 pm

Steiner Systems

Steiner triples Several examples from the recent posts on finite geometry are special cases of Steiner triples. A Steiner triple system, written STS(n), is a collection of three-element subsets, called blocks, of a set X with n elements, such that every two-element subset of X belongs to exactly one block. STS(7) is the smallest finite projective […] The post Steiner Systems first appeared on John D. Cook.

Posted on: 9 November 2026 | 11:01 am

Finite hyperbolic planes

Euclid’s fifth postulate says that given a line ℓ and a point P not on ℓ , there is a unique line through P parallel to ℓ. In the projective plane there are no parallel lines, and in the hyperbolic plane there are at least two lines through P parallel to ℓ. Recent posts have looked at finite […] The post Finite hyperbolic planes first appeared on John D. Cook.

Posted on: 9 November 2026 | 8:26 am

Finite Affine Planes

The previous post was on finite projective planes. This post will look at finite affine planes and the next will look at finite hyperbolic planes. Affine geometry is essentially what remains of Euclidean geometry if you keep the incidence properties, e.g. wanting to know whether things intersect, and forget about metric properties such as segment […] The post Finite Affine Planes first appeared on John D. Cook.

Posted on: 9 November 2026 | 8:21 am

Finite Projective Planes

The idea of finite geometries sounds like an oxymoron the first time you hear of it, something like dry water or cold fire, but the axioms of some kinds of geometry can indeed be satisfied by finite models. The axioms of projective plane geometry are as follows. Any two distinct points lie on exactly one […] The post Finite Projective Planes first appeared on John D. Cook.

Posted on: 8 November 2026 | 5:23 pm

Fraction comparison trick revisited

A few years ago I wrote about a curious result: a/b is usually greater than c/d when a + d is greater than b + c. And “usually” means with probability 11/12. As stated in the post, you can make this statement rigorous by choosing integers up to size N at random and taking the limit as N goes to infinity. We can also choose a, b, c, and d uniformly […] The post Fraction comparison trick revisited first appeared on John D. Cook.

Posted on: 3 November 2026 | 8:41 am

Euclidean, Spherical, and Projective Geometry

Spherical geometry is very tangible because we live on a sphere. Projective geometry seems much more exotic, and yet they’re closely related. To show how they’re connected, let’s go back to the origins of non-Euclidean geometry. Euclidean geometry Here are Euclid’s five postulates, statements about what geometric objects can be constructred. To draw a straight line from […] The post Euclidean, Spherical, and Projective Geometry first appeared on John D. Cook.

Posted on: 3 November 2026 | 6:33 am

How a programming might reinvent the projective plane

This post will show how a graphic programmer’s hack could lead to a rigorous definition of the projective plane. As mentioned in the previous post, we start by adding some “points at infinity” to Euclidean plane to take care of exceptional situations. For example, instead of saying most pairs of lines intersect at a single […] The post How a programming might reinvent the projective plane first appeared on John D. Cook.

Posted on: 3 November 2026 | 4:45 am

Making peace with the projective plane

In my newsletter I give an introduction to the latest few posts and occasionally give some additional commentary. In my latest newsletter I wrote Projective space and homogeneous coordinates seemed like arbitrary abstractions when I was a student because they were presented without any motivation. Much later I came to realize that they’re natural, almost […] The post Making peace with the projective plane first appeared on John D. Cook.

Posted on: 2 November 2026 | 8:44 am

A unified view of poles and polars

I wrote several posts on poles and polars a few days ago. First, I wrote about the dual of a spherical triangle, called the polar triangle. Then I wrote about poles and polars in plane geometry and briefly mentioned the extension to projective geometry. Poles and polars are a little awkward in the plane because […] The post A unified view of poles and polars first appeared on John D. Cook.

Posted on: 1 November 2026 | 2:29 pm

The Unbalanced Group Theorem

The classification of finite simple groups (CFSG) has been called the biggest theorem in mathematics. It is big, not necessarily in terms of its importance, but in the sense that its proof developed over the course of decades and thousands of pages of journal articles. Two days ago Axiom announced it had formalized the proof […] The post The Unbalanced Group Theorem first appeared on John D. Cook.

Posted on: 28 October 2026 | 6:51 am

The Exponential Time Hypothesis is False

If you have an expression in n Boolean variables, how long does it take to find out whether some assignment of values to the variables makes the expression true? There is an obvious upper bound: you can find out in 2n steps by exhaustive search, trying all possible ways of setting each variable to true […] The post The Exponential Time Hypothesis is False first appeared on John D. Cook.

Posted on: 27 October 2026 | 7:13 am

Inversion in an ellipse

The previous three post have been part of a series on geometric duality. The traditional but somewhat mysterious terminology is the pole of a line and the polar of a point. As explained here, the terminology was first coined in the context of spherical geometry where the term “pole” makes sense. It was then extended to the […] The post Inversion in an ellipse first appeared on John D. Cook.

Posted on: 26 October 2026 | 1:39 pm

Where else to find me

This blog is the main place I write, but I also use other platforms, either to write new content or to announce blog posts. X (née Twitter) I have a several X accounts, one personal account (@JohnDCook) and several specialized accounts (@CompSciFact, @AlgebraFact, @DataSciFact, etc.). I announce new blog posts on the most relevant account. RSS […] The post Where else to find me first appeared on John D. Cook.

Posted on: 26 October 2026 | 7:04 am

Poles and polars

The previous two posts have been about polar triangles. The first used a polar triangle to derive a theorem, and the second showed how to compute polars using linear algebra. But what exactly is a polar triangle and why is it called that? Poles and polars on a sphere Let’s start with a sphere S and a […] The post Poles and polars first appeared on John D. Cook.

Posted on: 25 October 2026 | 2:45 pm

Computing polar triangles with linear algebra

The previous post defined the polar triangle of a spherical triangle in terms of its sides and angles, but it doesn’t construct the triangle. It only specifies one of a family of triangles located anywhere on the sphere. How do we know that polar triangles exist? There is a geometric construction that starts with a […] The post Computing polar triangles with linear algebra first appeared on John D. Cook.

Posted on: 24 October 2026 | 8:01 pm

Duality in spherical trigonometry

I’ve written before about the law of cosines on a sphere: cos(c) = cos(a) cos(b) + sin(a) sin(b) cos(C). But that’s just one of two laws of cosines on a sphere. The equation above is the law of cosines for sides. The law of cosines for angles is typographically very similar, just inverting the case of […] The post Duality in spherical trigonometry first appeared on John D. Cook.

Posted on: 24 October 2026 | 7:28 pm

Working around a strange Python problem

A Python script that worked a few days ago wouldn’t work today. I suspect it might have something to do with my updating everything I could think of in response to recent security breaches. I got an error message that said error: The script contains multiple PEP 723 metadata blocks I searched on what that […] The post Working around a strange Python problem first appeared on John D. Cook.

Posted on: 22 October 2026 | 10:12 am