Sample Problems in Discrete Mathematics: 1 Using Mathematical Induction
Sample Problems in Discrete Mathematics: 1 Using Mathematical Induction
Sample Problems in Discrete Mathematics: 1 Using Mathematical Induction
This handout lists some sample problems that you should be able to solve as a pre-requisite to Computer
Algorithms. Try to solve all of them. You should also read Chapters 2 and 3 of the textbook, and look at
the Exercises at the end of these chapters. If you are unfamiliar with some of these topics, or cannot solve
many of these problems, then you should take a Discrete Math course before taking Computer Algorithms.
The task:
Base Case:
Induction
hypothesis:
Induction step:
Conclusion:
Variants of induction:
Strong Induction:
Structural Induction:
n2 n
.
12
k2 k
.
12
Then,
Base case: for n = 11,
110
55
1
112 11
= 9 <
=
=9+ .
12
12
6
6
11 2 <
Notice that the base of the induction proof start with n = 11, rather than with n = 0. Such a shift happens
often, and it does not change the principle, since this is nothing more than the matter of notations. One can
define a property Q(m) by Q(m) = P (n 11), and consider Q for m 0.
Induction step. Suppose, given n 11, P holds true for all integers up n. Then
P (n)
n
n 2 < n 12
2
(n + 1) 2 1 < (n+1) (n+1)2n1+1
12
2
(n + 1) 2 < (n+1) (n+1)2n1+1
+1
12
(n+1)2 (n+1)
2n
(n + 1) 2 <
12 + 1
12
(n+1)2 (n+1)
(n + 1) 2 <
(since n > 10)
12
=
=
=
=
=
i > 2n n/3.
i=1
Pn
Pn+1
Given:
Prove:
i > 2(n + 1) n + 1/3.
i=1 i > 2n n/3;
i=1
n+1
X
n
X
i=(
i) + n + 1
i=1
(1)
i=1
n
X
i) +
n + 1 2n n/3 + n + 1.
(2)
i=1
2n n + 3 n + 1 2(n + 1) n + 1
2n n (2n 1) n + 1
4n2 n
(3)
(4)
(5)
(2n 1)2 (n + 1)
(4n 4n + 1)(n + 1) = 4n 3n + 1
(7)
3n + 1.
(8)
4n
(6)
2
i2 =
n(n + 1)(2n + 1)
.
6
Prove.
Problem 4 Prove that every integer greater than 1 is a product of prime numbers.
Proof: We will use strong induction. Base Case: 2 is a product of prime numbers, since 2 itself is a prime.
Inductive Step: Let n be an arbitrary integer greater than 1. The Inductive Hypothesis is that for all integers
k such that 1 < k < n, we have that k can be written as a product of primes. Then, either n is a prime
itself (in which case it is a product of prime numbers), or n can be written as n = n1 n2 with both n1 and
n2 being integers greater than 1 and less than n. Thus, the Inductive Hypothesis applies to both n1 and n2 ,
and so each can be written as a product of prime numbers. Thus, n can be written as a product of prime
numbers as well.
Problem 5 What is wrong with the following classic proof that all horses have the same color?
Let P (n) be the proposition that for any set of n horses, all horses in this set have the same color.
Base Case: P (1) is clearly true.
Inductive Step: The Inductive Hypothesis is that P (n) holds; we will show that this implies P (n + 1). Let
A be an arbitrary set of n + 1 horses. Consider the first n horses in A, and the last n horses in A. Both of
these are sets of n horses, and so the inductive hypothesis holds for them, telling us that both the first n and
the last n horses of A have the same color. Since the set of the first n and the last n horses overlap, then
all n + 1 horses of A must have the same color, thus proving P (n + 1).
Problem 6 Prove by induction that
F1 + F3 + . . . + F2n1 = F2n ,
where Fi denotes the ith Fibonacci number.
Order of Functions
(1)
(2)
(3)
(4)
(5)
(6)
(7)
f (n)
(lg n)a
2n log2 n
n
n2
log2 n
log2 n
1000(log2 n)0.999
n2
g(n)
nb
(here a, b > 0)
10n!
(log2 n)5
(nlog2 n)4
log2 (66n)
(log2 n)1.001
n(log2 n)15
Graph Theory
Problem 13 How many eight digit numbers are there that contain a 5 and a 6? Explain.
Problem 14 How many nine digit numbers are there that contain exactly two 5s?
Problem 15 What are the coefficients of the terms
Explain.
1
1
x , x2
Problem 16 Prove that for every n 1 and every m 1, the number of functions from {1, 2, . . . , n} to
{1, 2, . . . , m} is mn .
Problem 17 Prove the following identities.
Idempotency
A A = A; A A = A
Commutativity
A B = B A; A B = B A
Associativity
(A B) C = A (B C)
(A B) C = A (B C)
Distributivity
(A B) C = (A C) (B C)
(A B) C = (A C) (B C)
DeMorgans Laws
U (B C) = (U B) (U C)
U (B C) = (U B) (U C)
Problem 18 (Converse) Consider the following two statements: 100 percent of convicted felons consumed
bread during their childhood. and People who consume bread as a child are likely to become felons. Does
the first statement logically imply the second?
Problem 19 (Contrapositive) Consider the following two statements: 100 percent of convicted felons consumed bread during their childhood. and People who do not consume bread as a child do not become felons.
Does the first statement logically imply the second?