Cipher 65: Melencolia

Firstly, congratulations to the British EGMO team (Olivia, Kasia, Katya and Eloise) for their impressive performance, coming eighth out of 29 competing teams. Apparently the competition was held in the same five-star hotel in Antalya enjoyed by a previous Balkan Mathematical Olympiad, a humorous report of which was written by Gabriel Gendler.

Unfortunately, I have completely run out of inspiration for ciphers. However, I would like to instead mention a very beautiful engraving by the German Renaissance polymath Albrecht Dürer, entitled Melencolia I:

Albrecht Dürer's Melencolia I -- click to enlarge.

Albrecht Dürer’s Melencolia I — click to enlarge.

One of the most interesting features of the engraving is the polyhedron on the left of the picture. Indeed, it is referred to as Dürer’s solid, and its skeleton is the Dürer graph (one of many interesting generalised Petersen graphs).

I happened to visit the Serpentine Gallery whilst in Kensington, London on the 8th April (for reasons which would have been revealed in the private cipher solvers’ area, had I actually made a cipher for today, which of course I didn’t). There was another one of Dürer’s famous engravings, namely Saint Jerome in his Study, which was unarguably my favourite art work in the gallery.

Posted in Ciphers | Leave a comment

Lifting the exponent

I overheard mention of a particular problem on a recent British Mathematical Olympiad, namely the following:

A number written in base 10 is a string of 3^2013 digit 3s. No other digit appears. Find the highest power of 3 which divides this number.

Personally, I bemoan such problems that are trivialised by the knowledge of advanced theorems, as it enables competitors to gain an unfair advantage by rote-learning many results rather than demonstrating creative mathematical thought. In this case, the question is trivialised by a rather elegant but little-known lemma called lifting the exponent.

So, what does the lemma state? Firstly, we establish the following definition:

Definition: the p-adic valuation v_p(n) of an integer n to be the highest power of p which divides n. For example, v_2(40) = 3, since 2^3 divides 40 but 2^4 does not.

Then the lemma is as follows:

Theorem (lifting the exponent): Let p be an odd prime, and a and b integers such that neither a nor b is divisible by p, but p divides their difference ab. Then v_p(a^n − b^n) = v_p(ab) + v_p(n).

Why is this true? The idea is that we factorise a^n − b^n like so, where n = k p^m and k is not divisible by p:

lte-factorisation

The factors in the final factorisation are highlighted. It is clear that it is sufficient to prove that the yellow factor is coprime to p (which is easy, since all of the terms are congruent modulo p and are non-zero) and each of the blue factors are divisible by p (easy for the same reason) but not by p², as we shall prove:

  • If a and b are congruent modulo p², this is again trivial for the same reason as before.
  • Otherwise, we have to actually rely on the property that p is odd (if p = 2, we need a and b to be congruent modulo 4 rather than modulo 2). We let x and y be equal to a^p^i and b^p^i, respectively, for the obvious value of i, such that the factor is of the form:

Γ = x^(p-1) + x^(p-2) y + x^(p-3) y^2 + … + y^(p-1)

Then we set y = x + lp for some integer l (which we can do, since y and x are clearly congruent modulo p). Expand the factor Γ to produce a sum of binomial expansions; we can ignore all terms of order p² and higher since we’re only interested in the residue modulo p². This gives the following expression:

px^{p-1} + \frac{1}{2}p^2(p-1) x^{p-1}

The rightmost term vanishes, leaving something that is clearly not divisible by p². Consequently, the proof is complete and the result follows immediately.

Zsigmondy’s theorem

Another useful fact concerning a^n − b^n is this: except in a few exceptional cases, it has a new prime factor p that does not occur in any of ab, a² − b², a³ − b³, …, a^(n−1) − b^(n−1). The exceptions to the rule are the following:

  • a = 2, b = 1, n = 6: we have 2^6 − 1^6 = 63, whose prime factors are 3 and 7, which occur in 2^2 − 1^2 and 2^3 − 1^3, respectively.
  • a + b is a power of 2, and n = 2: then a² − b² = (a + b)(ab). The first factor is a power of 2 (so no new primes there), and the second factor is itself the previous term in the sequence (so, by definition, no new primes there either).

A related statement about Fibonacci numbers (where the integers a and b are replaced with irrational algebraic integers, and an extra factor of √5 slips in) is known as Carmichael’s theorem. Zsigmondy’s theorem and Carmichael’s theorem can be mutually generalised to other Lucas sequences.

