next up previous
Next: Trominos Up: No Title Previous: No Title

Intervals

An interval is a range of one or more natural numbers. For example, [1,5] is an interval with numbers 1,2,3,4 and 5, and [6,6] is an interval with 6. The interval [2,4] contains 6 intervals [2,2], [2,3], [2,4], [3,3], [3,4] and [4,4].

a) How many different intervals are there in the interval [1,4]?

There are 10 intervals: [1,1], [1,2], [1,3], [1,4], [2,2], [2,3], [2,4], [3,3], [3,4] [4,4]; see part c.

b) How many different intervals are there in the interval [3,9]?

There are 28 intervals: see part c.

c) If there are k intervals in [1,n], n > 0 how many intervals are there in [1,n+1]?

There are k+n+1. This question is essentially asking how the number of intervals changes as you increase the range that they're defined over. It's easy to see that all of the old intervals will still be there when the range increases, so the question is really, how many new ones are created. In the case of [1,n+1] the new intervals will be $[1,n+1], [2,n+1], \ldots [n,n+1]$, and [n+1,n+1]. How many is this? n+1 intervals. Note that you can't just subtract since that doesn't count [1,n+1].

d) If there are k intervals in [m,n], n > m > 0 how many intervals are there in [m,n+1]?

There are k+n+2-m. By the same argument as above, it's only necessary to count the new intervals and add them onto the old ones. The new ones are $[m+0,n+1],[m+1,n+1],[m+2,n+1],\ldots,[m+(n-m),n+1],
[m+(n-m)+1,n+1]$. The total count is k+n+2-m. The best way to see this is by writing out a few examples. If m=3 and n=4 then there are only 3 intervals inside [3,4] which are [3,3], [3,4], [4,4]. There are 6 intervals inside [3,5]: all the old ones plus [3,5], [4,5], [5,5]. Checking the formula we have k=3, m=3, n=4 and k+n+2-m=3+4+2-3=6 which checks out. And it's also useful to see that the formula doesn't contradict the formula that was obtained for [1,n] since the new one is just a special case of the old one. The new gives k+n+2-m=k+n+1 which agrees with the old formula which is a good check of the solution.


next up previous
Next: Trominos Up: No Title Previous: No Title
Andrew Wildenberg
1999-10-21