COMP 170 Discrete Mathematical Tools for CS
2010 Spring Semester Written Assignment # 9
Distributed: May 6, 2010 Due: May 13, 2010
Solution Key
At the top of your solution, please write your (i) name, (ii) student ID #,
(iii) email address and (iv) tutori
COMP 170 Discrete Mathematical Tools for CS
2006 Fall Semester 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 team exactly once. How many games
are
COMP 170 Discrete Mathematical Tools for CS
2006 Fall Semester Written Assignment # 8
Distributed: Nov 21, 2006 Due: Nov 28, 2006 at end of class
The top of your submission should contain (i) your name, (ii) your student ID
#, (iii) your email address and
COMP 2711 Discrete Mathematical Tools for Computer Science
2015 Fall Semester Assignment # 1
Distributed: 10 September 2015 Due: 7pm, 17 September 2015
Solutions
Your solutions should contain (i) your name, (ii) your student ID #, (ii) your email
address,
Supplementary Exercises on Logic and Proof
Note: These exercises are meant to help you revise the material that you have
learnt in class when preparing for the exam. Please note that when solutions
are given below for the problems they are usually sketch
Supplementary Exercises on Counting
Note: These exercises are meant to help you revise the material that you have
learnt in class when preparing for the exam. Please note that when solutions
are given below for the problems they are, at most, sketch solut
Contents
1
Basics of Counting
Introduction
Product Rule
Sum Rule
Using Both Product and Sum Rules
Tree Diagrams
2
Pigeonhole Principle
Pigeonhole Principle
Generalized Pigeonhole Principle
3
Permutations and Combinations
Permutations
Combinations
4
Binomi
Supplementary Exercises on Number Theory
Note: These exercises are meant to help you revise the material that you have
learnt in class when preparing for the exam. Please note that when solutions
are given below for the problems they are usually sketch so
COMP 170 Discrete Mathematical Tools for CS
2008 Fall Semester Practice Assignment in Probability
This handout is meant as a practice assignment to let you practice the material
taught during the last weeks of class. Solutions to this assignment should no
COMP170:
Extra Worked Problems on Basic Probability
Last Updated: Nov 23, 2006
What is the probability of exactly three heads when
you ip a coin ve times?
What is the probability of three or more heads when
you ip a coin ve times?
What is the probability
Supplementary Exercises on Counting
Note: These exercises are meant to help you revise the material that you have
learnt in class when preparing for the exam. Please note that when solutions
are given below for the problems they are, at most, sketch solut
Name: Kong Tak Kan
Student No.: 08472314
1.
(1)
(2)
(3)
(4)
(5)
(6)
Challenge Problem 1
COMP 170 (L2, T2C)
Page 1 of 3
rectanglecount = 0;
for i = 1 to n-1
for j = 1 to n-1
for x = i+1 to n
for y = j+1 to n
rectanglecount = rectanglecount + 1
Let us consi
Problem Set 5: Induction, Recursion, and
Recurrence Relations
COMP 2711, Spring 2014
Due: 12/5/2014, Monday, 11:00, collection box outside Rm 4213A
Please read the Problem Sets webpage carefully for instructions on proper submission of your
work as well a
Problem Set 4: Number Theory and Cryptography
COMP 2711, Spring 2014
Due: 23/4/2014, Wednesday, in class
Please read the Problem Sets webpage carefully for instructions on proper submission of your
work as well as proper academic conduct.
1. Let S = cfw_1
COMP170 Fall 08
Challenge Problems # 1
To be submitted with Written Assignment 1 by September 11, 2008
Note: Submission of solutions to challenge problems is purely voluntary. Submitting correct
solutions could raise your grade but not submitting will not
People are waiting in line to board a 100-seat airplane.
Steve is the first person in the line. He gets on the plane
but suddenly can't remember what his seat number is, so he
picks a seat at random. After that, each person who gets on
the plane sits
Supplementary Exercises on Number Theory
Note: These exercises are meant to help you revise the material that you have
learnt in class when preparing for the exam. Please note that when solutions
are given below for the problems they are usually sketch so
COMP 170 Discrete Mathematical Tools for CS
2006 Fall Semester Challenge Problems in Probability
Distributed: Dec 1, 2006 Due: by Dec 7, 2006 at end of class
The top of your submission should contain (i) your name, (ii) your student ID
#, (iii) your email
COMP 170 Discrete Mathematical Tools for CS
2008 Fall Semester Practice Assignment in Probability
Solution Key
This handout is meant as a practice assignment to let you practice the material
taught during the last weeks of class. Solutions to this assignm
Contents
1
2
Probability Theory
Discrete Probability Distribution
Probability of Combinations of Events
Conditional Probability
Independence
Bernoulli Trials and Binomial Distribution
Random Variable
Birthday Problem and Hashing
3
Bayes Theorem
Bayes Theo
Contents
1
Propositional Logic
Propositions
Compound Propositions
Precedence of Logical Operators
More Examples
Propositional Equivalences
2
Department of Computer Science and Engineering
Hong Kong University of Science and Technology
Predicate Logic
Pred
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 Tools for Computer Science
Dit-Yan Yeung (CSE, HKUST)
Basic
Bogart-81046
book
March 31, 2005
6
15:0
GRAPHS
6.1 GRAPHS
In this chapter, we study graphs, which are a fundamental topic in discrete mathematics
and computer science. As we will see, we can use graphs to model many common
situations and to naturally desc
Bogart-81046
book
March 31, 2005
5
15:12
PROBABILITY
5.1 INTRODUCTION TO PROBABILITY
Why Study Probability?
You have probably studied hashing as a way to store data so that it is possible to access
that data quickly. But for those of you who have not, we
Bogart-81046
book
March 31, 2005
4
15:18
INDUCTION, RECURSION,
AND RECURRENCES
4.1 MATHEMATICAL INDUCTION
Smallest Counterexamples
In Section 3.3, we demonstrated one way of proving statements about innite universes: We considered a generic member of the
Bogart-81046
boga81046index
March 31, 2005
19:8
Index
A
abstraction, 3, 30, 388
absurdity, reduction to, 122
addition
congruence relation for, 394
encryption process and, 51
mod n, 4951, 54, 394395
additive identity properties, 50, 397
additivity of expec
Bogart-81046
book
March 31, 2005
2
15:27
CRYPTOGRAPHY AND
NUMBER THEORY
2.1 CRYPTOGRAPHY AND MODULAR ARITHMETIC
Introduction to Cryptography
For thousands of years, people have searched for ways to send messages secretly.
There is a story that in ancient
Bogart-81046
book
March 31, 2005
3
15:23
REFLECTIONS ON LOGIC
AND PROOF
In this chapter, we cover some basic principles of logic and describe some methods
for constructing proofs. This chapter is not meant to be a complete enumeration of
all possible proo
(COMP2711)[2013](s)final~chyipah^_80677.pdf downloaded by clinaf from http:/petergao.net/ustpastpaper/down.php?course=COMP2711&id=6 at 2016-09-28 03:19:24. Academic use within HKUST only.
HKUST Department of Computer Science and Engineering
COMP 2711: Dis
(COMP2711)[2014](f)final~=gki_xek^_48625.pdf downloaded by clinaf from http:/petergao.net/ustpastpaper/down.php?course=COMP2711&id=7 at 2016-09-28 03:19:25. Academic use within HKUST only.
Serial #
HKUST Department of Computer Science and Engineering
COMP
(COMP2711)[2011](s)final~=baru6^_63951.pdf downloaded by clinaf from http:/petergao.net/ustpastpaper/down.php?course=COMP2711&id=1 at 2016-09-28 03:18:14. Academic use within HKUST only.
HKUST Department of Computer Science and Engineering
COMP170: Discre
(COMP2711)[2012](s)midterm2~=l66k0z^_97471.pdf downloaded by clinaf from http:/petergao.net/ustpastpaper/down.php?course=COMP2711&id=3 at 2016-09-28 03:18:18. Academic use within HKUST only.
HKUST Department of Computer Science and Engineering
COMP 2711:
(COMP2711)[2012](s)midterm~mttyip^_88578.pdf downloaded by clinaf from http:/petergao.net/ustpastpaper/down.php?course=COMP2711&id=4 at 2016-09-28 03:18:19. Academic use within HKUST only.
HKUST Department of Computer Science and Engineering
COMP 2711: Di