Posted in Uncategorized | Leave a comment

Cipher 64: Sic transit gloria Monday

Firstly, I have a few late items of news to discuss:

  • Maria Holdcroft (former UK EGMO team member) and I survived our skydive on Wednesday, and have so far raised in excess of £886.77 (a large portion of which is from cp4space readers!) for the Schistosomiasis Control Initiative. A video of the freefall component of my jump is available; you may also want to visit the Facebook page. I’ll be writing the cheque to the SCI imminently, so if you want to support the cause (saving children in Africa from parasitic infections) then please e-mail me as soon as possible. If you happen to enjoy watching people jump out of aeroplanes, then you may want to watch this video of my friend Mehr, who partially inspired me.
  • Today we marked the First Selection Test to decide the preliminary UK IMO squad who will be attending further training sessions in Oundle. The team for the Balkan Mathematical Olympiad will also be announced shortly on Joseph Myers’ website, but until then I’m sworn to secrecy. Congratulations, nonetheless, to our newly-appointed squad of Joe Benton, Gabriel Gendler, Frank Han, Liam Hughes, Freddie Illingworth, Andrew Kenyon-Roberts, Warren Li, Neel Nanda and Harvey Yau for their excellent performance in the selection tests, and good luck in South Africa.
  • Also, I would like to draw attention to the final of University Challenge between Trinity College, Cambridge, and Somerville College, Oxford. As with the results of the IMO selection tests, I shall not reveal the scores…

Anyway, I suppose I should provide a cipher since we are rapidly approaching a Tuesday in the middle of Season III.

magicknight

The password is eight letters long.

Posted in Uncategorized | Leave a comment

Cayley-Menger determinants

Niccolo Fontana Tartaglia, whom you may recognise from having discovered Cardano’s solution to the general cubic equation, also discovered a generalisation of Heron’s formula to compute the volume of a tetrahedron:

tartaglia

As you may expect, this can be generalised to compute the volume of any n-simplex (n = 2 reducing to Heron’s formula for the area of a triangle). I wondered how one would go about proving this identity, and then realised it can be accomplished by elementary facts about determinants. Firstly, it is easy to show the following result:

  • The volume of an n-simplex S with vertices at {0, e_1, …, e_n} is equal to 1/n!, where e_i is the ith standard basis vector.

This can be proved, for instance, by subdividing a unit cube into n! simplices, each of which is congruent to S. Now, we know that the determinant of a matrix gives the volume scale factor of the associated linear transformation, enabling us to generalise the previous result:

  • The volume of an n-simplex T with vertices at {0, a_1, …, a_n} is equal to V = det(a_1, …, a_n)/n! where we form the matrix by writing down the coordinates of a_i in the ith column.

Recall that determinants are multiplicative, so we can multiply this by its transpose to get the following equation (which is satisfyingly coordinate-independent):

  • V² = (det R)/((n!)²), where the entries of R are given by Rij = a_i · a_j.

And then by scaling, we obtain:

  • V² = (det Q)/((−2)^n (n!)²), where the entries of Q are given by Qij = −2 a_i · a_j.

This in turn leads to the following:

  • V² = (det P)/((−2)^(n+1) (n!)²), where P (an n + 2 by n + 2 matrix) is obtained by taking the matrix Q and appending two useless ‘1’s (whose only affect is to negate the determinant) to the diagonal like so:

matrix-P

Now, we want to apply determinant-preserving elementary row operations to convert the Cayley-Menger matrix M given at the beginning of the article into the matrix P. Perform the following operations in succession:

  • Subtract the 1st row from the 2nd, 3rd, …, (n+1)th rows;
  • Subtract appropriate multiples of the final column from the other columns so that the first row is (0, 0, 0, …, 0, 1);
  • Subtract the 1st column from the 2nd, 3rd, …, (n+1)th columns;
  • Subtract appropriate multiples of the final row from the other rows so that the first column is (0, 0, 0, …, 0, 1).

Then it is easy to verify that the result is equal to P, by expanding each entry in terms of dot products.

Applications of the Cayley-Menger determinant

  • The Cayley-Menger determinant is beautiful in its own right, expressing the squared volume of a tetrahedron solely as a polynomial in the squared edge lengths. Similar results hold for other polyhedra, which was a necessary component in establishing the Bellows Conjecture.
  • If we form the Cayley-Menger determinant of five nearby points in general linear position in three-dimensional space, it will allow one to deduce whether the local Gaussian curvature is positive, zero or negative. This is described in more detail here.
  • Several other theorems in distance geometry follow as special cases, such as Stewart’s theorem.
  • The distances between atoms are determined by the bond lengths, so the shapes of certain molecules can be predicted using distance geometry.
