The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
COMP 2711H Discrete Mathematical Tools for Computer Science
2014 Fall Semester
Homework 1
Handed out: Sep 19
Due: Sep 26
Problem 1. Let p, q, and r be the following propositions you get an A on the final
exam, you do every exercise in this book, and you g
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
COMP 2711H Discrete Mathematical Tools for Computer Science
2014 Fall Semester
Homework 5
Handed out: Nov 19
Due: Nov 26
Problem 1.
Let P (n) be the following statement:
13 + 23 + + n3 =
n(n + 1)
2
!2
for the positive integer n.
(a) What is the statement
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
COMP 2711H Discrete Mathematical Tools for Computer Science
2014 Fall Semester
Homework 4
Handed out: Nov 10
Due: Nov 19
Problem 1. Recall the standard divisibility rule for 3: an integer is divisible by 3 if
and only if the sum of its digits is divisible
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 3: COMP2711H
FALL 2015
Q1 The InclusionExclusion Principle covered in the lecture on Sets is the following:
Given a finite number of finite sets, A1 , A2 , . . . An , we have
X
X
X
ni=1 Ai  =
Ai 
Ai Aj  +
Ai Aj Ak  . . . + (1)n+1 ni=
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 1: COMP2711H
FALL 2015
Q1. If A = 5, what is the value of P (A)?
(11 marks)
Q2. What could you say about two nonempty sets A and B if A B = B A? (11 marks)
Q3. Is it true that A (B C) = (A B) (A C) for any sets A, B and C? If yes, please
gi
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 4: COMP2711H
FALL 2015
Q1 Assume that the equation
x c1 x1 c2 x2 c1 x c = 0
has distinct roots r1 , r2 , . . . , r , where all ci are real numbers and c 6= 0.
Define a sequence (si )
i=0 by
si = 1 r1i + 2 r2i + . . . + ri for integers i 0,
with
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 6: COMP2711H
FALL 2015
Q1 Show that the number of edges of a simple graph with n vertices is at most n(n 1)/2.
(14 Marks)
Q2 Answer the following questions:
a. In a simple graph, must every vertex have degree that is less than the number of
ver
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 2: COMP2711H
FALL 2015
Q1 Let Q(n) be the predicate n2 30 with domain being the set Z+ of all positive integers.
What is Q(2)?
(5 marks)
Find the truth set of Q(n).
(5 marks)
Q2 Find a counterexample to show the following statement is false.
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 7: COMP2711H
FALL 2015
Q1 Let p be a prime and e N. Prove that (pe ) = (p 1)pe1 , where is Eulers totient
function.
(11 marks)
Q2 Let m 2 and n 2 be two positive integers with gcd(m, n) = 1. Prove that (mn) =
(m)(n).
(12 marks)
Q3 Let F be a fi
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 8: COMP2711H
FALL 2015
Q1 In the lecture about elementary number theory, we defined the congruence class mod p
i = cfw_x Zx i
(mod p),
where i is an integer and called a representative of its congruence class. Note that any
integer in i can be
The Hong Kong University of Science and Technology
Discrete Mathematics
CS 2711

Fall 2015
ASSIGNMENT 5: COMP2711H
FALL 2015
Q1 A base10 numeral is randomly chosen from the range 000.999. What is the probability
that the numeral contains at most one of the elements in the set cfw_3, 5?
(10 marks)
Q2 Use the axioms for probability and mathemati