Vous êtes sur la page 1sur 6

Spring 2015

C SCI 220: Discrete Structures (M W 5:00 6:15 p.m. Section)


Instructor: Dr. T. Yung Kong

Office: SB A106 (Office Phone: 718-997-3478)


Office Hours: Mondays & Wednesdays 6:30 7:30 p.m. in SB A106
E-mail: t.yung.kong@euclid.cs.qc.cuny.edu Voicemail: 718-425-9934

Learning Goals
To gain experience in reading and understanding mathematics, and develop mathematical thinking
skills, through the study of some areas of discrete mathematics that are important in computer science.
To understand terminology, methods, arguments, and results in these areas of discrete mathematics.*
*Three exams will be given to test students' understanding of the terminology, methods, arguments, and
results covered in this course.
Required Text: K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2011.
ISBN 978-0-07-338309-5
Provisional Syllabus and Schedule*
introduction to algorithms and pseudocode
introduction to graphs
graph terminology, special types of graph, Hall's Thm.
adjacency list/matrix, incidence matrix; isomorphism
connectedness and paths
simple properties of (rooted and unrooted) trees
Euler and Hamilton paths and circuits
planarity, Euler's Formula, Kuratowski's Theorem
vertex coloring, chromatic number, 4-color Theorem
relations and their properties
representing relations
infinite asymptotics
recursive definitions
introduction to recurrences

Relevant Parts of Rosen


pp. 1913
Preliminary reading
Sec. 10.1
Week 1
Sec. 10.2
Weeks 2 4
Weeks 4 6
Sec. 10.3
Sec. 10.4
Weeks 6 7
Weeks 7 8
Sec. 11.1
Sec. 10.5
Weeks 8 10
Sec. 10.7
Weeks 11 12
Sec. 10.8
Week 12 or reading
Sec. 9.1
Weeks 13 14
Sec. 9.3
Week 14
pp. 204 14
Reading assignment 1
pp. 344 7, 349 53
Reading assignment 2
pp. 157 60, 501 7
Reading assignment 3

*The syllabus and schedule are subject to change.


Homework Assignments
A set of homework problems will be assigned for each section of Rosen that is covered in class and each of
the three reading assignments (see pp. 3 4); solutions to these problems will be available. While these
homework assignments will not carry direct credit towards your grade, some exam questions or parts of
questions will be of a similar nature to homework problems. Students who have difficulty in solving any
homework problem should consult me after class or during my office hours.

