MAS334 Combinatorics

3. Parity

Problem 3.1.

How many solutions are there for the equation 2x+6y=11? What if we insist that x and y must be integers?

Solution.

If we work with real numbers then the equation is equivalent to y=(11-2x)/6. Thus, for every real number t we have a solution (x,y)=(t,(11-2t)/6), showing that there are infinitely many solutions.

However, there are no solutions at all if we required that x and y are integers. Indeed, if x and y are integers then 2x+6y is an even integer, and so cannot be equal to 11.

Problem 3.2.

Are there integer solutions for 12x+18y=250?

Solution.

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 3, but the right hand side is not, so in fact there are no integer solutions.

Problem 3.3.

Suppose we have an n×n chessboard. Can we cover it by non-overlapping dominos? (It matters whether n 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?

Solution.

Suppose that n is even, say n=2m. Then we can cover each row of the board with m non-overlapping horizontal dominos, and thus cover the whole board with 2m2 non-overlapping dominos. The case where n=6 and m=3 is like this:

Now suppose that n 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 n is odd. There are n2 squares in total, and this number is also odd. On the other hand, each domino covers two squares, so any set of m non-overlapping dominos covers 2m 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 n×n board (where n2), with two opposite corners removed. The total number of squares is n2-2. If n is odd then n2-2 is again odd, so the nicked board still cannot be covered by disjoint dominos. Suppose instead that n is even, say n=2m. Then the nicked board has 4m2-2=2(2m2-1) 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 (2m)×(2m) board will then have 2m2 white squares and 2m2 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 2m2-2 white squares and 2m2 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.

Problem 3.4.

Consider a puzzle consisting of the following tiles:

Note that these cover 28 squares in total. Can they be arranged to cover a 4×7 rectangle? (You are allowed to rotate the tiles or flip them over.)

Solution.

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 12 white squares and 12 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 15 black and 13 white, or 13 black and 15 white. However, any 4×7 rectangle will cover 14 squares of each colour. This proves that the seven tiles cannot cover such a rectangle.

Problem 3.5.

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.

Solution.

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 P be a node that is neither the beginning nor the end of the tour. Every time we reach P on one bridge, we must leave on a different bridge. Thus, if we visit P a total of n times, then we will have crossed 2n of the bridges that touch P. However, P has an odd number of bridges, so we cannot have crossed all of them, which is a contradiction.

Remark 3.6.

The above solution can be generalised as follows. Suppose we have a network of nodes A1,,An, with some bridges between them. Let di be the number of bridges with one end at Ai. Suppose that there is a tour which starts at Ap and ends at Aq. If ip,q then the same logic as before shows that di must be even. However, we expect dp to be odd: we cross one bridge when we leave Ap as the first step of the tour, then any further visits to Ap will involve crossing one bridge to arrive and another bridge to leave, giving an odd number of bridges altogether. Similarly, we expect dq 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 Aq 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 Ap. 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:

  • (a)

    If there is a circular tour crossing every bridge precisely once, then the numbers di are all even with no exceptions.

  • (b)

    If there is a non-circular tour crossing every bridge precisely once, then the numbers di are all even with precisely two exceptions.

Thus, if three of the di’s are odd then there cannot be a tour of the required type.