How many solutions are there for the equation ? What if we insist that and must be integers?
If we work with real numbers then the equation is equivalent to . Thus, for every real number we have a solution , showing that there are infinitely many solutions.
However, there are no solutions at all if we required that and are integers. Indeed, if and are integers then is an even integer, and so cannot be equal to .
Are there integer solutions for ?
By comparison with the previous example, we might be tempted to say yes: both the left and right hand sides are even, so there is no problem with parity. However, just because there is no problem with parity, we cannot conclude that there are no other problems. In fact, the left hand side is always divisible by , but the right hand side is not, so in fact there are no integer solutions.
Suppose we have an chessboard. Can we cover it by non-overlapping dominos? (It matters whether is even or odd). What if we remove two opposite corners from the board; can we cover the remainder of the board by non-overlapping dominos?
Suppose that is even, say . Then we can cover each row of the board with non-overlapping horizontal dominos, and thus cover the whole board with non-overlapping dominos. The case where and is like this:
Now suppose that is odd. We could try to cover the board like this:
This fails, because there is one extra square that we have not covered. However, this does not really prove anything. Our first unimaginative approach has failed, but perhaps that is just because we were not clever enough; perhaps there is a different approach of stupendous complexity and cunning that will cover the whole board? In fact that is not the case, but we need a proper proof to explain why. Fortunately, that is not very difficult. We are assuming that is odd. There are squares in total, and this number is also odd. On the other hand, each domino covers two squares, so any set of non-overlapping dominos covers squares, and this number is even. Thus, it is impossible for a set of non-overlapping dominos to cover the whole board.
Now suppose we consider a nicked board (where ), with two opposite corners removed. The total number of squares is . If is odd then is again odd, so the nicked board still cannot be covered by disjoint dominos. Suppose instead that is even, say . Then the nicked board has squares, and this number is even. We might be tempted to deduce that the board can be covered by disjoint dominos, but that would be too hasty. Suppose that we colour the squares in the usual chessboard pattern. The full board will then have white squares and black squares. The two removed corners can be joined by a diagonal line, and all the squares on that line will have the same colour, so in particular, the two removed corners will have the same colour. Suppose for the sake of example that they are both white. This nicked board will then have white squares and black squares. However, every domino will cover one white square and one black square. Thus, any set of disjoint dominos will cover the same number of black squares as white squares. As the nicked board has more black squares than white squares, it cannot be covered by a disjoint set of dominos.
Consider a puzzle consisting of the following tiles:
Note that these cover squares in total. Can they be arranged to cover a rectangle? (You are allowed to rotate the tiles or flip them over.)
We can imagine placing the tiles on a grid that is coloured like a chessboard. It is not hard to see that however you place the first six tiles, each of them will cover two white squares and two black squares. (One way to see this is to note that each of the first six tiles can be divided into two non-overlapping dominos.) That makes white squares and black squares altogether. However, the last T-shaped tile is different: however you place it, it will cover either three black squares and one white square, or three white squares and one black square. Thus, the full set of seven tiles will cover either black and white, or black and white. However, any rectangle will cover squares of each colour. This proves that the seven tiles cannot cover such a rectangle.
When the mathematician Euler was living there, the city of Königsburg used to have a network of bridges like this:
People were discussing the following problem: is it possible to do a tour of the city which crosses each bridge precisely once? Ideally the tour should start and end in the same place, but we do not insist on that.
Euler used a parity argument to show that no such tour is possible. Indeed, there are four sections of land in the city: the north bank (N), the south bank (S), the western island (W) and the eastern island (E). We will call these nodes. Nodes N, S and E are each connected to three bridges, and W is connected to five bridges: in each case, the number is odd. Now suppose we have a tour of the city that crosses each bridge precisely once. Let be a node that is neither the beginning nor the end of the tour. Every time we reach on one bridge, we must leave on a different bridge. Thus, if we visit a total of times, then we will have crossed of the bridges that touch . However, has an odd number of bridges, so we cannot have crossed all of them, which is a contradiction.
The above solution can be generalised as follows. Suppose we have a network of nodes , with some bridges between them. Let be the number of bridges with one end at . Suppose that there is a tour which starts at and ends at . If then the same logic as before shows that must be even. However, we expect to be odd: we cross one bridge when we leave as the first step of the tour, then any further visits to will involve crossing one bridge to arrive and another bridge to leave, giving an odd number of bridges altogether. Similarly, we expect to be odd: throughout most of the tour we use bridges in pairs, then we have one additional bridge for the last step of the tour when we arrive at and do not leave again. However: there is one exception to this picture: we could have a circular tour, which starts and ends at the same node . Then we have a bridge for the first step, a bridge for the last step, and pairs of bridges in between, giving an even number altogether. In summary:
If there is a circular tour crossing every bridge precisely once, then the numbers are all even with no exceptions.
If there is a non-circular tour crossing every bridge precisely once, then the numbers are all even with precisely two exceptions.
Thus, if three of the ’s are odd then there cannot be a tour of the required type.