Prealgebra · Lesson 10.1

Adding and Subtracting Cases

Solve this lesson, free →All lessons

Counting is the backbone of combinatorics. The hard part is rarely the arithmetic. It is deciding what to count and making sure nothing gets left out or counted twice. This lesson covers the two places that goes wrong, off-by-one errors at the ends of a list and double counting when two groups overlap.

Six numbers, but only five gaps dots = 6 12 13 14 15 16 17 1 2 3 4 5 gaps = 5 Count the posts, not the gaps, so add 1.
Here are the whole numbers from \(12\) to \(17\) drawn as six dots in a row. The gold brace on top circles every dot and counts \(6\) of them. The lower brace counts only the spaces between dots, and there are just \(5\). The spaces always come up one short, because the last dot has no space after it. So if you subtract \(17-12\) you get \(5\), which is the number of gaps, not the number of dots. To count the dots you add \(1\) back, giving \(5+1=6\). Count the posts, not the gaps, so add \(1\).
Problem
An apartment has residents on every floor from the \(3\)rd to the \(11\)th, both included. How many floors have people on them?
Show a hint
  • This list is short enough to write out. Start at the \(3\)rd floor and count up one floor at a time until you reach the \(11\)th, and do not forget to count the \(3\)rd floor itself.
  • Subtracting \(11 - 3 = 8\) counts the steps you take going up, not the floors you land on. There is always one more floor than there are steps, because the floor you start on never got a step of its own.
  • Take \(11 - 3\) and then add \(1\) to put the starting floor back in the count.
Show the full solution
The floors with people are \(3, 4, 5, 6, 7, 8, 9, 10, 11\), which is \(11 - 3 + 1 = \boxed{9}\) floors. Subtracting alone gives \(8\), but that counts the steps you climb between floors. The \(3\)rd floor never got a step of its own, so add it back.
Problem
A rocket countdown calls every whole number from \(30\) down to \(0\), both included. How many numbers are called?
Show a hint
  • The numbers run from \(0\) up to \(30\), and both ends are spoken out loud, so both ends get counted.
  • Subtracting \(30 - 0\) gives the size of the gap, but it misses one of the endpoints. This is the fencepost slip.
  • For a run of whole numbers from the smaller to the larger, including both, the count is the larger minus the smaller, then plus one.
  • Do not forget that \(0\) is a real number the announcer says. It is one of the called numbers, not a skip.
Show the full solution
The announcer says every whole number from \(0\) to \(30\), both ends included, so the count is \(30 - 0 + 1 = \boxed{31}\). Plain subtraction measures the gaps between numbers, not the numbers themselves. Counting \(0\) to \(2\) gives \(0, 1, 2\), three numbers, not two.
Problem
How many whole numbers are strictly between \(1\) and \(50\), not including \(1\) or \(50\)?
Show a hint
  • The word between leaves out both ends, so \(1\) and \(50\) are off the table. What is the smallest number you are actually allowed to pick, and what is the largest?
  • Once you drop the ends, you are picking from \(2\) up to \(49\). Now you just need to count that run of whole numbers, both ends included.
  • Counting from \(2\) to \(49\) including both is \(49 - 2 + 1\). Remember the plus one, so you do not come up short by one.
Show the full solution
Between leaves out both ends, so the choices run from \(2\) to \(49\). That is \(49 - 2 + 1 = \boxed{48}\) whole numbers. The plus one puts back the starting number, which the subtraction skips.
Count the gaps, then add one span 28 − 8 = 20 8 12 16 20 24 28 step 4 step 4 step 4 step 4 step 4 20 ÷ 4 = 5 gaps 5 + 1 gives 6 terms
Counting evenly spaced numbers, here the multiples of \(4\) from \(8\) to \(28\). Do not just measure the span and stop. The span from the first term to the last is \(28 - 8 = 20\), and since each hop is \(4\) wide, that span holds \(20 \div 4 = 5\) gaps. But the gaps are the spaces between the ticks, not the ticks themselves, so there is always one more tick than gap. Add \(1\) back for the first term and you get \(5 + 1 = 6\) terms. So the count of evenly spaced numbers is the span divided by the step, plus one. It is the fencepost idea again, the gaps between the posts, and then the extra post on the end.
Problem
Lockers \(1\) through \(200\) line a hallway. Every locker whose number is a multiple of \(5\) gets painted. How many lockers get painted?
Show a hint
  • The painted lockers are the multiples of \(5\) inside the range. What is the first one, and what is the last one?
  • These numbers are evenly spaced, stepping up by \(5\) each time. Find how many steps fit, then remember to add one for the starting locker.
  • Use (last - first) divided by the step, then \(+1\). Watch the off-by-one so you do not undercount.
