HKUST Department of Computer Science and Engineering
COMP 2711: Discrete Math Tools for CS Spring 2012
Midterm Examination 1
Date: Friday, March 2, 2012
Name:
Email:
Time: 19:0021:00
Student ID:
Lectu
COMP 2711 Discrete Mathematical Tools for CS
Solution to Written Assignment # 1
Problem 1: Six schools are going to send their basketball teams to a tournament at
which each team must play each other
COMP 2711 Discrete Mathematical Tools for CS
Fall 2013 Written Assignment # 2
Distributed: Sept 18, 2013 Due: Sept 25, 2013
Your solutions should contain (i) your name, (ii) your student ID #, (ii) yo
The Tennis Club Problem
The Tennis Club Problem
Sort the members in some order.
Take the rst member and pair him
with any of the other 2n 1 members.
A tennis club has 2n members.
We want to pair up th
COMP 2711 Discrete Mathematical Tools for CS
Fall 2013 Written Assignment # 2
Solution
Your solutions should contain (i) your name, (ii) your student ID #, (ii) your
email address and (iv) your tutori
COMP 2711 Discrete Mathematical Tools for CS
2013 Fall Semester Solution to Written Assignment # 6
Distributed: Nov 1, 2013 Due: Nov 8, 2013
At the top of your solution, please write your (i) name, (i
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 2
Problem 2
Solution:
Problem 2
Solution:
Problem 2
Solution:
Problem 2
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 1
Problem 1
Solution:
Problem 2
Problem 2
Solution:
Problem 2
Solution:
Problem 2
Solution:
Problem 2
Proof by Smallest Counterexample
Denitions:
log2 (n) is x such that 2x = n.
log2 (n) is the unique i s.t. 2i n < 2i+1
e.g. log2 (2) = 1, log2 (3) = 1, log2 (4) = 2
log2 (31) = 4, log2 (32) = 5, log2
Hong Kong University of Science and Technology
COMP170: Discrete Mathematical Tools for Computer Science
Spring 2009
Midterm Exam 1
10 March 2009, 3:004:20pm, LT-E
Solutions
Question 1: Any subset of
Proof by Smallest Counterexample
Proof by Smallest Counterexample
Denitions:
log2 (n) is x such that 2x = n.
log2 (n) is the unique i s.t. 2i n < 2i+1
Denitions:
log2 (n) is x such that 2x = n.
log2
Proof by Smallest Counterexample
Denitions:
log2 (n) is x such that 2x = n.
log2 (n) is the unique i s.t. 2i n < 2i+1
e.g. log2 (2) = 1, log2 (3) = 1, log2 (4) = 2
log2 (31) = 4, log2 (32) = 5, log2
The numbers 29 and 43 are primes.
What is (29 1)(43 1)?
What is 199 1111 in Z1176 ?
1111 199
What is 23
1111 199
What is 23
1111 199
What is 23
in Z29 ?
in Z43 ?
in Z1247 ?
The numbers 29 and 43 are p
The numbers 29 and 43 are primes.
What is (29 1)(43 1)?
What is 199 1111 in Z1176 ?
What is 231111
199
What is 231111
199
What is 231111
199
The numbers 29 and 43 are primes.
(29 1)(43 1) = 1176.
What
The numbers 29 and 43 are primes.
What is (29 1)(43 1)?
What is 199 1111 in Z1176 ?
What is 231111
199
What is 231111
199
What is 231111
199
in Z29 ?
What is 231111
199
in Z43 ?
What is 231111
199
in
Consider the statement:
For all primes p, either p is odd or p is 2.
(a) Use symbolic statements and a universal quantier to express the above statement.
(b) Express the negation of the statement in (
The numbers 29 and 43 are primes.
What is (29 1)(43 1)?
What is 199 1111 in Z1176 ?
1111 199
What is 23
1111 199
What is 23
1111 199
What is 23
in Z29 ?
in Z43 ?
in Z1247 ?
The numbers 29 and 43 are p
Problem 1: Use contradiction to prove that
1 2 + 2 3 + + n(n + 1) =
n(n + 1)(n + 2)
3
for all integers n 1.
Problem 1: Use contradiction to prove that
1 2 + 2 3 + + n(n + 1) =
n(n + 1)(n + 2)
3
for al
Proof by Smallest Counterexample
Proof by Smallest Counterexample
Denitions:
log2 (n) is x such that 2x = n.
log2 (n) is the unique i s.t. 2i n < 2i+1
Denitions:
log2 (n) is x such that 2x = n.
log2
Hong Kong University of Science and Technology
COMP170: Discrete Mathematical Tools for Computer Science
Spring 2009
Midterm Exam 2
21 April 2009, 3:004:20pm, LT-E
Solutions
Question 1: From the encry
HKUST Department of Computer Science and Engineering
COMP170: Discrete Math Tools for CS Spring 2011
Midterm Examination 1
Date: Friday, March 11, 2011
Name:
Email:
Time: 19:0021:00
Student ID:
Lectur
Hong Kong University of Science and Technology
COMP170: Discrete Mathematical Tools for Computer Science
Spring 2009
Midterm Exam 1
10 March 2009, 3:004:20pm, LT-E
Instructions
1. This is a closed-boo
HKUST Department of Computer Science and Engineering
COMP170: Discrete Math Tools for CS Spring 2011
Midterm Examination 2
Solution Key
Name:
Email:
Student ID:
Lecture and Tutorial:
Instructions
Thi
The problem
The problem
Consider the identity:
n
2
n2
4
Consider the identity:
=
n
4
n4
2
n2
4
n
2
=
n
4
n4
2
Example:
10
2
8
4
= 45 70
= 3150
= 210 15
10 6
=
4
2
2-1
2-2
The problem
The problem
Consi
The problem
Consider the identity:
n
2
2-1
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
2-2
The problem
Consider the iden
Problem 1
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?
The rst question is
What is the probability that a
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 Tennis Club Problem
A tennis club has 2n members.
We want to pair up the members (by twos) to play
singles matches.
2-1
The Tennis Club Problem
A tennis club has 2n members.
We want to pair up the
Hong Kong University of Science and Technology
COMP170: Discrete Mathematical Tools for Computer Science
Spring 2009
Midterm Exam 2
21 April 2009, 3:004:20pm, LT-E
Instructions
1. This is a closed-boo
Proof of Distributive Laws
Proof of Distributive Laws
Prove the distributive laws for n multiplication over +n addition.
Prove the distributive laws for n multiplication over +n addition.
Distributive
Contents
Basics: Sets and Functions
1
Sets
2
Functions
Dit-Yan Yeung
Department of Computer Science and Engineering
Hong Kong University of Science and Technology
COMP 2711: Discrete Mathematical Tool
COMP 2711H Discrete Mathematical Tools for Computer Science
2017 Fall Semester
Homework 1
Handed out: Sep 19
Due: Sep 29
Problem 1.
Give the converse and contrapositive of these conditional statements