=========================preview======================
(COMP170)Midterm1_2008_sol.pdf
Back to COMP170 Login to download
======================================================
HKUST C Department of Computer Science and Engineering
COMP170: Discrete Math Tools for CS C FALL 2008
Midterm Examination 1 C Solution Sketch

Date: Thursday, October 09, 2008 Time: 19:00C20:30 Venues: LT B,C,D


Instructions
.
This is a closed book exam. It consists of 17 pages and 7 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.

.
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 canbe 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 Total
Points 15 11 16 13 14 17 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:
Problem 1: [15 pts]
8 men and 8 women are invited to a party at which they are seated at a long rectangular table. The table is designed so that 8 people can sit on its top side and8people on itsbottom side (no one sits at the othertwo sides). Each seat on the top is across from exactly one seat on the bottom.
The 8 men are seated on the top side of the table and the 8 women on the bottom side.
(a)
How many ways are there to seat the 8 men and 8 women?

(b)
Now suppose that one man and one woman have quarreled with each other and will not sit across from each other. How many ways are there to seat all of the men and women now?

(c)
Now suppose that if a man and woman are married they sit exactly across from each other. The party guests include exactly 3 married couples (husband-wife pairs). How many ways are there to seat everyone now?