8
$\begingroup$

Once I met a friend and he told me the following story:

I recently cut my wooden 8x8 chess board into different rectangular pieces along the edges. Each square of the chess board has a length of one inch. I have one piece in my pocket, but you don't know its size even if I tell you the length of its diagonal and its area.

What is the size of the piece in his pocket?

$\endgroup$
  • 1
    $\begingroup$ Maybe "but you don't know its side lengths even if I tell you one of either the length of its diagonal or its area" would be better? $\endgroup$ – Jonathan Allan Jan 26 at 0:24
19
$\begingroup$

If a rectangular piece of chessboard is $a\times b$ squares in size, then its diagonal squared is $a^2+b^2$ and its area squared is $a^2\cdot b^2$, and therefore the quantities $a^2,b^2$ are the roots of the quadratic equation $x^2-D^2x+A^2=0$ where $D,A$ are the diagonal and area. But this is enough to determine $\{a^2,b^2\}$ completely: these values are $\frac12D^2\pm\sqrt{\frac14D^4-A^2}$ in some order. Since $a,b$ are non-negative, this also determines $\{a,b\}$.

So I think your friend is lying, or doesn't think much of your mathematical abilities, or is somehow wording things in a deliberately misleading way (e.g., "ha ha! you know the length and width but you don't know the thickness!").

Or maybe what he means is that knowing the length of the diagonal isn't enough, and knowing the area isn't enough, even though knowing both together would be enough? In that case I think the only answer is

a diagonal of $\sqrt{65}$ (possible sizes $8\times1$ and $7\times4$) and area of 8 (possible sizes $8\times1$ and $4\times2$).

But then he should have said "or", not "and".

Incidentally,

strictly speaking, to verify that the above answer (to the modified problem with "or" instead of "and") works we would need to check that $8\times1$, $7\times$4 and $4\times2$ pieces can each occur as part of a dissection of an $8\times8$ square into integer-sized axis-aligned rectangles no two of which are the same. (Otherwise we might be able to tell the size after all.) But that isn't a very stringent requirement and in fact we can put them all into the same dissection. (So you wouldn't be able to tell what piece is in his pocket even if he showed you how he'd cut up the chessboard and told you either the diagonal or the area.)
enter image description here

I claimed that that's the only answer, and maybe I should explain why. One possible answer would be "you can just run through all the possible diagonals with a computer", but I didn't. Here, with apologies for advanced mathematics, is what's "really" going on. If you don't know this stuff already, you will need to take it very slowly if you want to understand it :-).

Consider the diagonal, of length $D$, such that $D^2=a^2+b^2=(a+ib)(a-ib)$ where $i$ is a square root of $-1$. It turns out that notions like "prime number" and "prime factorization" work pretty much the same way in "the integers extended with $i$" as they do in the ordinary integers; in $\mathbb{Z}[i]$, which is mathspeak for "the integers extended with $i$", the "ordinary" primes that are 1 less than a multiple of 4 (e.g., 3, 7) are still primes, but every other "ordinary" prime $p$ can be written in a basically-unique way as $x^2+y^2$, so that $p=(x+iy)(x-iy)$ and those two factors are prime in $\mathbb{Z}[i]$. $x+iy$ and $x-iy$ are said to be "conjugate". Now, split $D^2$ into its ($\mathbb{Z}[i]$) prime factors. To get $a,b$ with the properties we need, what we have to do is to look at each batch of equal-or-conjugate prime factors and split them into two equal-size halves. So, e.g., if $D^2=3^2\cdot(2+i)(2-i)\cdot(4+i)^2(4-i)^2$ then we have to put one 3 in each half; $2+i$ goes in one half and $2-i$ in the other; and then we can put 0, 1, or 2 copies of $4+i$ in the first half along with (respectively) 2, 1, or 0 copies of $4-i$, and the rest in the other half. So in order to get two or more genuinely different solutions, you need either two different "splitting" primes (ones that aren't 1 less than a multiple of 4) in the "ordinary" prime factorization of $D^2$, or else one such prime that's at least squared. Actually, things are a bit worse than that. Although 2 "splits", it does so in a rather special way that has to do with the fact that $1-i=-i(1+i)$, which turns out to mean that the apparent flexibility of being able to choose which half to put $1+i$ into and which half to put $1-i$ into doesn't actually lead to genuinely different choices of $a,b$. So we need two or more odd splitting primes. And if all we have is one squared splitting prime -- let's say 5 -- then we do get two solutions but one of them is degenerate -- it has $a=0$ or $b=0$ and therefore doesn't correspond to an actual rectangular piece of chessboard. (E.g., if $D^2=5^2$ then our two solutions are $3^2+4^2$, which is good, and $5^2+0^2$, which is degenerate.) So actually we need either two distinct 4k+1 primes, or one that's at least cubed. The smallest option with two distinct such primes is $5\times13=65$, which is the solution I gave above. The next is $5\times17=85$ but one of its two solutions is $9^2+2^2$ and of course 9 is too big. The next is $5\times29=145>2\times8^2$ which means any rectangle with diagonal $\sqrt{5\times29}$ or bigger has a diagonal longer than any line that fits on a chessboard. What about cubes? The smallest is $5^3=125$ (and next after that is $13^3$ which is much much too big). The representations of 125 as a sum of two squares are $11^2+2^2$ and $10^2+5^2$ and neither of these will fit on a chessboard. So 65 really is the only option that works.

That probably sounds awfully complicated, but if you're familiar with this stuff and tolerably good at mental arithmetic then it's actually pretty obvious that the solution I mentioned above is going to be the only one. A mathematics degree has to be useful for something, right?

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ +1 for Gaussian integers :D $\endgroup$ – im_so_meta_even_this_acronym Jan 25 at 2:43
  • 3
    $\begingroup$ I was all set to jokingly “-1, no use of ‘obvious(ly)’ in the explanation” until I got to practically the very end. Curses, foiled again. $\endgroup$ – Rubio Jan 25 at 4:13
  • $\begingroup$ Right, I confused the "and" and "or" in my post and I'm impressed to see a solution for this case as well. Coming back to the first part (the "or" part), I had piece 1x8 in mind as the only solution. An area shows up more than once for pieces 2x2=1x4, 2x3=1x6, 2x4=1x8, 3x4=2x6, 2x8=4x4, 4x6=3x8. The diagonal shows up more than once for d=$\sqrt{50}$ with pieces 5x5 and 1x7 and d=$\sqrt{65}$ with pieces 4x7 and 1x8. So the only piece which cannot be determined knowing diagonal lenght and area is piece 1x8. $\endgroup$ – ThomasL Jan 25 at 18:32
  • 1
    $\begingroup$ Right. Which is the solution I described, of course :-). $\endgroup$ – Gareth McCaughan Jan 26 at 16:36
  • 1
    $\begingroup$ The trickiest bit of the highbrow maths I described, which I glossed over by saying "it turns out that ...", is the theorem that a prime of form 4k+1 is always a sum of two squares. A really nice proof of this is the subject of this video on the "Mathologer" YouTube channel. I recommend it highly to anyone who enjoys this sort of thing. $\endgroup$ – Gareth McCaughan Jan 26 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.