The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2015
COMP 2711 Discrete Mathematical Tools for CS
Fall 2015 Written Assignment # 4
Distributed: October 8, 2015 Due: October 15, 2015
Solutions
Your solutions should contain (i) your name, (ii) your studen
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
Problem Set 3: Discrete Probability
COMP 2711, Spring 2014
Due: 2/4/2014, Wednesday, in class
Please read the Problem Sets webpage carefully for instructions on proper submission of your
work as well
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Written Assignment # 4
Distributed: 8 October 2014 Due: 14 October 2014
At the top of your solution, please write your (i) name, (ii) student ID #,
(iii) e
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 1: Logic and Proofs
COMP 2711, Spring 2015
Due: 20150303, Tuesday, in lecture
Instructions
Each problem set has more than 10 problems each of which is worth 10 points. You may
get a max
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 2: Combinatorics
COMP 2711, Spring 2015
Due: 20150317, Tuesday, in lecture
Instructions
Each problem set has more than 10 problems each of which is worth 10 points. You may
get a maximu
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Tutorial 2: Predicate Logics
Department of Computer Science and Engineering
Hong Kong University of Science and Technology
Tutorial 2: Predicate Logics
1/7
Question 1
Consider the statement:
For all p
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
2014 Fall Semester Written Assignment # 1
Distributed: September 11, 2014 Due: September 18, 2014
Your solutions should contain (i) your name, (ii) your st
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Fall 2014 Written Assignment # 2
Distributed: Sept 18, 2014 Due: Sept 25, 2014
Your solutions should contain (i) your name, (ii) your student ID #, (ii) yo
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Written Assignment # 3
Distributed: 26 September 2014 Due: 03 Octorber 2014
At the top of your solution, please write your (i) name, (ii) student ID #,
(ii
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Written Assignment # 4
Distributed: 8 October 2014 Due: 14 October 2014
At the top of your solution, please write your (i) name, (ii) student ID #,
(iii) e
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP2711: Tutorial 12
Solution to recurrences
HKUST
Solution to recurrences
COMP2711: Tutorial 12
Question 1
Give asymptotic upper bounds for T (n) by recursion tree
approach. Make your bounds as tigh
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 4: Number Theory and Cryptography
COMP 2711, Spring 2015
Due: 20150423, Thursday, in lecture
Instructions
Each problem set has more than 10 problems each of which is worth 10 points. Yo
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 5: Induction, Recursion, and
Recurrence Relations
COMP 2711, Spring 2015
Due: 20150508, Friday, in tutorial
Instructions
Each problem set has more than 10 problems each of which is wort
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 3: Discrete Probability
COMP 2711, Spring 2015
Due: 20150331, Tuesday, in lecture
Instructions
Each problem set has more than 10 problems each of which is worth 10 points. You may
get a
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 3: Discrete Probability
COMP 2711, Spring 2015
1. (a) Let Ei be the event that the ith letter is matched with the ith envelope. We want
to compute p(E1 E2 E5 ) which, by the inclusionexcl
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 4: Number Theory and Cryptography
COMP 2711, Spring 2015
1. By Euclids division algorithm, m = nq + r for some integers q and r with 0 r < n. We
consider two cases:
Case 1: m < 2n
Since m
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 2: Combinatorics
COMP 2711, Spring 2015
1. (a) Each person can run for one of the n oces or for nothing, giving n + 1 choices per
person. By the product rule, the p persons can run for the
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2015
Problem Set 1: Logic and Proofs
COMP 2711, Spring 2015
1. (a) The compound propositions (p q) r and (p r) (q r) are not logically
equivalent, because when p is true, q is false, and r is false, (p q)
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
COMP 2711 L2 Discrete Mathematical Tools for CS
2017 Fall Semester Pool Questions for Quiz 2
Question 1: Let p, q, and r be the propositions
p: You get an A in the final exam.
q: You do every exercise
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Written Assignment # 3
Distributed: 26 September 2014 Due: 03 Octorber 2014
Solution Key
At the top of your solution, please write your (i) name, (ii) stud
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
2014 Fall Semester Solution to Written Assignment # 5
Distributed: Oct 22, 2014 Due: Oct 29, 2014
Problem 1: What is 37 mod 17? What is 4 mod 17? What is 3
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
COMP 2711 Discrete Mathematical Tools for CS
Written Assignment # 4
Distributed: 8 October 2014 Due: 14 October 2014
Solution Key
At the top of your solution, please write your (i) name, (ii) student
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
Problem 2: Use induction to prove that
n(n + 1)(n + 2)
1 2 + 2 3 + + n(n + 1) =
3
for all integers n 1.
Problem 2: Use induction to prove that
n(n + 1)(n + 2)
1 2 + 2 3 + + n(n + 1) =
3
for all intege
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
Problem 1: Use contradiction to prove that
n(n + 1)(n + 2)
1 2 + 2 3 + + n(n + 1) =
3
for all integers n 1.
Problem 1: Use contradiction to prove that
n(n + 1)(n + 2)
1 2 + 2 3 + + n(n + 1) =
3
for al
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
Problem 5
Suppose that boys and girls are equally likely to be born.
(a) In a family consisting of a mother, father, and two children
of dierent ages, what is the probability that the family has
two g
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
The Tennis Club Problem
A tennis club has 2n members.
We want to pair up the members (by twos) to play
singles matches.
21
The Tennis Club Problem
A tennis club has 2n members.
We want to pair up the
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
Problem 3 Throwing Balls into boxes
When we say throw m balls into n boxes we mean that each
of the nm possible outcomes is uniformly likely.
(a) Throw 6 balls into 5 boxes.
What is the probability th
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
The problem
Consider the identity:
n
2
21
n2
4
=
n
4
n4
2
The problem
Consider the identity:
n2
4
n
2
=
n
4
n4
2
Example:
10
2
8
4
= 45 70
= 3150
= 210 15
10 6
=
4
2
22
The problem
Consider the iden
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Fall 2014
Problem 1
What is the probability that a hand of 5 cards chosen from
an ordinary deck of 52 cards, will consist of cards of the same
suit?
Problem 1
What is the probability that a hand of 5 cards chos
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
COMP 2711
Discrete Mathematical Tools for
Computer Science
Course Details
Fall 2017
Dr. Kenneth LEUNG
Personnel
Instructors:
L1: Tao WANG
L2: Kenneth LEUNG
L3: Chiew Lan TAI
[email protected][email protected]
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
COMP 2711 L2 Discrete Mathematical Tools for CS
2017 Fall Semester Pool Questions for Quiz 3
Question 1: Prove that
1
1
1
n
+
+ . +
=
12 23
n (n + 1)
n+1
for all integer n 1.
Solution : Denote the sta
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
COMP 2711 L2 Discrete Mathematical Tools for CS
2017 Fall Semester Pool Questions for Quiz 5
Question 1: Using GCD algorithm to prove that 233 and 144 are relative prime.
Solution : First using Euclid
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
COMP 2711 L2 Discrete Mathematical Tools for CS
2017 Fall Semester Pool Questions for Quiz 4
Question 1: What is the average number of times it would it take to roll a fair 6sided
die and get all num
The Hong Kong University of Science and Technology
Discrete Mathematical Tools for Computer Science
COMP 2711

Spring 2013
Name: _
Student#: _Date: _
COMP 2711: Discrete Mathematical Tools for Computer Science
In Class Exercise #5
1. Which of the following statements (in which Z+ stands for the positive integers and Z sta