Show the full solution
The painted lockers are \(5, 10, 15, \dots, 200\), stepping by \(5\). The span is \(200 - 5 = 195\), which holds \(195 \div 5 = 39\) steps, so the count is \(39 + 1 = \boxed{40}\). The steps are the gaps between lockers, and the first locker takes no step to reach, so it needs its own \(+1\).
Problem
A radio station plays every 4th rank from \(96\) down to \(4\). How many songs does it play?
Show a hint
  • Going down does not change anything. The same counting idea works whether the list climbs or falls, so look at the first rank, the last rank, and the size of each step.
  • The countdown spans from \(4\) up to \(96\), a gap of \(96 - 4 = 92\), and each step is \(4\). Divide the gap by the step to count the steps, then watch out for the fencepost.
  • Steps and songs are not the same. After you find how many steps of \(4\) fit in the gap, add \(1\) to count both ends.
Show the full solution
The ranks played are \(96, 92, 88, \dots, 4\). The span is \(96 - 4 = 92\) and each step is \(4\), so there are \(92 \div 4 = 23\) steps and \(23 + 1 = \boxed{24}\) songs. Counting a falling list works exactly like counting a rising one, and the plus one catches the song you start on.
Problem
On Maple Street the even-numbered houses \(24, 26, \ldots, 150\) sit on the sunny side. How many houses are on the sunny side?
Show a hint
  • The sunny-side houses are evenly spaced, going up by \(2\) each time. Spot the first one and the last one inside the range.
  • The first even house is \(24\) and the last is \(150\). Both ends count, so this is the fencepost idea again.
  • Count the gaps with \((\text{last} - \text{first})\div\text{step}\), then add \(1\) for the house you started on.
Show the full solution
The sunny-side houses are \(24, 26, 28, \dots, 150\), stepping by \(2\). The span is \(150 - 24 = 126\), so there are \(126 \div 2 = 63\) gaps and \(63 + 1 = \boxed{64}\) houses. After \(63\) jumps of \(2\) you land on house \(150\), and you still have to count house \(24\) where you started.
One child gets counted twice 4th from front, so 4 7th from back, so 7 counted in both 4 + 7 − 1 = 10 the gold child is in both brackets, so take it off once
Picture a child standing in line who is 4th from the front and 7th from the back. The top bracket sweeps in 4 children, counting that child, and the bottom bracket sweeps in 7 children, counting that same child again. Add the two brackets and you get \(4 + 7 = 11\), but the shaded child sits in both, so the line was counted once too many. Take that one overlap off and the true count is \(4 + 7 - 1 = 10\). Whenever two groups share a member, you add the groups and subtract what they share.
Problem
You are 9th from the front and 15th from the back of a line. How many people are in the line altogether?
Show a hint
  • The 9 people from the front include you, and so do the 15 people from the back.
  • If you just add \(9+15\), you get counted once from the front and once from the back.
  • You are only one person, so subtract the one extra time you were counted.
