0% found this document useful (0 votes)
17 views32 pages

EppDM5e 04 05

Uploaded by

kwaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views32 pages

EppDM5e 04 05

Uploaded by

kwaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

CHAPTER 4

ELEMENTARY NUMBER THEORY


AND METHODS OF PROOF

Copyright © Cengage Learning. All rights reserved.


Direct Proof and Counterexample Ⅴ: Division into
4.5 Cases and the Quotient-Remainder Theorem

Copyright © Cengage Learning. All rights reserved.


Direct Proof and Counterexample Ⅴ: Division into Cases
and the Quotient-Remainder Theorem (1/2)

If n is positive, the quotient-remainder theorem can be


illustrated on the number line as follows:

3
Direct Proof and Counterexample Ⅴ: Division into Cases
and the Quotient-Remainder Theorem (2/2)

If n is negative, the picture changes. Since n = dq + r,


where r is nonnegative, d must be multiplied by a negative
integer q to bring dq either exactly to n (in which case r = 0)
or to a point below n (in which case the positive integer r is
added to bring dq + r back up to n).

This is illustrated as follows:

4
Example 4.5.1 – The Quotient-Remainder Theorem

For each of the following values of n and d, find integers q


and r such that n = dq + r and 0 ≤ r < d.

a. n = 54, d = 4

b. n = −54, d = 4

c. n = 54, d = 70

5
Example 4.5.1 – Solution
a. 54 = 4 · 13 + 2; hence q = 13 and r = 2.

b. −54 = 4 ·(−14) + 2; hence q = −14 and r = 2.

c. 54 = 70 · 0 + 54; hence q = 0 and r = 54.

6
div and mod

7
div and mod (1/1)

8
Example 4.5.2 – Computing div and mod by Hand or with a Four-
Function Calculator

Compute 32 div 9 and 32 mod 9 by hand or with a four-


function calculator.

9
Example 4.5.2 – Solution (1/2)
Performing the division by hand gives the following results:

To use a four-function calculator to compute n div d for a


nonnegative integer n and a positive integer d, just divide n
by d and ignore the part of the answer to the right of the
decimal point.

10
Example 4.5.2 – Solution (2/2) continued

To compute n mod d, substitute n div d in place of q and n


mod d in place of r in the equation n = dq + r. The result is
n = d ·(n div d) + n mod d.
Solving for n mod d gives
n mod d = n − d ·(n div d).
Thus when you use a four-function calculator to divide 32
by 9, you obtain an expression like 3.555555556.
Discarding the fractional part gives 32 div 9 = 3, and so
32 mod 9 = 32 − 9 ·(32 div 9) = 32 − 27 = 5.

11
Example 4.5.4 – Solving Problems about mod

a. Prove that if n is a positive integer, then n mod 10 is the


digit in the ones place in the decimal representation for
n.

b. Suppose m is an integer. If m mod 11 = 6, what is 4m


mod 11?

12
Example 4.5.4 – Solution (1/2)
a. Proof: Suppose n is any positive integer. The decimal
representation for n is dk dk − 1 …d2 d1 d0, where d0, d1, d2,
… , dk are integers from 0 to 9 inclusive, dk ≠ 0 unless n
= 0 and k = 0,

and d0 is the digit in the ones place. Factoring out 10


from all but the final term gives

Thus n = 10 ·(an integer) + d0, and so n mod 10 = d0,


which is the digit in the ones place in the decimal
representation for n.

13
Example 4.5.4 – Solution (2/2) continued

b. Because m mod 11 = 6, the remainder obtained when m


is divided by 11 is 6. This means that there is some
integer q so that
m = 11q + 6.
Thus
4m = 44q + 24 = 44q + 22 + 2 = 11(4q + 2) + 2.
Since 4q + 2 is an integer (because products and sums
of integers are integers) and since 2 < 11, the remainder
obtained when 4m is divided by 11 is 2. Therefore,
4m mod 11 = 2.

14
Representations of Integers

15
Representations of Integers (1/4)
We defined an even integer to have the form twice some
integer. At that time we could have defined an odd integer
to be one that was not even.

