=========================preview======================
(COMP170)[2010](s)final~cs_zxxab^_10165.pdf
Back to COMP170 Login to download
======================================================
HKUST C Department of Computer Science and Engineering
COMP170: Discrete Math Tools for CS C Spring 2010 Final Examination
Date: Monday May 31, 2010 Time: 16:30-19:00 Sketch Solution Key


Instructions
.
This is a closed book examination. It consists of 28 pages and 9 questions.

.
Please writeyour name, student ID, email, lecture and tutorial sections on this page.

.
For each subsequent page, please write your student ID at the top of the page in the space provided.

.
Please sign the honor code statement on page 2.

.
Answer all the questions within the space provided on the examination paper. You may use the back of the pages for your rough work. The last three pages are scrap paper and may also be used for rough work. Each question is on a separate page (and sometimes has an extra page for you to do work on). This is for clarity and is not meant to imply that each question requires a full page answer. Many can be answered using only a few lines.

.
Only use notation given in class. Do not use notation thatyou have learnt outside of this class that is nonstandard.

.
Calculators may be used for the examination.


Questions 1 2 3 4 5 6 7 8 9 Total
Points 10 10 14 12 9 13 12 12 8 100
Score

As part of HKUSTs introduction of an honor code, the HKUST Senatehas recommended that all students be asked to sign a brief declaration printed on examination answer books that their answers are their own work, and that they are aware of the regulations relating to academic integrity. Following this, please read and sign the declaration below.
I declare that the answers submitted for this examination are my own work.
I understand that sanctions will be imposed, if I am found to have violated the University regulations governing academic integrity.
Students Name:

Students Signature:
De.nitions and Formulas: This page contains some de.nitions used in this exam and a list of formulas (theorems) thatyou may use in the exam (without having to provide a proof). Note that you might not need all of these formulas on this exam.
De.nitions:
1.
N = {0, 1, 2, 3,...}, the set of non-negative integers.

2.
Z+ = {1, 2, 3,...}, the set ofpositive integers.

3.
Zn = {0, 1, 2, 3,...,n .1}for n Z+ .

4.
R is the set of real numbers.

5.
R+ is the set ofpositive real numbers.

6.
A coin is fair if it has probability 12 of showing a head and probability 12 of showing a tail.


Formulas:
nn!
1. =
ii!(n.i)!
nn.1 n.1
2. If0 <i<n then =+ .
ii.1 i
3.
.(p q)is equivalent to .p .q.

4.
.(p q)is equivalent to .p .q.

5.
n.1 i = n(n .1)/2


i=1
.n.12n 3 .3n 2+n
6. i2 =
i=1 6
. n
n.1 i 1.r
7. If r .1 then r=
=.
i=0 1.r
. n+2 n+1+r
n nr.(n+1)r
8. If r .1 then = .
= iri
i=0 (1.r)2
9. The inclusion-exclusion theorem:
nn
PEi =(.1)k+1 P (Ei1 Ei2 ... Eik )
i=1 k=1 i1,i2 ,...,ik : 1i1<i2<...<ik