Consider an equation , where are required to be strictly positive integers. Then
Consider a subset with . We can list the elements as say. We then put
If we add these equations together, then the ’s will all cancel, and we get , so we have a solution to the original equation. Conversely, if we have a solution (with ) then we have a corresponding subset
of size in . This gives a one-to-one correspondence between the set of solutions and , so the number of solutions is .
∎
We can illustrate the above proof as follows. Take and , so we are considering the equation . The proof gives a bijection between the solution set and the set of subsets of size in . One such subset is ; it corresponds to the solution , as shown below.
Consider the equation (with ). The proposition tells us that the number of solutions is . They can be listed (in dictionary order) as follows.
Consider an equation , where are required to be nonnegative integers. Then
If we put , then the variables are strictly positive integers, and must satisfy . By Proposition 2.1, the number of solutions to this new equation is , so this is also the number of solutions to the original equation. ∎
The above argument shows that nonnegative solutions to biject with subsets of size . Algebraically, the correspondence is
For a pictorial example, consider the equation , so and and . The set corresponds to the solution , as illustrated below:
We can also draw this slightly differently, by writing the binary sequence corresponding to the set :
In this representation, the numbers are just the lengths of the blocks of zeros between the ones (including the blocks at the left and right hand ends).
We can now give another approach to the problem of counting gappy sets. Suppose we want a gappy set of size in . Let be the size of the gap before , and let be the size of the gap after . These are both allowed to be zero. However, the gap between and is required to have size at least one, so we can express it as , where . As has size in , see that the total size of the gaps is . This gives the equation
On the left hand side, we have extra ones, so we can rearrange to get
Here we have variables and on the right hand side, so the number of solutions is
This agrees with the number of gappy sets, as we found in Proposition 1.23.
Consider an grid. Suppose that we want to go from the bottom left to the top right by taking a sequence of steps, each step going one space to the right or one space upwards. For example, two such routes across a grid are shown below.
How many different routes are possible?
A route from the bottom left to the top right must consist of steps, of which must be horizontal and vertical. To choose such a path, we just need to choose which of the steps are horizontal. The number of ways of making that choice is . Thus, the number of paths is .
We now have a new way to think about Proposition 2.4. Consider for example the equation . The proposition tells us that the number of solutions is . Given any solution, we can construct a grid path like this: we start at , then take horizontal steps, then a vertical step, then horizontal steps, then a vertical step, then horizontal steps, then a vertical step, then horizontal steps. Altogether this gives horizontal steps and vertical steps, so we have a grid path from to . For example, the path on the left below has horizontal segments of length , , and , so it corresponds to the equation . The path on the right starts by going upwards, which we count as having an initial horizontal segment of length . We then have a horizontal segment of length , then a vertical segment of length . We count this as two vertical segments of length one, with a horizontal segment of length in between. Finally, we have a horizontal segment of length . Thus, the corresponding solution is .
With this construction, we get one grid path for every solution to the equation, and vice-versa. Thus, the number of solutions is the same as the number of grid paths. Any such path consists of steps, of which must be vertical. Thus, the number of grid paths is , and the number of solutions to our equation is also . All this can be generalised in a straightforward way: if we have a nonnegative solution to the equation , then we can use it to make a grid path consisting of horizontal segments of lengths , and a single vertical step between these, making vertical steps and horizontal steps altogether. To specify such a path, we take steps and choose which of them should be vertical. The number of solutions is the number of possible ways to make this choice, which is . This agrees with Proposition 2.4.
For we have
The left hand side is the number of subsets of size . We will show that the right hand side can also be interpreted in the same way. To choose , we can start by choosing the largest element of , say . Then we need to choose additional elements, which must all be less than . This will only be possible if , so we can assume that . Once we have chosen , the remaining elements must be taken from , and there are ways to do this. The total number of possible choices is therefore , as required. ∎
We will argue by induction on . The base case is when . As , we must also have in this case. The claim is then that , and this is true because .
Now suppose that and . We can assume as an induction hypothesis that
Adding to both sides gives
However, Proposition 1.19 tells us that the left hand side is the same as , so we see that as claimed. ∎
In a triangle as shown, the sum of all the entries is .
Let be the sum of all the numbers in the triangle. We can divide the triangle into stripes as follows:
The sum of the terms in the ’th stripe is , which is the same as by Proposition 1.18. Thus, the sum of all the numbers in the triangle is . On the other hand, we can take and in Proposition 2.9 to get
If we put , this becomes
as claimed. ∎
Consider the same triangle again.
We have marked four different upward-pointing subtriangles. How many such subtriangles are there in total?
Consider the following picture:
The shaded triangle appears as the bottom right corner of three different subtriangles, one of size , one of size and one of size , which are also shown in the picture. Because of this, we have marked the shaded triangle with a . In the same way, for each upward triangle of size one, we can count all the subtriangles that have as the bottom right corner, and mark with that number. We get the following picture:
The total number of all subtriangles is the sum of the numbers in this picture. This is just the same as the sum considered in Proposition 2.10 (with ), so the total number of subtriangles is .
More generally, if we start with a triangle of size , the total number of upward-pointing subtriangles is .
The Fibonacci numbers are defined by and and for all . For example, we have
For all we have
(Recall here that is defined to be zero if , so the terms in the sum are eventually zero.)
Put , so the claim is that . We will prove this by induction. For the first few cases, we have
Now suppose that , and consider . Proposition 1.19 tells us that . This gives
The first sum here directly matches the definition of . In the second sum, we note that the term for is , so we can start from instead of . We can then rewrite the sum in terms of the variable , so that and and . The second sum then becomes , which is . We now see that . We can assume as an inductive hypothesis that and , so we have . Using the definition of the Fibonacci numbers, this becomes , as claimed. ∎
Suppose we have points in anticlockwise order around the unit circle, and we draw a line from to for each . Suppose that the points are in general position, so there is no point where more than two of the lines cross. Then the resulting diagram has lines, and interior crossing points, and regions.
The following picture shows the case shows the case . The number of lines is , which is as expected. The number of interior crossing points (marked in black) is , which is as expected. The lines divide the disk into regions, and as expected.
As , we see that the number of lines is the number of possible subsets of size two, which is .
Now suppose we have a subset of size . We can list the elements in order as with . As we have numbered the points in order around the circle, we find that the line meets the line at a single point lying inside the circle:
This construction gives a bijection from the set of subsets of size to the set of internal crossing points, so the number of such points is as claimed.
Now suppose we start with an empty disc, and add in the lines one by one. At each stage, we keep track of the number of lines, the number of internal crossings and the number of regions. We also keep track of the number . At the beginning (stage 0) there are no lines or crossings, and the disc is a single undivided region, so and and . More compactly, we can write . At stage , we add a single line, which splits the disk into two regions, but there are still no crossings. We therefore have and and and , or in other words . At stage , we add a second line, and there are several different possibilities, depending on how the two lines are placed relative to each other. However, we find that all three possibilities still have .
In fact, we claim that stays equal to throughout the whole process. Indeed, suppose we add in a new line from to . This may create new crossing points. We list these in order (moving from to ) as say, and we also write and . This divides the new line into segments , for . Each of these segments cuts one of the old regions into two new regions, so the number of regions increases by . At the same time, increases by and increases by , so the combination is unchanged. (It can also happen that there are no new crossing points; then everything works in essentially the same way, but with .) At stage we have , so at the last stage we still have . However, at the last stage we have added in all the lines, so by our previous discussion we have and . We now see that
and we can rearrange this to get as claimed. ∎