Concordia University
Department of CSE
COMP 232
Mathematics for Computer Science
Solutions to Assignment 4
1. Use strong induction to prove that for every integer
n
≥
8 there exist nonnegative integers
x, y
such that
n
= 3
x
+ 5
y
.
SOLUTION: Basis
:
n
= 8 : Take
x
=
y
= 1.
n
= 9 : Take
x
= 3
, y
= 0.
n
= 10 : Take
x
= 0;
y
= 2.
Inductive hypothesis
: Assume that for some
n
≥
10, and for all
m
such that 8
≤
m
≤
n
,
there exist nonnegative integers
x, y
such that
m
= 3
x
+ 5
y
.
Inductive step
: Now consider
n
+ 1.
Since
n
+ 1

3 =
n

2
≥
8, using the inductive
hypothesis, there exist
x
0
and
y
0
such that
n

2 = 3
x
0
+ 5
y
0
. Then
n
+ 1 = 3(
x
0
+ 1) + 5
y
0
.
This completes the inductive step.
Remark:
This problem can also be solved using standard induction.
For the basis, if
n
= 8 then take
x
=
y
= 1. For the inductive step, suppose for some
n
(
n
≥
8) we have
n
= 3
x
+ 5
y
. Then
n
+ 1 = 3
x
+ 5
y
+ 1 = 3
x
+ 5
y
+ 6

5 = 3(
x
+ 2) + 5(
y

1). Now
y

1 could be negative if
y
= 0. In this case
n
= 3
x
, and we must have
x >
= 3. Thus in
this case we can write
n
+ 1 = 3
x
+ 5
y
+ 1 = 3
x
+ 5
y
+ 10

9 = 3(
x

3) + 5(
y
+ 2) where
x

3
≥
0.
2. The Fibonacci numbers are defined as follows:
f
0
= 0
, f
1
= 1, and
f
n
+2
=
f
n
+
f
n
+1
whenever
n
≥
0. Prove that when
n
is a positive integer:
f
0

f
1
+
f
2
+
. . .

f
2
n

1
+
f
2
n
=
f
2
n

1

1
SOLUTION: Basis
:
n
= 1.
f
0

f
1
+
f
2
= 0

1 + 1 = 0 =
f
1

1, since
f
0
= 0 and
f
1
= 1.
Inductive hypothesis
: Suppose for some positive integer
n
:
f
0

f
1
+
f
2
 · · · 
f
2
n

1
+
f
2
n
=
f
2
n

1

1.
Inductive step:
We must show that
f
0

f
1
+
f
2
 · · · 
f
2
n

1
+
f
2
n

f
2
n
+1
+
f
2
n
+2
=
f
2
n
+1

1.
(
f
0

f
1
+
f
2
 · · · 
f
2
n

1
+
f
2
n
)

f
2
n
+1
+
f
2
n
+2
=
f
2
n

1

1

f
2
n
+1
+
f
2
n
+2
=
f
2
n

1

1

(
f
2
n
+
f
2
n

1
) +
f
2
n
+1
+
f
2
n
=
f
2
n
+1

1, as needed.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
3. (10 marks) For each of the following relations on the set
Z
of integers, determine if it is
reflexive, symmetric, antisymmetric, or transitive. On the basis of these, state whether or
not it is an equivalence relation and/or a partial order.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 TBA
 Computer Science, Natural number, relation

Click to edit the document details