# For 15 year olds, are there exercises — with full solutions — on the Fence Post or Off by One error?

Which books contain practice questions — preferably with full solutions — to assist 15 year olds with the Fence Post or Off by One error?

Most students at my institution have not heard of this name, though some recognized the error. Some of them are hankering after more practice exercises, to assist them with preventing it! Even after I cover the concept in general, though without exercises, too many of them fail to spot and avoid it on exams and tests.

• @JW 15 year olds. I edited my post. Jan 18 at 22:43
• A very specific issue that seems to come up in pre-algebra or even earlier. If not identical, this is similar to the ticket seller issue. "You sold tickets numbered X thru Y, how many sold?" Y-X+1. Huh? Say you sold 1-6, you actually sold 6 tickets, not 5. Jan 20 at 15:20
• "Subtraction is a span between numbers, not a count." - huh? Subtraction is a span, not a count? By way of construction, a mark on a number line is distance from the origin. So, these marks identify segments that you call "spans". 1 to 10 is nine segments. When you count houses, it is 52-0, not 52-1, there is no discrepancy here. "Floors 8 to 11" or "days 8 to 11" mean to me "floors between 7 and 11". If you want to say "floors between 7 and 12" say "floors 8 through 11". "Fence post" is limit point of closed interval. You should teach intervals, not bogus "fence post" problems. Jan 20 at 19:09
• Teach a bit of programming, give some "for" loops involving an external variable, and they'll see more than they ever want. Full disclosure: They may not get better at avoiding them. Jan 21 at 14:23
• I still have trouble with being off by one, and I'm a professional combinatorialist. Jan 26 at 17:06

You only really need to give them one type of question:

Count the numbers in this list: [insert any finite easily indexed sequence]

Examples:

$$4,5,6, \cdots, 27$$

$$112, 115, 118, \cdots, 334$$

$$4, 2.5, 1, \cdots, -29$$

$$4, 8, 16, \cdots, 2048$$

$$9, 16, 25, 36, \cdots, 400$$

And then teach them to solve ALL of these problems by method of bijections, forming one-to-one pairings of lists by explicit rules.

For instance, take the second one: $$112, 115, 118, \cdots, 334$$

Subtract $$100$$ to everything in the list: $$12, 15, 18, \cdots, 234$$

Divide by $$3$$: $$4, 5, 6, \cdots, 78$$

Subtract $$3$$: $$1,2,3, \cdots, 75$$

So the answer is $$75$$.

There are infinitely many ways to do this problem, and it doesn't matter how many bijections you make, you will always end up at the correct answer. This is superior to the formula for the number of items in a sequence for several reasons:

• the formula doesn't explain why the +1 is there
• the formula must be memorized
• this method is more general and doesn't require you memorize the +1
• this method also very easily explains why the +1 is there
• this method can be applied in way more creative ways

It is critically important to teach this method for some major reasons. Firstly, bijections are the foundation of combinatorics. It is how we define counting in addition to being an exceedingly powerful abstract problem solving tool. Secondly, this method gives students a way to guarantee they have the correct answer; it is the way in which we check our answer to counting problems in the same way that plugging values into an equation is how we check our answer in algebra and how proofs are how we check our answer in geometry. And finally, if they get used to applying this method and thinking about counting in this way, it builds excellent habits and avoids many common pitfalls.