=========================preview======================
(COMP170)[2011](s)midterm2~2453^_26484.pdf
Back to COMP170 Login to download
======================================================
HKUST C Department of Computer Science and Engineering
COMP170: Discrete Math Tools for CS C Spring 2010
Midterm Examination 2

Solution:
Sketch Solution Key
Date: Tuesday , April 20, 2010 Time: 19:00C20:30 Venues: LTA, LTB, LTC



Instructions
.
This is a closed book exam. It consists of 21 pages and 8 questions.

.
Please write your name, student ID, email, lecture section and tutorial 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. This is for clarityand is not meant to imply that each question requiresa full page answer. Many canbe 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 exam.

.
In question 3 and question 4, you are asked for a solution to a recurrence. A solution means a formula given in closed form. Formulas using the sum-


mation symbol( )or ellipses(...)will not be accepted as answers.
Questions 1 2 3 4 5 6 7 8 Total
Points 12 10 14 12 12 12 14 14 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.
Z is the set of all integers.

4.
R is the set of real numbers.

5.
R+ is the set ofpositive real numbers.

6.
Let n Z+ . Then Zn = {0, 1, 2, 3,..., (n .2), (n .1)}.


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.
p . q is equivalent to .p q

6.
..x U (p(x)) is equivalent to .x U (.p(x))

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


i=1
. n.12n 3.3n 2+n
8. i=1 i2 = 6
. n
n.1