0% found this document useful (0 votes)
5 views6 pages

Engg2440b hw2 Soln

The document contains solutions for Homework 2 of the course ENGG2440B Discrete Mathematics for Engineers, due on September 28, 2024. It includes mathematical proofs using induction, discussions on Latin squares, and closed-form expressions for various summations. The document emphasizes the importance of original work and proper submission format.

Uploaded by

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

Engg2440b hw2 Soln

The document contains solutions for Homework 2 of the course ENGG2440B Discrete Mathematics for Engineers, due on September 28, 2024. It includes mathematical proofs using induction, discussions on Latin squares, and closed-form expressions for various summations. The document emphasizes the importance of original work and proper submission format.

Uploaded by

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

ENGG2440B Discrete Mathematics for Engineers

Homework 2 Solutions

Due date: 28th Sep 2024, 11:59pm. Please submit your solutions on Blackboard ("course
contents" tab, submit as a single pdf file, not as image files or Word document). Make
sure your file is readable. Please write your name and student ID on the first page of your
submission.
You are allowed to discuss with your classmates, though you MUST write your own solu-
tions. You MUST NOT copy from your classmates or from any material.

1. (15 pts) Prove the following statements using mathematical induction.

(a) (5 pts) For all n ∈ N0 , 22n + 6 is divisible by 7.


Ans: Let P (n) be the predicate “22n + 6 is divisible by 7”.
First check P (0) is true: We have 220 + 6 = 7 divisible by 7, so P (0) is true.
Inductive step: Asssume P (n) is true for some n ∈ N0 . To check P (n + 1),

22n+1 + 6 = 22(22n ) + 6
= 22(22n + 6) − 22 · 6 + 6
= 22(22n + 6) − 21 · 6

is divisible by 7 since 22n + 6 is divisible by 7 (by P (n)) and 21 · 6 is divisible by 7. Hence,


P (n + 1) is true.
By induction, P (n) is true for n ∈ N0 .

(b) (5 pts) For all n ∈ {4, 5, . . .}, it is possible to pay exactly n dollars using only 2 dollar coins
and 5 dollar coins (you may use any non-negative integer number of these coins).
Ans: Let P (n) be the predicate “it is possible to pay exactly n dollars using only 2 dollar
coins and 5 dollar coins”.
First check P (4) is true: We have 4 = 2 + 2, so P (4) is true.
Inductive step: Asssume P (4), . . . , P (n) are true for some n ∈ N0 , n ≥ 4. Suppose we now
want to pay n + 1 dollars. If n + 1 = 5, we can pay n + 1 dollars using one 5 dollar coin.
If n + 1 ≥ 6, then n − 1 ≥ 4, and hence P (n − 1) is true by induction hypothesis. We can
pay n + 1 dollars by first paying n − 1 dollars (since P (n − 1) is true), and then using a 2
dollar coin. Hence, P (n + 1) is true.
By strong induction, P (n) is true for n ∈ N0 .

(c) (5 pts) For all real number b 6= 1, and n ∈ N0 , we have


n
X b
k · bk = 1 − (n + 1)bn + nbn+1 .

(1 − b)2
k=0

Pn b

Ans: Fix b 6= 1. Let P (n) be the predicate “ k=0 k ·bk = (1−b)2 1 − (n + 1)bn + nbn+1 ”.

1
First check P (0) is true: We have
0
X b
k · bk = 0 = 1 − b0 + 0 · b1 ,

(1 − b)2
k=0

so P (0) is true.
Inductive step: Asssume P (n) is true for some n ∈ N0 , i.e.,
n
X b
k · bk = 1 − (n + 1)bn + nbn+1 .

(1 − b)2
k=0

To check P (n + 1),
n+1
X
k · bk
k=0
n
X
= k · bk + (n + 1)bn+1
k=0
b
1 − (n + 1)bn + nbn+1 + (n + 1)bn+1

=
(1 − b)2
(1 − b)2
 
b
= 1 − (n + 1)bn + nbn+1 + (n + 1)bn+1
(1 − b)2 b
b
1 − (n + 1)bn + nbn+1 + (n + 1)bn (1 − b)2

=
(1 − b)2
b
1 − (n + 1)bn + nbn+1 + (n + 1)bn − 2(n + 1)bn+1 + (n + 1)bn+2

=
(1 − b)2
b
1 − (n + 2)bn+1 + (n + 1)bn+2 .

=
(1 − b)2

Hence, P (n + 1) is true.
By induction, P (n) is true for n ∈ N0 .

2. (10 pts) (Latin square) An n × n Latin square (where n ≥ 1 is an integer) is an n × n matrix


with entries being integers in {1, . . . , n}, such that no two entries in the same row are the same,
and no two entries in the same column are the same. We call n the order of the Latin square.
For example, this is a 3 × 3 Latin square (of order 3):
 
1 2 3
 3 1 2 
2 3 1

This is a 4 × 4 Latin square (of order 4):


 
1 3 4 2
 4 1 2 3 
 
 3 2 1 4 
2 4 3 1

We say that a Latin square is unipotent if the n entries on the main diagonal (from the top-left
entry to the botton-right entry, in the “&” direction) are the same. We say that a Latin square is
anti-unipotent if the n entries on the main anti-diagonal (from the top-right entry to the botton-
left entry, in the “.” direction) are the same. For example, the 3 × 3 example above is unipotent
but not anti-unipotent, whereas the 4 × 4 example above is both unipotent and anti-unipotent.

2
(a) (5 pts) Prove or disprove the statement: “there exists a Latin square that is both unipotent
and anti-unipotent, where the order is an odd number that is at least 3”.
Ans: False. Assume the contrary that there is a n × n Latin square that is both unipotent
and anti-unipotent, where n is odd and at least 3. Consider the entry at the center of the
square, and let it be a ∈ {1, . . . , n}. The center entry lies on both the main diagonal and
the main anti-diagonal, so all entries on the main diagonal and the main anti-diagonal equal
a, such as:  
a a

 a a 


 a 

 a a 
a a
This cannot be a Latin square since the first row contains two a’s, which gives a contradic-
tion. Therefore, such a Latin square does not exist.

(b) (5 pts) Prove or disprove the statement: “for every integer k ≥ 1, there exists a 2k × 2k
Latin square that is both unipotent and anti-unipotent”. (Hint: Read the “L-shaped tiles”
example in the lecture notes for ideas.)
Ans: Let P (k) be the predicate “there exists a 2k × 2k Latin square that is both unipotent
and anti-unipotent”.
First check P (1) is true: The Latin square
 
1 2
2 1

satisfies the requirement.


Inductive step: Asssume P (k) is true for some k ≥ 1. Let A be a 2k × 2k Latin square that
is both unipotent and anti-unipotent. We will construct a 2k+1 × 2k+1 Latin square that is
both unipotent and anti-unipotent using A. Our first attempt is to simply put together 4
copies of A’s in the following manner:
 
A A
.
A A

This is not a Latin square since the entries lie in the range {1, . . . , 2k }, not {1, . . . , 2k+1 },
and there are duplicate elements in the rows and columns. To eliminate the duplication, we
let à be the matrix formed by adding 2k to each entry in A (so à has entries in the range
{2k + 1, . . . , 2k+1 }). We then consider the 2k+1 × 2k+1 matrix
 
A Ã
.
à A

Each row in the above matrix contains a row of A (containing entries in {1, . . . , 2k } without
duplication) and a row of à (containing entries in {2k + 1, . . . , 2k+1 } without duplication),
so the row does not contain duplicate entries. Same for each column. The main diagonal
of the above matrix consists of the main diagonal of A copied twice, so its entries are the
same. The main anti-diagonal of the above matrix consists of the main anti-diagonal of Ã
copied twice, so its entries are the same. Hence, P (k + 1) is true.
By induction, P (k) is true for k ≥ 1.

3. (25 pts) (Summation) Find closed form expressions for the following sums in terms of n (assume
n ≥ 3 is an integer):

(a) (5 pts)
n
X 1
(2k − 1)(2k + 1)
k=1

3
Ans:
n
X 1
(2k − 1)(2k + 1)
k=1
n
X1 1 
1
= −
2 2k − 1 2k + 1
k=1
n n
1 X 1 1X 1
= −
2 2k − 1 2 2k + 1
k=1 k=1
n n+1
1X 1 1X 1
= −
2 2k − 1 2 2k − 1
k=1 k=2
1 1 1 1
= · − ·
2 2 − 1 2 2(n + 1) − 1
1 1 1
= − ·
2 2 2n + 1
n
= .
2n + 1

(b) (5 pts)
n
X
(3k − k)2
k=1

(Hint: Use Question 1c.)


Ans:
n
X
(3k − k)2
k=1
n
X
= (9k − 2k3k + k 2 )
k=1
Xn n
X n
X
= 9k − 2 k3k + k2
k=1 k=1 k=1
n
(a)9 −1 3  n(n + 1)(2n + 1)
= −2 2
1 − (n + 1)3n + n3n+1 +
1 − 1/9 (1 − 3) 6
n n
9(9 − 1) 3(1 + (2n − 1)3 ) n(n + 1)(2n + 1)
= − + ,
8 2 6
where (a) is by Question 1c.
(c) (5 pts)
n
X
k! · k
k=1

Note that k! = 1 · 2 · · · · · k is the factorial of k. (Hint: Compute the sum for some small
values of n. Make
Pna guess of the formula for the sum, and prove it rigorously.)
Ans: Let Tn = k=1 k! · k. We have T1 = 1, T2 = 5, T3 = 23, T4 = 119, which are all one
less than a factorial. Our guessPn is that Tn = (n + 1)! − 1. We now prove this claim.
Let P (n) be the predicate “ k=1 k! · k = (n + 1)! − 1”.
P1
First check P (1) is true: We have k=1 k! · k = 1 = (1 + 1)! − 1, so P (0) is true.

4
Inductive step: Asssume P (n) is true for some n ≥ 1. To check P (n + 1),
n+1
X n
X
k! · k = k! · k + (n + 1)! · (n + 1)
k=1 k=1
= (n + 1)! − 1 + (n + 1)! · (n + 1)
= (n + 1)! · (n + 2) − 1
= (n + 2)! − 1.

Hence, P (n + 1) is true.
By induction, P (n) is true for n ∈ N0 .
(d) (5 pts)
n X
X 2n
(j + 1)(2k + 1)
j=1 k=1

Ans:
n X
X 2n
(j + 1)(2k + 1)
j=1 k=1
n
X 2n
X
= (j + 1) (2k + 1)
j=1 k=1
n 2n 2n
!
X X X
= (j + 1) 2 k+ 1
j=1 k=1 k=1
n  
X 2n(2n + 1)
= (j + 1) 2 · + 2n
j=1
2
n
X
= (j + 1) (2n(2n + 2))
j=1
n
X
= 4n(n + 1) (j + 1)
j=1
 
Xn n
X
= 4n(n + 1)  j+ 1
j=1 j=1
 
n(n + 1)
= 4n(n + 1) +n
2
 
n(n + 3)
= 4n(n + 1)
2
= 2n2 (n + 1)(n + 3).

(e) (5 pts)
n X
n
X 2j
j=1 k=j
1 − 2−k

5
Ans:
n X
n n k
X 2j X X 2j
=
j=1 k=j
1 − 2−k j=1
1 − 2−k
k=1
n k
X 1 X
= 2j
1 − 2−k j=1
k=1
n
X 1
2k+1 − 2

= −k
1−2
k=1
n
X 2k − 1
= 2·
1 − 2−k
k=1
Xn
= 2k+1
k=1
= 2n+2 − 4.

You might also like