Show the full solution
Adding gives \(9 + 15 = 24\), but you sit in both counts, so drop one copy of yourself. The line holds \(9 + 15 - 1 = \boxed{23}\) people. The front group ends at you and the back group ends at you too, so you get counted twice and the \(-1\) undoes it.
Band 14 in all Choir 9 in all 4 in both 14 + 9 − 4 = 19 the 4 in both clubs were counted twice, so subtract once
The band circle has \(14\) students and the choir circle has \(9\). If we just add, we get \(23\), but that is too many. The \(4\) students in the overlap belong to both clubs, so they sit inside the \(14\) and inside the \(9\). Adding both totals counts those \(4\) twice. To fix it we subtract the overlap once, and the number of students in band or choir is \(14 + 9 - 4 = 19\).
Problem
\(15\) kids play soccer, \(12\) play chess, and \(7\) play both. How many kids play at least one?
Show a hint
  • Watch out, the 7 kids who play both got counted once in the soccer group and once in the chess group. They were counted twice.
  • Add the two groups together first, then take away the overlap so nobody is counted twice.
  • At least one means soccer or chess (or both), which is \(15 + 12 - 7\).
Show the full solution
If we just add the two groups, \(15 + 12 = 27\). But that counts the \(7\) kids who play both twice, once inside the soccer count and once inside the chess count. To fix the double count we subtract the overlap one time, so \(27 - 7 = 20\). That gives the number who play at least one game, soccer or chess. $$\boxed{20}$$
Problem
\(22\) kids signed up for archery, \(19\) for swimming, and \(33\) signed up for at least one. How many signed up for both?
Show a hint
  • If you just add \(22+19\), every kid who signed up for both gets counted twice, once on each list.
  • That double count is exactly the kids in both. So \(22+19\) is too big by the number of both.
  • The real total signed up for archery or swimming is \(33\). Set the overcount equal to that and the leftover is the both group.
Show the full solution
Adding the lists gives \(22 + 19 = 41\), but only \(33\) kids signed up at all. The extra \(41 - 33 = \boxed{8}\) is what got counted twice. Anyone who picked both archery and swimming sits on each list, so the overcount is exactly the size of the both group.
Problem
At a 50-person reunion, \(32\) drink coffee, \(19\) drink tea, and \(8\) drink both. How many drink neither?
Show a hint
  • Start by counting how many people drink coffee or tea. You cannot just add \(32\) and \(19\), because the \(8\) who drink both would be counted once in each group.
  • Add the two groups and then take away the overlap once, so the coffee-or-tea count is \(32 + 19 - 8\). That removes the double counting.
  • Once you know how many drink at least one of the two, the neither group is just the whole reunion minus that count. Subtract from \(50\).
Show the full solution
The coffee-or-tea count is \(32 + 19 - 8 = 43\), subtracting the \(8\) who landed in both groups. Everyone else drinks neither, so that is \(50 - 43 = \boxed{7}\) people. Adding \(32 + 19\) alone gives \(51\), more than the whole reunion, which is a signal that the overlap got counted twice.
Subtraction fills the blank cell Kitten Adult Total Short hair Long hair Total 12 20 ? 16 19 55 cats in all 19 − 12 = 7 the blank long haired kitten count
Here \(55\) cats are sorted two ways at once, kitten or adult across the top and short hair or long hair down the side. Three of the four inner boxes are filled, and we also know there are \(19\) kittens in all. Look down the Kitten column. The short haired kittens and the long haired kittens together must make \(19\). Since \(12\) of them are short haired, the rest are long haired, so the blank is \(19\) minus \(12\), giving \(7\). One careful subtraction fills the missing cell. The numbers here are just an example, your practice cats will use different counts.
Problem
A garden has \(70\) plants. \(40\) are flowering, \(30\) are in the sunny corner, and \(22\) are both. How many plants are non-flowering and in the shade?
Show a hint
  • Sort the plants two ways at once, flowering or not, and sunny or shady. A little 2 by 2 table with four boxes can hold every plant.
  • Start from the corner you know. \(22\) plants are both flowering and sunny. Use the row and column totals to fill the cells around it by subtracting.
  • There are \(40\) flowering plants and \(22\) of them are sunny, so the rest of the flowering plants are in the shade. Do the same for the sunny column.
  • The plant you want sits in the box that is non-flowering and shady, the last cell left. Make the four boxes add up to \(70\).
