=========================preview======================
(COMP2711)[2012](s)midterm~mttyip^_88578.pdf
Back to COMP2711 Login to download
======================================================
HKUST C Department of Computer Science and Engineering
COMP 2711: Discrete Math Tools for CS C Spring 2012
Midterm Examination 1

Date: Friday, March 2, 2012 Time: 19:00C21:00
#

Name: Student ID:
Email: Lecture and Tutorial:

Instructions
.
This is a closed book exam. It consists of 13 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 clarity and is not meant to imply that each question requires a full page answer. Many can be answered using only a few lines.

.
Unless otherwise speci.ed you must always explain how you de-rived your answer. A number without an explanation will be considered an incorrect answer.

.
Solutions can be written in terms of binomial coe.cients and falling facto-

rials. For example, 35 + 24 may be written instead of 16, and 53 instead of 60. Calculators may be used for the exam (but are not necessary).

.
Please do not use the nPk and nCk notation. Use nk and nk instead.


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

As part of HKUSTs introduction of an honor code, the HKUST Senate has 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:
Problem 1: [15 points] Suppose six persons {p1,p2,p3,p4,p5,p6} are to be seated in a row of 6 seats facing the same direction.
(a)
How many ways are there to seat the 6 persons such that p5 must sit to the left of p6? (e.g. (p1, p5,p3,p2, p6,p4) is valid, but (p1,p3, p6, p5,p2,p4) is invalid)

(b)
How many ways are there to seat everyone if p4 and p5 must both sit to the left of p6?

(c)
Consider n people {p1,p2, ,pn} to be seated in a row of n seats where n> 1. How many di.erent ways are there to seat them if p1,p2, ,pk must sit to the left of pk+1, where 1 k<n?


Solution:
(a)
6!/2. There are a total 6! seating arrangements, only half of them are valid.

(b)
6!/3. There are a total 6! seating arrangements, only one-third of them are valid. To see this, consider seating p4, p5