Posted in Uncategorized | 6 Comments

Most difficult chess problem

Neil Bickford has exhaustively searched the space of 5 × 4 sliding-block puzzles* to determine the one with the longest minimal solution. The unique result, which requires a whopping 235 moves, happens to be Bob Henderson’s Gauntlet puzzle:

*subject to the constraint that the objective is to move the red monomino to the upper-left corner.

Despite having far fewer positions than a Rubik’s cube, the graph of this sliding-block puzzle has a much longer diameter. Tomas Rokicki proved that the Rubik’s cube has a diameter of 20 in the half-turn metric, and there’s an upper bound of 28 for its diameter in the more natural quarter-turn metric. It has also recently been proved that the Rubik’s cube Cayley graph (which is vertex- and edge-transitive) is also Hamiltonian; it is conjectured that every Cayley graph is Hamiltonian.

Now, chess problems are harder than sliding-block puzzles, since you have to account for all possible moves that your opponent could make. For instance, ‘mate in 3’ problems are quite difficult due to the plethora of possible combinations for which one must account. This is reflected in the fact that (generalised) chess is EXPTIME-complete, whereas sliding-block puzzles are merely PSPACE-complete.

If mate-in-3 problems can be difficult, then surely the following mate-in-549 problem must be completely intractable? Even the best grandmasters can see no logic behind the majority of the moves, since the depth of the problem is beyond human comprehension. Indeed, it would probably please even Doron Zeilberger, who considers Fermat’s Last Theorem to be trivial due to the existence of a human proof.

mate-in-549

White to play and mate in 549…

This configuration was discovered by programmers at Lomonosov University, Moscow, who exhaustively catalogued all reasonable seven-piece chess endgames. White can force a win, eventually, but Black can prolong defeat for as many as 549 moves. Interestingly, the optimal sequence of moves for White involves promoting the pawn to a knight, rather than to a queen.

If we’re allowed an infinite board, then it’s possible to have mate-in-ω games and beyond, where White eventually wins, but Black can delay White by an arbitrarily long time. It is also conceivable that there is an algorithm for converting a statement in Peano arithmetic to a chess configuration in which White can force a checkmate if and only if the statement is true. (Both of these rely on the fact that rooks, bishops and queens can move by any integer in a single move.)

Posted in Chess | 27 Comments

Cipher 62: Also untitled

By the way, we’ve raised £463.00 so far for the Schistosomiasis Control Initiative (see this post for an explanation). This week’s cipher uses a couple of relatively simple ideas, although I could imagine it being difficult to cryptanalyse.

DKGOQXIWSASPYKOWEEPLELTLELFSKTPITLJFCLXSANZRYYNTAAJDQC

Good luck.

Posted in Ciphers | Leave a comment

Denser packing of pound coins discovered

Until very recently, the densest known packing of pound coins in the plane was the hexagonal lattice packing of circles, which achieves a density of π/√12 ≈ 0.9069. This was proved by Axel Thue to be the densest arrangement of points subject to the constraint that the minimum distance between any pair of points is d.

However, recently a new method of packing pound coins has been realised, which attains a marginally increased density of 4√3 − 6 ≈ 0.9282. Specifically, we take the following packing of dodecagons induced by the truncated hexagonal tiling:

This increased density is a consequence of a new dodecagonal pound coin being introduced, and not that there is a denser packing of circles (which is, of course, impossible). The coin has been designed on the basis that it is considerably more difficult to forge, and rather satisfyingly still includes one of the earliest anti-counterfeiting precautions: Isaac Newton’s milled edge.

Apparently there is a competition to decide the obverse design of the coin; maybe we could deliberately design and submit something with an even more subtle fundamental flaw than the famous gear train parity error of the two pound coin? It would be absolutely hilarious if we manage this. I feel that an overbalanced wheel or other perpetual motion machine would be too obvious, but an impossible cube with a portcullis on one face might just get past the quality control process…

(This is also the first recent British coin to lack a constant diameter, and will therefore necessitate a major overhaul of all coin-recognising machines.)

Posted in Uncategorized | 7 Comments

Cipher 61: Discrepancy