Show the full solution
Sort the plants into four boxes, flowering or not against sunny or shady. The flowering and sunny box holds \(22\). Flowering and shady is \(40 - 22 = 18\), and non-flowering and sunny is \(30 - 22 = 8\). All four boxes add to \(70\), so the non-flowering and shady box holds \(70 - (22 + 18 + 8) = \boxed{22}\). Inclusion-exclusion gives the same number. The plants that are flowering or sunny total \(40 + 30 - 22 = 48\), and the rest, \(70 - 48 = 22\), are in neither group.
Problem
How many two-digit numbers are divisible by \(3\) or by \(5\)?
Show a hint
  • Count the multiples of \(3\) and the multiples of \(5\) separately. For each, find the first and last one in the range, then use the evenly spaced count where the count is \((\text{last}-\text{first})\div\text{step}+1\).
  • Adding the two counts is not the final answer. Some numbers got counted in both lists. Which numbers are divisible by \(3\) and by \(5\) at the same time?
  • A number divisible by both \(3\) and \(5\) is a multiple of \(15\). Count those, since each one was counted twice, and subtract that overlap once.
Show the full solution
The two-digit multiples of \(3\) run \(12\) to \(99\), so there are \((99-12)\div 3 + 1 = 30\) of them. The two-digit multiples of \(5\) run \(10\) to \(95\), so there are \((95-10)\div 5 + 1 = 18\). The numbers in both lists are the multiples of \(15\), namely \(15, 30, 45, 60, 75, 90\), which is \(6\). That gives \(30 + 18 - 6 = \boxed{42}\). Divisible by \(3\) and by \(5\) means divisible by \(15\), and each of those six numbers got counted once in each list, so it comes off once.

Practice these ideas