Note The fact that any integer is either even or odd is


called the parity property.

16
Example 4.5.5 – Consecutive Integers Have Opposite Parity

Prove that given any two consecutive integers, one is even


and the other is odd.

M = 2k;
M + 1= 2k + 1;

P = 2k + 1;
P + 1 = 2k + 2

17
Example 4.5.5 – Solution (1/2)
Two integers are called consecutive if, and only if, one is
one more than the other. So if one integer is m, the next
consecutive integer is m + 1.
To prove the given statement, you can divide the analysis
into two cases: case 1, where the smaller of the two
integers is even, and case 2, where the smaller of the two
integers is odd.
Case 1 (m is even): In this case, m = 2k for some integer
k, and so m + 1 = 2k + 1, which is odd [by definition of odd].
Hence in this case, one of m and m + 1 is even and the
other is odd.

18
Example 4.5.5 – Solution (2/2) continued

Case 2 (m is odd): In this case, m = 2k + 1 for some


integer k, and so m + 1 = (2k + 1) + 1 = 2k + 2 = 2(k + 1).
But k + 1 is an integer because it is a sum of two
integers. Therefore, m + 1 equals twice some integer,
and thus m + 1 is even. Hence in this case also, one of m
and m + 1 is even and the other is odd.
It follows that regardless of which case actually occurs
for the particular m and m + 1 that are chosen, one of m
and m + 1 is even and the other is odd. [This is what was
to be shown.]

19
Representations of Integers (2/4)

20
Representations of Integers (3/4)

21
Example 4.5.6 – Representing Integers mod 4

Show that any integer can be written in one of the four


forms

n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3

for some integer q.

22
Example 4.5.6 – Solution
Given any integer n, apply the quotient-remainder theorem
to n with the divisor equal to 4. This implies that there exist
an integer quotient q and a remainder r such that
n = 4q + r and 0 ≤ r < 4.
But the only nonnegative remainders r that are less than 4
are 0, 1, 2, and 3.
Hence
n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3
for some integer q. In other words, n mod 4 equals 0, 1, 2,
or 3.

23
Example 4.5.7 – The Square of an Odd Integer

Prove: The square of any odd integer has the form 8m + 1


for some integer m.

24
Example 4.5.7 – Solution
If checking some examples convinces you that the
statement may be true, begin to develop a proof by asking,
“Where am I starting from?” and “What do I need to show?”
To help answer these questions, introduce variables to
rewrite the statement more formally.

Formal Restatement: ∀ odd integer n, ∃ an integer m


such that

From this, you can immediately identify the starting point


and what is to be shown.

25
Example 4.5.7 – Solution (1/3) continued

Starting Point: Suppose n is a particular but arbitrarily


chosen odd integer.

To Show: ∃ an integer m such that

This looks tough. Why should there be an integer m with


the property that That would say that
is an integer, or that 8 divides Perhaps you could
make use of the fact that

26
Example 4.5.7 – Solution (2/3) continued

Does 8 divide (n + 1)(n + 1)? Since n is odd, both (n − 1)


and (n + 1) are even. That means that their product is
divisible by 4. But that’s not enough. You need to show that
the product is divisible by 8.

You could try another approach by arguing that since n is


odd, you can represent it as 2q + 1 for some integer q.

Then It is clear
from this analysis that can be written in the form 4m + 1,
but it may not be clear that it can be written as 8m + 1.

27
Example 4.5.7 – Solution (3/3) continued

Yet another possibility is to use the result of Example 4.5.6.


That example showed that any integer can be written in
one of the four forms 4q, 4q + 1, 4q + 2, or 4q + 3. Two of
these, 4q + 1 and 4q + 3, are odd. Thus any odd integer
can be written in the form 4q + 1 or 4q + 3 for some integer
q. You could try breaking into cases based on these two
different forms.

28
Representations of Integers (4/4)

29
Absolute Value and the Triangle
Inequality

30
Absolute Value and the Triangle Inequality (1/2)

The triangle inequality is one of the most important results


involving absolute value. It has applications in many areas
of mathematics.

31
Absolute Value and the Triangle Inequality (2/2)

32

You might also like