CMPSCI 250: Introduction to Computation
David Mix Barrington
This is the home page for CMPSCI 250.
CMPSCI 250 is the undergraduate core course in
discrete mathematics and will deal with logic, elementary number theory,
proof by induction, combinatorics, graphs, finite automata, regular languages,
and a brief introduction to Turing machines.
Instructor Contact Info:
David Mix Barrington, 210 CMPSCI
building, 545-4329, office hours Wed 2:30-3:30, Thu 1-3, or by appointment.
I generally answer my email fairly
TA Contact Info:
Daniel Gyllstrom, office hours 10-12 Tuesdays
in CMPSCI building lounge (SW of building, first floor)
The course is primarily intended for undergraduates in computer science
and related majors such as mathematics or computer engineering. CMPSCI 187
(programming with data structures) and MATH 132 (Calculus II) are corequisites
and in fact most students in the course have already taken both.
The course will meet for three lecture meetings a week, MWF 1:25-2:15
in ELAB 323.
There are two discussion sections, one meeting Monday 2:30-3:20 in Lederle
A205 and the other
Wednesday 11:15-12:05 in Lederle A203.
These will consist of students solving specific
problems alone or in groups and handing answers in, so that missing these
classes will incur a grade penalty.
There is also an honors section for the course called CMPSCI H11,
a one-credit seminar
intended for undergraduates in Commonwealth College (but open to non-CC
students as well if there is room). In this we will read
Hofstadter's Godel, Escher, Bach and discuss how it relates to the
topic of the main course. The seminar meets Fridays 11:15-12:05 in Room 140,
Computer Science Building (not in LGRT as originally scheduled). The first
meeting will be Friday 10 February.
Announcements (25 May 2006):
- (25 May) The final exam solutions are up.
- (24 May) The final exam is up -- solutions
will follow tomorrow.
- (23 May) I've graded the final exams, computed the grades, and emailed
everyone their exam and course grades. (Let me know if you didn't get it --
I used student.umass.edu addresses.)
I kept the scale of A = 110 and C = 70. The high score was 120, the median
88, and the low 40. On the exam there were 4 A+'s, 1 A, 1 A-, 4 B+'s,
2 B's, 3 B-'s, 2 C+'s, 2 C's, 1 C-, 1 D+, 1 D, and one D-.
On the course overall there were 3 A+'s, 2 A's, 4 A-'s, no B+'s, 5 B's,
5 B-'s, a C+, 2 C's, and a C-. So everyone passed, in the sense of not having
to repeat the course for CMPSCI credit. (I don't recall that ever happening
for me at this level before.) Only six of you benefited from counting the
final at 50% rather than 25% (you got the option that was better for you).
HW#8 has been graded and the returned papers are in the pickup box in the
main office. You may pick up graded final exams from me either now or in the
fall. I hope to see lots of you in CMPSCI 311!
I will post the final and solutions to it soon.
- (15 May) Ok, solutions for Discussion #10
and Discussion #11 are now posted.
- (15 May) Please check out the Q&A for HW#8 -- I
just fixed the bad link to it and added answers to two more questions. In
particular, if you haven't started Problem 9.10.2 yet, make sure you have the
right regular expression because the one in the Exercise solution in the book
is wrong. (You can do that one for full credit, but it's significantly more
complicated than the right one.)
- (15 May) I owe you solutions to Discussions #10 and #11 (which I haven't
been in a hurry to do because everyone who was there got a check-plus). I'll
try to get these up this morning.
- (12 May) Mike Sindelar tells me that his last review session for the
final exam will be 11:30 AM Sunday 21 May in room 1320 of Dubois. Remember
that the final is 10:30 AM Monday 22 May in ELAB 323, the room where we have
lecture. Also, there are discussion meetings next week (15 and 17
May) on the normal schedule. You'll fill out course evaluations, both the
university's multiple-choice questions and my own essay questions. Attendance
at this discussion meetings counts as for any other discussion.
- (10 May) I've now started a Q&A page for HW#8,
which now has one answered question on it.
- (10 May) I've just posted the HW#8 assignment,
which is due at the end of the last day of classes (Wed 17 May). This has
only individual questions and is a bit shorter than the others (I made problems
10 and 15 points rather than the usual 5 and 10). There is also a 15-point
- (10 May) Sorry for the late notice, but there's a typo in Problem 9.3.5
that makes it somewhat unclear. I'm putting the correction on the
- (2 May) The solutions to the third
midterm are now up.
- (1 May) I have posted the third midterm
and will post the solutions as soon as I get a chance, probably tomorrow
morning. I moved the scale downward to A = 93, B = 78, C = 63, D = 48. The
23 scores, in sorted order, were 98, 98, 93, 93, 91, 89, 79, 79, 78, 77, 76,
76, 74, 70, 67, 66, 64, 64, 63, 61, 54, 53, and 50.
- (1 May) Mike reminds me that the number 10100 is called
"googol", unlike the software company, and suggests
for further information. I incorrectly said in lecture today that the two
words were spelled the same.
- (28 Apr) I've just posted the HW#7 assignment.
Since you will have only a week for HW#8 (I am not allowed to make work due
after the end of classes) I will make HW#8 shorter and entirely individual.
This is a good time to remind you of the grade weighting for homeworks. You
get a score for each HW that is the sum of your individual and group scores.
This gets converted to a letter grade at something like A=90, C=60 (though I
won't commit to this now). Then the letter grades are averaged into your total
grade, with the six best ones weighted at 3% each, the seventh best at 2%,
and the worst not counted at all.
- (27 Apr) I've posted solutions for this week's
discussion. Don't forget that Mike has one more session in the library
before the test, at 4:00.
- (26 Apr) The HW#6 solutions I handed out in class today contain
an error. The three-attacking-two Risk probabilities are:
- Defender wins (attacker loses two): 2275/7776 (29.26%)
- Each lose one: 2611/7776 (33.58%)
- Attacker wins (defender loses two): 2890/7776 (37.17%)
See Wikipedia for
much more on Risk.
The table in the solutions is correct but the results stated below
the table are not what you get by computing the given dot products.
- (26 Apr) I promised direct links to practice exams for the third
midterm tomorrow -- here are
the Spring 2005 version,
the Fall 2004 version,
and a practice
exam from Fall 2004.
Solutions are also available on the same sites.
- (24 Apr) I've answered the first question on
- (12 Apr) The HW#6 assignment is now up.
- (12 Apr) I've posted the solution to Discussion
#8. The HW#6 assignment will be up tonight, due Wed 26 April, the day
before the third midterm. I handed out hardcopy solutions for HW#5 in class
today. This was not a good homework on my part -- there were two major mistakes
and it was rather harder than it should have been. The solutions of Problem
5.5.3 is incomplete -- I will fix this later.
- (11 Apr) I've posted the solution to Discussion
#7 and answers to two questions on HW#5. I'm sorry
the latter are too late to do you much good, but I only got the questions
tonight. If I get good email questions earlier I can answer them earlier.
- (11 Apr) Dan has decided to give back points he deducted on many students'
HW#4 for a particular alleged error in Problems 4.1.5 and 4.1.6. If you think
you are affected by this, you can either bring your paper to class tomorrow
(Dan will be there just at the start of class) or
email Dan directly.
- (10 Apr) There's an error in HW#5, question 5.4.2, which I've corrected
on the assignment page. There's also an error on the
syllabus page of the textbook -- it says there is no discussion on 24 April
but there are normal discussions that week (Discussion #9). It is true that
there are no discussions next week because of the Patriot's Day holiday. The
syllabus page has been corrected.
- (3 April) I have just posted the HW#5 assignment,
due a week from Wednesday, along with the second
midterm and its solution. As I said
in class today, the exam had 110 points rather than the advertised 100, and
I set the scale at A=100 and C=70. Only two of the 23 students taking the
test scored below 70, and several scored above 100. I will post more detailed
- (30 Mar) I've just posted the solution
for this week's discussion.
- (30 Mar) To repeat the two announcements from yesterday's class:
- The CMPSCI department is having a First Friday event tomorrow at 3:30
which will feature talks by three faculty members who will explain their
research. David Kulp will speak on "Hacking the Code: Genome Biology",
David Jensen will speak on "The Truth About Supermarket Courtesy Cards (Data
Mining)", and Brian Levine will speak on "My Other Computer is a Bus (Mobile
Systems)". Refreshments will be served.
- The Math Department's Henry Jacobs Mathematics Competition will be
held next Tuesday, 4 April, at 7:00 pm in rooms 101 and 103 LGRT. Register
in room 1623D LGRT by 3:00 pm on that day. This is a math test open to all
freshpersons and sophomores, and the top three finishers get large cash prizes.
CMPSCI undergrads have an excellent record of taking their money, so let's
carry on that tradition.
- (28 Mar) I have confirmed that the room for the exam will be
room 142 in the CMPSCI building, the same room we used for the first midterm.
There are three practice exams available for this test, though there are
slight differences in the material covered. Our exam will mostly be on the
parts of Chapters 3 and 4 we covered in lecture -- that is, everything since
the first midterm. There won't be questions specifically about logic, but
the proof methods from the first part of the course will certainly come up.
The definitions of equivalence relations, partial orders, etc., might also
- (27 Mar) Welcome back from the break! We all have to get back up to
speed fairly quickly, I'm afraid. The second midterm is Thursday 30 March,
not 31 March as the syllabus in the textbook says! I don't have a location
yet but will announce it (probably 142 CMPSCI again) as soon as I can.
The current homework is due Wednesday in class. There are two changes in the
Homework groups, which I have made in the list below. I will hand out paper
solutions to HW#4 in class on Wednesday, so you will have them before the
exam. (I thus can't give extensions on HW#4.)
- (8 Mar) I've added all the errors I know about to the
errata page. If you know of an error that's not
now on there, please email me. I know people have spoken about errors in
class, but it's far easier for me to deal with them if I get them in email.
- (8 Mar) The HW#4 assignment is now up.
- (8 Mar) The Discussion #5 solutions are now
posted. I plan to have the HW#4 assignment posted later today. Note that
HW#4 is due the Wednesday after break, and our next midterm is on the
Thursday after break. The syllabus tells you all
this and is also printed in each volume of the textbook.
- (8 Mar) A reminder -- I will be away all next week, at a conference in
Germany. I will have access to email. There will be guest lectures on
Monday (by Prof. Immerman) and Wednesday (by Dan),, but there will be no
discussions and no class (regular or honors) on Friday 17 March. The guest
lectures cover material for which you are responsible, just like any other
- (1 Mar) Ok, the Discussion #4 solutions are
- (1 Mar) The remaining two volumes of the textbook are now available
from Collective Copies. Volume II contains chapters 4-7 (so we start using
it on Monday), costs $24, and is called Course Packet #99. Volume III
contains chapters 8-10, costs $23, and is called Course Packet #100.
- (1 Mar) I am behind on writing up the Discussion #4 solution -- I hope
to have it up tonight.
- (1 Mar) I have updated the homework group list below to reflect changes
in the roster -- there are now seven groups of three people and two with two
- (27 Feb) I've received room assignments for the second and third midterm
exams, on 31 March and 27 April. Each exam is 6:00-8:00 p.m. in
- (27 Feb) I've now graded the first midterm. It turned out to be
a bit easier than I expected for the top students, and a bit harder for the
others, so I have set the scale at A=96 and C=63. There were no F's, but
the seven people who scored below 60 should talk to me. I think there is every
reason that each of you can pass the course, but we should talk.
Here are the more detailed results:
The mean was 76.3 and the median was 71.
- A+ (98-110): seven students (110, 110, 108, 106, 105, 102, 100)
- A (94-98): none
- A- (88-93): two (93, 90)
- B+ (83-87): none
- B (77-82): two (82, 78)
- B- (72-76): one (75)
- C+ (66-71): six (71, 71, 71, 71, 68, 66)
- C (61-65): one (65)
- C- (55-60): two (59, 56)
- D+ (50-54): one (53)
- D (44-49): two (49, 44)
- D- (39-43): two (42, 40)
- F (0-38): none
Also, I would like to make small adjustments in the homework groups
to equalize them based on performance on the first exam. I moved four
people, choosing randomly among the moves that would meet the conditions
I set (list updated 27 March to reflect roster changes).
- A: Masi, Sherrill, Thompson
- B: Siniscalchi, Taylor
- C: Farinella, Krainin
- D: Cook, Dean, Gaquin
- E: Cormier, Rood
- F: Dempsey, Laquidara, Maletz
- G: Moore, Morgan, Morrison
- H: Pratt, Sokolova, St. James
- I: Brzozowski, Partensky, Shah
- (26 Feb) The first exam and
its solution are now available.
- (24 Feb) I've posted the HW#3 assignment, due
a week from Wednesday.
- (24 Feb) The second test will be the Thursday night after
spring break, and HW#4 will be due sometime before that test. Remember that
I will be away the week before spring break. On Monday and Wednesday there
will be regular lectures, given by Neil Immerman Monday and Dan Gyllstrom on
Wednesday. There will be no discussions that week, and no lecture on Friday.
- (22 Feb) I've posted the solution for this week's
- (21 Feb) The first midterm will be 6:00-8:00 pm Thursday
in room 142 of the computer science building. It will cover lectures through
tomorrow (lectures 1-10), which means Chapters 1 and 2 except for Excursion
2.2, Section 2.5, and the proof of the Hasse Diagram Theorem in Section 2.10.
The definitions in sections 2.8 through 2.11 are very important -- I recommend
looking at all the Exercises in those sections. Two of the questions will
- (15 Feb) I have posted a solution for Discussion
- (15 Feb) The Supplemental Instruction sessions for this course have now
been scheduled. Michael Sindelar will meet with students Tuesdays at 7:00 and
Thursdays at 4:00 in room 1085 of DuBois Library. These sessions are free --
the more people they help, the more likely the library is to pay for such things
in the future.
- (15 Feb) I may be late to my 1:00-3:00 office hours tomorrow because I'm
having lunch with a visitor. I should definitely be there by 1:30, and I am
willing to stay after 3:00 if needed.
- (15 Feb) I hope everyone has made initial contact with the members of their
homework groups. Two of the groups have changed slightly because someone
dropped the course -- these people have been emailed about that.
- (13 Feb) Dan's office hours are 10-12 on Tuesdays. (I think I mentioned
this in class but haven't posted it here yet.) They are held in the
"multi-purpose room" (unofficially called the "lounge") on the southwest side
of the first floor of the CMPSCI building.
- (12 Feb) The second HW assignment is posted.
This is half individual and half group, using the groups below. It is due
Wed 22 February, the day before our first midterm.
- (12 Feb) Here are the preliminary homework groups, based on the 27
people registered on SPIRE today. What I did was divide each of the discussion
groups into high, middle, and low preparation, and make groups with one high,
one middle, and one low. (Each group is in alphabetical order.)
- A: Masi, Sherrill, Thompson
- B: Neofitov, Siniscalchi, Taylor
- C: Farinella, Krainin, Partensky
- D: Cook, Dean, Gaquin
- E: Cormier, Fieldman, Morgan
- F: Dempsey, Laquidara, Maletz
- G: Moore, Morrison, Rood
- H: Pratt, Sokolova, St. James
- I: Brzozowski, Kanjilal, Shah
- (10 Feb) As noted in class today, there is a significant typo in
Problem 1.8.4 on Homework #1 -- please see the
assignment page for the correction.
- (9 Feb) I've posted a solution for this week's
- (6 Feb) I've posted the first three mistakes I've
found in the text, none of them very important, and the first
Q&A entry for HW#1. A reminder -- if your see things
like "&foo;" on one of these pages it is because your browser is not reading
entities properly -- the linked page will tell you what symbol is meant.
(Another possibility is that I've written a tag wrong, in which case you should
email me so I can fix it.) The "View Source" function of the browser will show
you how to make these symbols yourself in HTML.
- (3 Feb) I have just posted homework assignment #1,
which is due a week from Monday.
- (1 Feb) I forgot to mention three things in class today:
- There is a First Friday meeting this Friday at 3:30, for CMPSCI
majors and pre-majors, in room 150/151 of the CMPSCI building.
- The Learning Resource Center in the library is providing what they
call "Supplemental Instruction" in this class. On Friday or Monday the
class will be polled to find a good time for some weekly free help sessions
to be run by Mike Sindelar, a CMPSCI senior who's doing an honors project with
- The honors section will not meet this Friday -- if you are
interested in adding the honors section contact me in person or by email.
- (1 Feb) Class today is in ELAB 323, a fairly nice classroom on the
northwest corner of the ELAB building. If you leave the CMPSCI bulding
going toward campus, ELAB is the first building on your left -- go in the
door on that side and take the stairs up to the third floor.
- (31 Jan) In class tomorrow I will hand out and collect an information
sheet, which I will use later to help assign homework groups. If you are
late or absent for the class, please make sure to get a sheet from me as
soon as possible.
- (31 Jan) The first course packet is now available from
Collective Copies, 71 South Pleasant
St., Amherst (near Hastings stationary on the west side of the common). It
costs $20 and contains chapters 1-3 of the textbook. Ask for course packet
- (30 Jan) I've now put up the requirements
page for this term. Note that the prior-term web pages look a lot like
the ones from this term -- make sure you know what you are looking at!
- (30 Jan) Note that there are no discussion meetings this week.
We will start the course Wednesday at 1:25 in ELAB 323. The first volume of
the textbook (Chapters 1-3)
is expected to be ready tomorrow at Collective Copies. The second and third
volumes will be ready in a week or two.
- (24 Jan) I am setting up the bare bones of the web site today.
In most respects the course will run like the Spring
2005 version of CMPSCI 250. There is a new version of the text available,
with an index of terms defined in each chapter and the known errors corrected.
Used copies of the Spring 2005 text should be usable for this term -- Fall
2004 not so much. The new texts are not available yet -- I will post here
when they are ready.
Last modified 25 May 2006