Slightly less major announcement: Stuart Gascoigne has now solved a total of 50 ciphers, earning the first ‘gold star’ icon on the solvers page.

00111101 11011100 11110011 00111110 00010110
11011110 00100000 11010111 10000001 00001000
11010111 10111111 11101101 00101110 11111010
00111110 00000010 10110001 00001100 01010011
11110100 01010101 01101011 11111101 11101110
11010110 10011100 00111011 11000000 11111111
00001001 00000110 00010011 10101000 10000110
00001010 10100110 11100110 10111011 00000111
11110001 10000101 00011110 11001101 10100001
11000011 00110100 10010011 00010101 11010100
11110110 00101100 01000111 10011100 00011001
01011000 11100011 01000000 01010000 11110010
00110000 11000101 00011110 00011111 00000111
10101000 00101001 10010000 10110011 10100110
10110110 10100111 01000000 01011011 11110011
10000001 00000110 00101000 00100110 01011010
11101001 00011101 11011000 10101001 10101101
10110110 11100111 00100010 10001100 10111000
01010011 01010101 11111100 10000010 01111000
10111111 10100110 10010101 10111011 00101101
01011101 10101001 00000110 01011000 10010100
00101001 01001011 10111001 01001010 01010111
01111100 00011001 01000100 00001100 00111011
11001110 10110111 10100000 00001111 10011010
00001000 00010111 11111111 00111110 00000011
10100100 00001101 10100011 11101011 00110000
11010101 10010011 00110001 11001111 01101111
11101101 01000110 10110011 00111100 01101011
11011010 00011101 10111000 00110010 00010101

Have fun.

Posted in Ciphers | 3 Comments

Rectangular hyperbolae and the orthocentre

Firstly, a major announcement: Maria Holdcroft (whom you may remember from the cipher solvers page) and I will be performing a charity skydive on the 2nd April! If you wish to sponsor us, please specify the amount you intend to donate by commenting either on the Facebook event page xor at the bottom of this article. All donations will go entirely to the remarkably-efficient Schistosomiasis Control Initiative (which saves approximately one life per £0.50 GBP or $0.83 USD).

Anyway, without further ado, let us begin:

The orthocentre

In an arbitrary triangle ABC, the orthocentre H is the unique intersection point of the three altitudes (lines passing through one vertex and perpendicular to the opposite side). This is unsatisfactory as a definition, since we haven’t yet proved that the point exists. However, it is perfectly valid to define the orthocentre as such:

The orthocentre is the intersection of the altitudes from A and B.

Consequently, it is the unique point H such that AH is perpendicular to BC, and BH is perpendicular to AC.

orthocentre

We wish to prove that CH is perpendicular to AB. There is a rather short proof using synthetic Euclidean geometry, although it’s rather boring. Instead, we can use algebraic projective geometry to prove the following more general statement, and then recover the concurrency of the altitudes as an immediate corollary:

A conic passing through A, B and C is a rectangular hyperbola if and only if it also passes through H.

Note that we adopt the convention that a pair of perpendicular lines is a (degenerate) rectangular hyperbola, so the lines CH and AB are perpendicular if and only if they together constitute a rectangular hyperbola.

Parametrising conics

We shall use projective coordinates, so the point with Cartesian coordinates (x, y) will have projective coordinates (x, y, 1). Moreover, the points (x, y, z) and (λx, λy, λz) are equivalent for all non-zero reals λ. Then, a general conic is an equation of the form:

  • Γ(x, y, z) = Ax² + Bxy + Cy² + Dxz + Eyz + Fz² = 0

where A, B, C, D, E, F are not all zero. A conic is degenerate if it can be factorised into two linear terms, in which case it is the union of the corresponding lines. If A, B and C are all zero, then the equation z = 0 (the line at infinity) is a factor.

We can think of these equations as vectors (A, B, C, D, E, F) in a six-dimensional vector space. Scalar multiples of a given vector all represent the same curve, so the space of conics is actually a five-dimensional projective space. However, it is more convenient to work in the vector space than the projective space since we have extra structure, namely the operations of addition and scalar multiplication.

Observe that for any point P = (x, y, z), the constraint ‘the conic passes through P’ is a linear equation in A, B, C, D, E, F. Hence, the pencil of conics passing through a given point form a five-dimensional vector subspace (or a four-dimensional projective space of curves).