Practice
Seats \(5\) through \(23\) are all filled, both ends included. How many people are sitting in the row?
Show the solution
Seats \(5\) through \(23\) number \(23 - 5 + 1 = \boxed{19}\), so \(19\) people are sitting. The subtraction alone gives \(18\), which counts the steps from the first seat to the last and leaves out one end. Check it on seats \(1\) to \(3\), where \(3 - 1 = 2\) but three people are sitting.
Practice
A timeline poster marks one tick per year from \(1990\) to \(2024\), both ends included. How many ticks are on the poster?
Show the solution
One tick per year from \(1990\) to \(2024\) gives \(2024 - 1990 + 1 = \boxed{35}\) ticks. Subtracting alone counts the gaps between ticks, and a row always has one more tick than gap. From \(1990\) to \(1992\) there are three ticks, not the two that \(1992-1990\) suggests.
Practice
A scientist records the temperature at every whole degree from \(12\) down to \(-4\), both included. How many readings does she take?
Show the solution
The readings run from \(-4\) up to \(12\). The gap is \(12 - (-4) = 12 + 4 = 16\), so the count is \(16 + 1 = \boxed{17}\) readings. Subtracting a negative adds, and the plus one is the usual fencepost fix. From \(2\) down to \(0\) there are three readings even though the gap is \(2\).
Practice
A vending machine restocks every slot whose number is a multiple of \(6\), from slot \(1\) to slot \(100\). How many slots are restocked?
Show the solution
The restocked slots are \(6, 12, 18, \dots, 96\), since \(96 = 6 \times 16\) and the next multiple \(102\) is past \(100\). The span is \(96 - 6 = 90\), which holds \(90 \div 6 = 15\) steps, so the count is \(15 + 1 = \boxed{16}\). The steps are the gaps between slots, so add one for slot \(6\) itself.
Practice
Odd-numbered jerseys \(15, 17, 19, \ldots, 67\) hang on a wall. How many jerseys are there?
Show the solution
The jerseys step up by \(2\), so this is an evenly spaced count. The span is \(67 - 15 = 52\), which holds \(52 \div 2 = 26\) steps, and the count is \(26 + 1 = \boxed{27}\) jerseys. The steps are the gaps between jerseys, and you are already standing on jersey \(15\) before taking any step.
Practice
Bins \(50, 100, 150, \ldots, 900\) are audited. How many bins are audited?
Show the solution
The audited bins are \(50, 100, 150, \dots, 900\). The span is \(900 - 50 = 850\), which holds \(850 \div 50 = 17\) steps, so the count is \(17 + 1 = \boxed{18}\) bins. Steps count the gaps between bins, and there is always one more bin than gap.
Practice
A class calls \(100, 96, 92, \ldots, 20\), dropping by \(4\) each time. How many numbers are called?
Show the solution
The list drops by \(4\) from \(100\) down to \(20\). The span is \(100 - 20 = 80\), which holds \(80 \div 4 = 20\) steps, so the count is \(20 + 1 = \boxed{21}\) numbers. Those \(20\) steps are gaps between numbers, and \(100\) starts the list before any step is taken.
Practice
The first multiple of \(7\) that is at least \(20\) is \(21\), and the last no more than \(95\) is \(91\). How many multiples of \(7\) lie in the range \(20\) to \(95\)?
Show the solution
Since \(20\) and \(95\) are not multiples of \(7\), the list is \(21, 28, 35, \dots, 91\). The span is \(91 - 21 = 70\), which holds \(70 \div 7 = 10\) jumps, so the count is \(10 + 1 = \boxed{11}\). The ten jumps land on the ten numbers after \(21\), so \(21\) itself needs the extra \(+1\).
Practice
A marching band is \(15\)th from the start of the parade and \(12\)th from the end. How many groups are in the parade?
Show the solution
Adding gives \(15 + 12 = 27\), but the band sits in both counts. Take off the one duplicate and the parade has \(15 + 12 - 1 = \boxed{26}\) groups. Counting from the start includes the band and counting from the end includes it again, so it lands in the sum twice.
Practice
You are \(7\)th from the front and \(7\)th from the back of a line. How many people are in the line?
Show the solution
Adding gives \(7 + 7 = 14\), but you are in both groups, so the line holds \(7 + 7 - 1 = \boxed{13}\) people. Check it straight. Six people ahead of you and six behind you make \(6 + 1 + 6 = 13\).
Practice
\(22\) students ate pizza, \(18\) ate burgers, and \(11\) ate both. How many ate at least one?
Show the solution
Adding the groups gives \(22 + 18 = 40\), but the \(11\) who ate both sit in each count. Remove one copy and \(40 - 11 = \boxed{29}\) students ate at least one. An overlap always gets counted twice, so it comes off once.
Practice
\(28\) customers bought a taco, \(21\) bought a burrito, and \(35\) bought at least one. How many bought both?
Show the solution
Adding the lists gives \(28 + 21 = 49\), but only \(35\) customers bought anything. The excess \(49 - 35 = \boxed{14}\) is the number counted twice, which is exactly the both group. Buying both puts a customer on each list, so the sum runs over the true total by the size of the overlap.
Practice
A pet show has \(30\) cats and \(20\) dogs. Of all entries, \(28\) are short-haired and \(16\) cats are short-haired. How many dogs are short-haired?
Show the solution
Every short-haired entry is either a cat or a dog, so the short-haired cats and short-haired dogs together make \(28\). That leaves \(28 - 16 = \boxed{12}\) short-haired dogs. The \(30\) cats and \(20\) dogs are extra facts this question does not need.
Practice
How many two-digit numbers are divisible by \(4\) or by \(9\)?
Show the solution
The two-digit multiples of \(4\) run \(12\) to \(96\), so there are \((96-12)\div 4+1=22\). The two-digit multiples of \(9\) run \(18\) to \(99\), so there are \((99-18)\div 9+1=10\). A number divisible by both is divisible by \(36\), and the two-digit ones are \(36\) and \(72\), an overlap of \(2\). That gives \(22+10-2=\boxed{30}\). Those two numbers appear in each list, so they get counted twice unless you subtract them once.