Class Dates
This class will meet each Monday and Wednesday from Wednesday 1/28 through Wednesday 5/13 with
three exceptions (see below). There will be a Final Exam, which is scheduled to be given from 4:00 to 6:00
on Wednesday 5/20. This class will not meet on:
Monday 2/16 (Presidents' Day: The College will be closed)
Monday 4/6 and Wednesday 4/8 (Spring Recess is 4/3 4/11)
The last day to file for a P/NC or an unevaluated W is 4/16 (unless you are a 2nd semester freshman).
Exams
Your grade will be based on your scores on the cumulative final exam and two other exams. The maximum
possible scores on these exams will be as follows:
Exam 1 (75 minutes):
25 pts.
[Tentative date: Monday, March 30]
Exam 2 (75 minutes):
25 pts.
[Tentative date: Wednesday, May 13]
Cumulative Final Exam (120 minutes): 40 pts.
[4:00 6:00 p.m. on Wednesday, May 20]
Note that the maximum score on each exam is (length of the exam in minutes)/3. It is expected that all
exams will be given in our regular classroom; any room change will be announced in class. Any change in
the date of an exam will be announced at least one week before the new date.
Exams will be closed-book; however, students may bring in a "crib" on a single letter-sized sheet of
paper. For the first and second exams the crib is limited to one side of the paper; the other side must be
blank. For the final exam you may write on both sides of the crib.
Cheating on exams will be taken very seriously. Anyone found to have cheated on an exam (e.g.,
by looking at another student's answers during the exam) will receive an F for the course.

Grading
Your grade will be based on 100/90 the sum of your scores on the exams.
When I compute your grade I will replace the lower of your scores on the first and the second
exams with 25/40 your final exam score if that is higher. (If your scores on the first and the second
exams are equal, at most one of those two scores can be replaced in this way.) There will be no make-ups
for the first and second exams: Missing either exam will be equivalent to scoring 0 on that exam.
Let s be the sum of your scores on the three exams, after replacing the lower of your scores on the
first and second exams with 25/40 your final exam score if that is higher. Your grade will be F if you
are an undergraduate and 100s/90 is less than the threshold score for D, or if you are a graduate student and
100s/90 is less than the threshold score for C. In all other cases you will receive the highest grade whose
threshold score does not exceed 100s/90. Provisional threshold scores for each grade are: A+ 97, A 90,
A 87, B+ 83, B 80, B 76, C+ 73, C 69, and, for undergraduates, D+ 63, D 60. The threshold for C may
be lowered by up to 1 point for some students, at the discretion of the instructor. No grades of C will be
given. Grades for this course will be a measure of attainment, not effort.
Students who have not officially withdrawn from the class but are absent from both the second
exam and the final exam may possibly receive a grade of WU.

Reading Assignment 1 (for the Final Exam)


In the Growth of Functions section (Sec. 3.2) of Rosen, read pp. 204 13 and
Examples 8 and 9 on p. 214.
There will be no questions on this material on Exams 1 and 2. If this topic is not covered
in class, then there will be one Final Exam question* on this material. If this topic is
covered in class, then there may be more than one Final Exam question on this topic. The
Final Exam question(s) on this topic will consist of one or more parts; each part will be at
least fairly similar in nature to part or all of one of the homework exercises that are listed
below (but may possibly be formulated as a multiple-choice question). You will not be
asked to write proofs relating to this topic, nor to calculate witnesses C and k that establish
a big-O relationship.
Homework: pp. 216 7: Exercises 1, 2, 7, 8, 14, 15, 19, 20, 21, 22, 23, 24, 25, 26, 27
Solutions to Exercises 2, 8, 14, 20, 22, 24, and 26
2.(a) Yes (b) Yes (c) Yes (d) No (e) No (f) Yes
8.(a) 4 (b) 5 (c) 0 (d) 1
14.(a) No (b) Yes (c) Yes (d) Yes (e) Yes (f) Yes
20. Yes, in both cases.
22. function 3, function 4, function 7, function 2, function 1, function 5, function 6
24. The first algorithm uses fewer operations for all sufficiently large values of n.
(b) O(6n)
(c) O(n! nn)
26.(a) O(n3 log n)

Reading Assignment 2 (for the Final Exam)


In the Recursive Definitions and Structural Induction section (Sec. 5.3) of Rosen, read
pp. 344 7 (up to and including Example 4) and the subsection entitled Recursively
Defined Sets and Structures on pp. 349 53.
There will be no questions on this material on Exams 1 and 2. If this topic is not covered
in class, then there will be one Final Exam question* on this material. If this topic is
covered in class, then there may be more than one Final Exam question on this topic. The
Final Exam question(s) on this topic will consist of one or more parts; each part will be at
least fairly similar in nature to part or all of one of the homework exercises that are listed
below (but may possibly be formulated as a multiple-choice question). You will not be
asked to write proofs relating to this topic.
Homework: pp. 357 9: Exercises 1, 3, 7, 9, 11, 23, 25, 31, 35, 37, 39
*There will be a total of 12 questions on the Final Exam (including the questions that
relate to the 3 reading assignments); students will be expected to answer exactly 8 of
the 12 questions.
3

Reading Assignment 3 (for the Final Exam)


In the Sequences and Summations section (Sec. 2.4) of Rosen, read the subsection
entitled Recurrence Relations on pp. 157 60. Then read the Applications of
Recurrence Relations section (Sec. 8.1) on pp. 501 7.
There will be no questions on this material on Exams 1 and 2. If this topic is not covered
in class, then there will be one Final Exam question* on this material. If this topic is
covered in class, then there may be more than one Final Exam question on this topic. The
Final Exam question(s) on this topic will consist of one or more parts; each part will be at
least fairly similar in nature to part or all of one of the homework exercises that are listed
below (but may possibly be formulated as a multiple-choice question).
Homework: pp. 168 9: Exercises 9, 11, 13, 15, 17, 19, 21, 23
pp. 510 1: Exercises 3, 7, 9, 11
*There will be a total of 12 questions on the Final Exam (including the questions that relate
to the 3 reading assignments); students will be expected to answer exactly 8 of the 12
questions.

Homework for Secs. 10.1 10.3 [Not for Credit]


Do the following exercises from Rosen (7th ed.):
10.1 Introduction to Graphs
pp. 649 50: Exercises 1, 3, 5, 7*, 9, 13, 21
*

The book's solution to this problem is rather unsatisfactorybecause of the way the problem is
worded, the answer should really be one of the six terms that appear in the first column of Table 1.

10.2 Graph Terminology and Special Types of Graphs


pp. 665 8: Exercises 1, 3, 5, 7, 9, 11, 21, 23, 25, 27, 28, 29, 30, 33, 35, 37, 39, 41,
43, 47, 49, 51, 53, 55, 57, 59, 61, 63

An edge is missing from the book's solution to this problem!


In the solution to part b of this question, f should be corrected to d, e.

In this question, draw a graph should read draw a simple graph.

10.3 Representing Graphs and Graph Isomorphism


pp. 675 7: Exercises 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 35, 37, 39, 41, 43,
47, 49, 51, 53, 55, 57

Answers to exercises 28(b,c) and 30(b,c) of 10.2:

28.(b) One possible assignment: Zamora--planning Agraharam--development Smith--publicity Chousales


Macintyre--industry relations
(c) It is a complete matching of the employees to the responsibilities, and is therefore a maximum matching. (It is not a complete matching of the
responsibilities to the employees.)
30.(b) One possible matching: Anna--Jason Barbara--Kevin Carol--Nick Diane--Larry Elizabeth--Matt
(c) It is a complete matching of the women to the men, and is therefore a maximum matching. (It is not a complete matching of the men to the women.)

Future lists of homework exercises will not be handed out in class, but will be
e-mailed to your xxxxx220 euclid account (see below).
Accounts on euclid and E-mail Forwarding
Each student has an account on the machine euclid.cs.qc.cuny.edu. I will send lists of homework exercises
and other important course-related information (such as the point allocation on exams) to everyones euclid
account from time to time. Please set up mail forwarding on your euclid account as explained on the next
page. After you do that, every e-mail that is sent to your euclid account should automatically be forwarded to
your regular e-mail address. IMPORTANT: E-mail forwarding is not 100% reliable; some forwarded e-mail
may be removed by spam filters. So be sure to check e-mail on euclid at least twice a weekenter pine on
euclid after you logon to check e-mail on euclid.
In most cases* your username is ?????220 where ????? is your last name in lowercase, or its
first 5 letters if it is longer than 5 letters; omit any space, apostrophe, or hyphen.*
Examples: T.Y. Kong -> kong220 K.H. Rosen -> rosen220 A. Einstein -> einst220
*Exceptions: Jialin Cao -> caoj220
Tianxiao Cao -> caot220 Guanhao Chen -> cheng220 Huang Chen -> chenh220
Jian Chen -> chenj220
Xinbo Jin -> jinxb220
Nie Lin -> linn220
Xing Song Lin -> linx220
Hao Rong Qiu -> qiuh220 Li Qiu -> qiul220
Your username may also be different if you registered for this class after 1/26/2015.

Your initial password is q followed by the last 7 digits of your CUNYfirst ID.
Example: If your 8-digit CUNYfirst ID is 12345678, then q2345678 is your initial password.
NOTE: No characters should appear on the screen when you type the password at the "Password:" prompt--the
cursor shouldn't move--but the system will know what keys you pressed! Remember to press E at the end.

The first time you logon, you must choose a new password, so think of a good password (which should be
6 8 characters long, and include at least two letters and at least one digit or special character) beforehand.
See the next page for information on how to connect to euclid from a PC or a Mac that has an Internet
connection, and how to set up mail forwarding on euclid.
5

If you are using a PC with an Internet connection, here are two ways to connect to euclid:
Method 1: If PuTTY is not already installed on your PC, download the file putty-0.63-installer.exe
from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and install
PuTTY into the default installation folder, which is c:\program files (x86)\putty for 64-bit Windows
but is c:\program files\putty for 32-bit Windows. To connect to euclid using PuTTY:
1. Type Win-r (i.e., hold down the Windows key
and type r) to open the Run dialog box.
2. Enter the following into the "Open:" textbox:
for 64-bit Windows:
c:\program files (x86)\putty\putty euclid.cs.qc.edu
for 32-bit Windows:
c:\program files\putty\putty euclid.cs.qc.edu
If a PuTTY Security Alert dialog box pops up, click the Yes button at the bottom of the dialog box. When
the login as: prompt appears (in a new terminal window), enter your username and password. (You can
avoid having to type the folder name c:\program files\putty\ or c:\program files (x86)\putty\
at step 2 if you add the folder name to your PATH see, e.g., http://java.com/en/download/help/path.xml
but substitute the folder name for "the location of the class" in the instructions.)
Method 2: Some PCs in College computer labs have a program named SSH Secure Shell Client installed.
You can use this to connect to euclid:
1. Launch SSH Secure Shell Client and click on its Quick Connect button.
2. In the dialog box that opens, type euclid.cs.qc.edu in the Host Name textbox, and type your
username (see below) in the User Name textbox.
3. Click on the Connect button to connect to euclid.
If a Host Identification dialog box pops up, click the Yes button at the bottom of the dialog box.
If you are using a Mac with an Internet connection, you can connect to euclid in the following way:
1. Click the magnifying glass icon in the top-right corner of your Mac's screen.
2. Type terminal in the Spotlight search box.
3. In the menu that appears, click on a line that looks like:
4. In the Terminal window that opens, enter ssh ?????220@euclid.cs.qc.edu
where ?????220 means your euclid username. You may possibly receive a warning that ends with
RSA key fingerprint is 89:ab:c2:ab:56:f6:3a:70:f2:8f:de:ab:d8:e8:78:3b.
Are you sure you want to continue connecting (yes/no)?

Enter yes if you receive such a warning.


If step 4 does not work, restart the Mac and try 1 4 again.
The first time you logon to euclid, you will be asked to change your password:
passwd: Changing password for ?????220
Enter existing login password:

Re-enter q followed by the last 7 digits of your CUNYfirst ID and you will be prompted for a new password:
New Password:

Enter a new password. You will be asked to re-enter it for verification. If you re-enter your new password
correctly, your password will be changed and you will be logged off. Login to euclid again (using your
new password!) and do the following to set up mail forwarding:
1. Create a file named .forward that contains your regular e-mail address. You can do this as follows:
Enter nano .forward on euclid (notice that there is a space between nano and ., but
there is no space between . and forward), then enter your regular e-mail address and type the
3 characters Fo E Fx to save the file.
2. Enter cat .forward and check that your regular e-mail address is displayedif it isnt, redo step 1.
3. Enter the line:
echo test | mailx ?????220
(Again, ?????220 means your username on
euclid; notice the | character.) You should then receive a test e-mail at your regular e-mail address.
4. After you receive the test e-mail, enter xc on euclid (which will send me a copy of your .forward file).
If you do 1 4 no later than Thursday, Feb. 12 and your .forward file is correct, you will receive 0.25 pt.
extra credit. You should receive an automatically generated reply.
6

Vous aimerez peut-être aussi