Consequently, the space of conics passing through A, B, C and H is a two-dimensional vector subspace. We would like to show that the space of rectangular hyperbolae passing through A, B and C is also a two-dimensional vector subspace, which would follow from being able to express ‘the conic is a rectangular hyperbola’ as a linear equation in A, B, C, D, E, F.

A rectangular hyperbola is defined to be a hyperbola whose asymptotes are perpendicular. Since we only care about the direction of the asymptotes, we can determine whether a hyperbola is rectangular simply by where it meets the line at infinity z = 0. Consequently, it suffices to throw away any terms containing a z, so we get a simpler ‘asymptotic’ equation of the conic:

Γ(x, y, 0) = Ax² + Bxy + Cy² = 0

If we express this as a product of two lines through the origin, (Px + Qy)(Rx + Sy) = 0, then the perpendicularity of the two lines means that P/Q = -S/R, or PR + QS = 0. Expanding out, this translates to the very simple linear condition A + C = 0. Consequently, rectangular hyperbolae through A, B and C indeed form a two-dimensional vector subspace.

However, we don’t yet know that they form the same two-dimensional vector subspace as the conics passing through A, B, C and H. To prove that, it would be sufficient to find two common ‘basis vectors’ — linearly independent rectangular hyperbolae that pass through A, B, C and H. But this is easy:

  • The pair of lines AH and BC are perpendicular thus constitute a rectangular hyperbola;
  • The pair of lines BH and AC are similarly perpendicular.

They are clearly different conics, so the equations are not scalar multiples of each other and therefore are linearly independent. This completes the proof.

A relevant fact is that the locus of centres of the hyperbolae passing through A, B, C and H is the nine-point circle of ABC. Again, with the machinery in place, this is not too difficult to prove. The centre of the conic is the point such that ∂Γ/∂x = ∂Γ/∂y = 0, so it is the intersection of the lines 2Ax + By + Dz = 0 and Bx + 2Cy + Ez = 0.

Since A + C = 0, it is easy to see that the two aforementioned lines are perpendicular. Also, the linear equations in A, B, C, D, E, F mean that each of the two families of lines (as the hyperbola varies) have a common point. Consequently, we can describe the locus of centres of hyperbolae as the locus of intersections of lines l1 and l2 such that l1 passes through P1, l2 passes through P2, and l1 is perpendicular to l2. We know by Thales’ theorem that this describes a circle.

It is now trivial to see that this must be the nine-point circle, since the three degenerate rectangular hyperbolae have centres given by each of the three altitude feet, and the nine-point circle is the unique circle passing through these three feet.

Interesting examples of such hyperbolae

Recall that five points in general position determine a conic, since they correspond to five linearly independent constraints and thus fix a one-dimensional subspace (which contains a single conic). Hence, if we specify a fifth point in addition to A, B, C and H, we get a unique rectangular hyperbola. This is particularly interesting when the fifth point is a triangle centre. Examples include:

  • Kiepert hyperbola: also passes through the centroid G, the Spieker centre, the Fermat-Torricelli points, inter alia;
  • Jerabek hyperbola: also passes through the circumcentre O and symmedian point K;
  • Feuerbach hyperbola: also passes through the incentre I, Nagel point, Gergonne point and mittenpunkt.
Posted in Uncategorized | 1 Comment

Cipher 60: Tuesday comes between Wednesday and Friday this week

The more astute observers amongst you may have noticed that this particular cipher is two days later than is usual, as a consequence of a particularly busy week. Hence, I had no choice but to officially postpone Tuesday by 48 hours. Whilst this may seem to be a rather major and unwarranted decision, it is not quite in the same league as during 1560, when the Church decided to (unsuccessfully!) postpone the solar eclipse by two weeks to reduce the unmanageable influx of people confessing their sins.

(7,1) (2,2) (10,4) (10,4) (2,5) (4,1) (3,8) (2,2) (29,1) (30,2)
(15,4) (2,5) (2,4) (9,6) (19,1) (13,3) (5,1) (3,3) (15,4) (16,5)
(3,8) (13,9) (1,1) (1,2) (40,1) (40,6) (6,1) (3,3) (16,1) (16,1)
(8,1) (13,9) (2,2). (1,1) (1,2) (1,3) (12,1) (12,2) (12,5)
(13,2) (7,1) (7,2) (43,1) (41,4) (16,5) (16,4) (21,1) (6,2)
(43,1) (40,6) (16,5) (32,1) (32,1).

 

Posted in Ciphers | Leave a comment