Section 5.2 - Concordia University

COMP232 - Mathematics for Computer Science
Tutorial 10
Ali Moallemi
moa [email protected]
Iraj Hedayati
h [email protected]
Concordia University, Winter 2016
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
1/9
Table of Contents
1
5.2 Strong
Exercise
Exercise
Exercise
Induction andWell-Ordering
3
25
36
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
2/9
Exercise 3
Let P (n) be the statement that a postage of n cents can be formed using
just 3-cent stamps and 5-cent stamps. The parts of this exercise outline a
strong induction proof that P (n) is true for n ≥ 8.
a) Show that the statements P (8), P (9), and P (10) are true,
completing the basis step of the proof.
answer: P (8) = 5 + 3, P (9) = 3 + 3 + 3, P (10) = 5 + 5,
b) What is the inductive hypothesis of the proof?
answer: The statement that using just 3-cent and 5-cent stamps we
can form j cents postage for all j with 8 ≤ j ≤ k, where we assume
that k ≥ 10
c) What do you need to prove in the inductive step?
answer: Assuming the inductive hypothesis, we can form k + 1 cents
postage using just 3-cent and 5-cent stamps.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
3/9
Exercise 3 Cont...
Let P (n) be the statement that a postage of n cents can be formed using
just 3-cent stamps and 5-cent stamps. The parts of this exercise outline a
strong induction proof that P (n) is true for n ≥ 8.
d) Complete the inductive step for k ≥ 10.
answer: Because k ≥ 10, we know that P (k − 2) is true, that is,
that we can form k − 2 cents of postage. Put one more 3-cent stamp
on the envelope, and we have formed k + 1 cents of postage.
e) Explain why these steps show that this statement is true whenever
n ≥ 8. answer: We have completed both the basis step and the
inductive step, so by the principle of strong induction, the statement
is true for every integer n greater than or equal to 8.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
4/9
Exercise 25
Suppose that P (n) is a propositional function. Determine for which
positive integers n the statement P (n) must be true, and justify your
answer, if
a) P (1) is true; for all positive integers n, if P (n) is true, then P (n + 2)
is true.
answer: P (n) is true for all positive odd integers n, However it
doesn’t say anything about positive even integers.
b) P (1) and P (2) are true; for all positive integers n, if P (n) and
P (n + 1) are true, then P (n + 2) is true.
answer: P (n) is true for all positive integers n, using strong
induction.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
5/9
Exercise 25 Cont...
Suppose that P(n) is a propositional function. Determine for which
positive integers n the statement P(n) must be true, and justify your
answer, if
c) P (1) is true; for all positive integers n, if P (n) is true, then P (2n) is
true.
answer: P (n) is true if n is of form, 2k for some integer k ≥ 0.
d) P (1) is true; for all positive integers n, if P (n) is true, then P (n + 1)
is true.
answer: It is the definition of mathematical induction, then for all
positive integers n it is true.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
6/9
Exercise 36
The well-ordering property can be used to show that there is a unique
greatest common divisor of two positive integers. Let a and b be positive
integers, and let S be the set of positive integers of the form as + bt,
where s and t are integers.
a) Show that S is nonempty.
answer: Let s = t = 1, then a + b ∈ S.
b) Use the well-ordering property to show that S has a smallest element
c.
answer: Since, S consists of positive integers, and it is also
nonempty. It implies from the well-ordering property that S has a
smallest element c.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
7/9
Exercise 36 Cont...
The well-ordering property can be used to show that there is a unique
greatest common divisor of two positive integers. Let a and b be positive
integers, and let S be the set of positive integers of the form as + bt,
where s and t are integers.
c) Show that if d is a common divisor of a and b, then d is a divisor of c.
answer: d is a common divisor of a and b, implies, there are some
integers k and l such that, a = dk and b = dl. Then we have, for any
s and t, as + bt = dks + dlt = d(ks + lt), which means d divides
as + bt. While c is of form as + bt, then d is a divisor of c.
d) Show that c|a and c|b. [Hint: First, assume that c 6 |a. Then
a = qc + r, where 0 < r < c. Show that r ∈ S, contradicting the
choice of c.]
answer: assume that c 6 |a. Then a = qc + r, where 0 < r < c. Then
r = a − qc = a − as − bt = a(1 − s) + b(−t) for some integers s and
t. this implies r ∈ S, which contradicts the assumption that c is the
smallest element in S.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
8/9
Exercise 36 Cont...
The well-ordering property can be used to show that there is a unique
greatest common divisor of two positive integers. Let a and b be positive
integers, and let S be the set of positive integers of the form as + bt,
where s and t are integers.
e) Conclude from (c) and (d) that the greatest common divisor of a and
b exists. Finish the proof by showing that this greatest common
divisor is unique.
answer: From (c) it can be shown that every common divisor of a
and b divides c, so c is greater that or equal to every common divisor,
on the other hand from (d) it is clear that c itself is a common divisor
of a and b. This means c is the greatest common divisor of a and b.
Moreover, c is the smallest element of S. This implies that c is
unique.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
9/9