Section 4.4 Proof by Cases
In this section we will learn another proof technique, proof by cases. We will also see another big discrete math theorem, the Quotient-Remainder Theorem.
In the last section, we looked at the idea of divisibility. Remember, this is a relationship between two integers, not actual division. We will continue to focus on integers. One of the issues with division of integers is that if you divide two integers, you no longer necessarily have an integer. What if the only numbers we are allowed to use are integers? Can we still somehow think of division? Well, yes, this is in fact how you were probably introduced to division long ago. When you were first learning arithmetic, you only worked with integers.
Suppose you want to divide 10 by 5. This is easy, But what if you want to divide 10 by 4? Now 4 does not “go evenly” into 10 (in other words, 4 does not divide 10). In this case, we get a remainder. In particular, 4 “goes into” 10 two times with a remainder of 2. Or, has quotient 2 and remainder 2.
OK, we want to formalize this idea of division, making sure we are only using integers. We know 5 divides 10, since Can we do the same sort of thing for 10 and 4? Almost. In this case,
In general, given any integers with we can find integers with In general, are not unique. For example, and and But as we noted, we want to think of as the remainder. If we are more specific about conditions on the remainder, then and are unique.
We will see the existence part of the proof in Section 5.4.
This theorem is usually called the Division Algorithm. We won’t use that name here since it can be confusing. In particular, the Division Algorithm is not really an algorithm.
Some important observations: the remainder must be nonnegative. It can be 0. This is what happens when Although can be any integer, we will limit to being positive. The Quotient-Remainder Theorem can be extended to any but we will just need in this class.
Example 4.4.2. Finding Quotients and Remainders.
Let Find the quotient and remainder
Answer 1.
Let Find the quotient and remainder
Answer 2.
Let Find the quotient and remainder
Answer 3.
Let Find the quotient and remainder
Answer 4.
Let Find the quotient and remainder
Answer 5.
Activity 4.4.1.
(a)
(b)
(c)
(d)
In computer science it is useful to have functions that give the quotient (div) and remainder (mod). The common notation is
We can use the Quotient-Remainder Theorem to find representations of the integers by grouping integers with the same remainder.
For example, if we let what are the possible remainders? In this case, or Thus, there are two possible forms for or We see that these are the two forms corresponding to being even or odd. Now, as a corollary of the Quotient-Remainder, we have that every integer must be even or odd.
We can use the Quotient-Remainder Theorem to get other forms, as well. For example, if the possible forms are or We can use these forms to get different cases for the integers.
Proof by Cases.
To prove by cases,
- Break
into smaller subsets, Make sure every element in is in one of the subsets. -
Prove each case separately. Make sure you state each case clearly.Case 1:Proof ofCase 2:Proof ofetc.
- Conclude
holds for all
In choosing your subsets, make sure you cover all the elements of Your subsets do not need to be similar. For example, one set could be all the nonzero integers and the other just the set with 0.
We saw an example in Theorem 4.3.5, where we broke into the set of primes and the set of composites.
Example 4.4.3. Proof by Cases.
Prove given any two consecutive integers, one is even and one is odd.
Proof.
Let and be consecutive integers.
Case 1: Let be even. Then for some Then for Hence is odd.
Case 2: Let be odd. Then for some Then for Hence is even.
Thus, for any two consecutive integers, one is even and one is odd.
Activity 4.4.2.
Hint.
There are four cases, depending on whether and are even or odd.
Activity 4.4.3.
Example 4.4.4. More Cases.
Prove that the square of any odd integer has the form for some
First, let’s try to just prove this directly.
Let be odd. Then Thus,
It is not clear has the form
If we try using some cases, we may get a bit more to work with. We know any integer has the form or But only and are odd. Thus, we can try cases with and
Proof.
Let be odd.
Case 1: Let for some Then
for some Let Then has the form
Case 2: Let for some Then
for some Let Then has the form
Thus, any odd integer has the form
Note, what this theorem really says is that the square of an odd integer must have remainder 1 when divided by 8. That might be a little surprising.
Activity 4.4.4.
Use the Quotient Remainder Theorem to find the possible forms of an integer when
Hint.
Activity 4.4.5.
Hint.
Reading Questions Check Your Understanding
1.
2.
3.
4.
5.
6.
Review: Give the negation of
7.
Review: Give the contrapositive of
Exercises Exercises
1.
and and
2.
3.
Suppose is a positive integer and is any integer. If what is the remainder when the Quotient-Remainder Theorem is applied to with divisor
4.
5.
Hint.
Think Quotient-Remainder Theorem.
6.
Let Prove if has remainder 5 when divided by 7 and has remainder 6 when divided by 7, then has remainder 2 when divided by 7.
Hint.
Think Quotient-Remainder Theorem.
7.
You have attempted 1 of 8 activities on this page.