CMPSCI 401: Theory of Computation
David Mix Barrington
Spring, 2008
This is the home page for CMPSCI 401.
CMPSCI 401 is an advanced undergraduate core course in
the theory of computation and will deal with formal language theory
(finite automata, regular languages, grammars, and pushdown automata),
computability theory, and complexity theory.
Instructor Contact Info:
David Mix Barrington, 210 CMPSCI
building, 545-4329, office hours M 1:30-2:30, Tue 11-12, Wed 2:30-3:30,
Thu 1-2.
I generally answer my email fairly
reliably.
TA Contact Info: Vimal Mathew, vml@cs.umass.edu, 5-1596. Office hours in LGRT 220, Tuesdays 2-3 pm.
The course is primarily intended for undergraduates in computer science
and related majors such as mathematics or computer engineering. CMPSCI 311
(theory of algorithms) is the primary prerequisite, though this may be
negotiable for students with a strong mathematics background. The mathematical
techniques taught in CMPSCI 250 (or similar courses like MATH 300 or MATH 455)
will be used heavily. No programming will be assigned, but familiarity with
programming at the level of at least CMPSCI 187 (data structures) will sometimes
be assumed. This is probably the mathematically most difficult course in the
CMPSCI undergraduate curriculum. It is a semi-elective course -- it fills
requirements for any CMPSCI major and many MATH majors, but should be taken only
by students whose mathematical ability and/or motivation is average or above
relative to CMPSCI majors.
The textbook for the course is Introduction to the Theory of Computation by Michael Sipser, second
edition. This is a very good book: I will be following it very closely
for my lectures, and it is a very good long-term reference, but it is rather
expensive. The first edition is available more cheaply, and the main text of
the two is virtually identical, but the second edition will be the source of
the problems I assign and it has a large number of solved exercises. I have
ordered the book through the Jeffrey
Amherst College Store in downtown Amherst.
The course will meet for three lecture meetings a week, MWF 11:15-12:05
in LGRT 204. There is no formal attendance requirement but there may be
occasional graded in-class activities.
There is also an scheduled honors section for the course called CMPSCI H07,
a one-credit seminar intended for undergraduates in Commonwealth College (but open to non-CC
students as well if there is room).
I will lead a seminar on some topics related
to the main course, such its connections to formal logic and abstract algebra.
This seminar meets Fridays 3:30-4:30 p.m. in room A311 LGRC.
Announcements (22 May 2008):
(22 May) I have graded the finals and emailed each of you your individual
grades. I was disappointed with the final, in particular that so many of you
didn't absorb the central definition of Question 7
(reference corrected
16 May 2009) . I changed the scale for the
final to A = 95, C = 60. The 25 scores, in descending order, were 109, 106,
104, 98, 97, 92, 90, 88, 86, 84, 82, 81, 78, 78, 71, 63, 56, 54, 53, 51, 49, 48,
46, 30, 28. The final grade distribution for the course was A 8 (four of them
unofficial A+), A- 2, B+ 5, B 0, B- 0, C+ 3, C 2, C- 1, D+ 2, D 1.
- (16 May) The final exam and its
solutions are now up. I hope to have grades
ready on Monday or Tuesday -- I will email individual reports to each of you.
Good luck with your other exams!
- (16 May) The final meeting of the honors section will be Monday 19 May,
1:30-3:30 p.m., in room 303 in the Computer Science Building.
- (14 May) Paper copies of the HW#6 solutions are available in the CMPSCI
main office, in the grey metal cabinet to the left of the reception desk.
I will be in a faculty meeting all morning but generally around this afternoon.
- (9 May) I have just posted the practice
final exam. Solutions will follow, probably Sunday night.
- (9 May) A correction to the syllabus -- the "plus" material referred to
for the last lecture is largely contained in section 10.5 of Sipser. Our
brief tour of circuit complexity will cover both sections 9.3 and 10.5.
- (28 April) I've posted the final homework assignment
, which is due on the last day of classes (Tuesday 13 May) by 4:00 p.m.
either to me directly or to the CMPSCI main office. Solutions for HW#5 will be
available in class Wednesday or in my office hours before that.
- (28 April) Two corrections on the syllabus:
the final exam is on Thursday 15 May, and we are covering all of Chapter 8.
- (24 April) I've answered two questions on HW#5.
- (13 April) I have graded the exams and set the scale at A = 104 and C = 64.
The total range of scores was 120, 120, 117, 111, 108, 107, 106, 105 (all A's
or A+'s to here), 100, 97, 96, 90, 83, 71, 69, 66, 65, 63, 61 (the last C),
51, 43, 35, 35, and 29.
- (13 April) I have just posted HW#5, which is due
two weeks from tomorrow, 28 April. The last homework, HW#6, will be due at
4:00 p.m. on the last day of classes, Tuesday 15 May.
- (13 April) I have posted the second midterm
and its solution. I expect to return graded
exams tomorrow, and to post the HW#5 assignment tonight.
- (13 April) Note that we have now been assigned a final exam slot, on
Tuesday 15 May 2008 from 1:30-3:30 in room 142, CPMSCI building.
- (7 April) I have just posted solutions to
the second practice midterm. On of the problems, 6b, turned out to be
much too hard for the exam, but you might still find the solution of interest.
- (7 April) Today in lecture I gave some definitions that I think make
it easier to read the two main proofs in section 6.1 of Sipser -- the proof
that SELFTM exists and the proof of Theorem 6.3:
- The concatenation of a sequence of Turing machines denotes a single
machine which operates each of the machines in turn, taking the output of one
as input to the next. Thus a machine ABT runs A on its input w to produce some
string x, runs B on x to get some string y, then runs T on y to get z.
- For any string x, the machine Px erases its input string
and outputs x.
- In the first proof, the machine B is defined so that on input w, it
outputs the concatenation of the machine Pw and the string w. If
w happens to be a machine, this concatenation will form a machine that first
runs Pw and then runs w on the result.
- In the first proof, R is defined to be the machine PBB, where
B is defined above. (Sipser uses "A" to denote PB.) We can trace
the action of R on any input string w. First PB erases w and outputs
the string B. Then B takes this B as input and outputs PBB. Since
this string is exactly R, R has the property that it outputs its own
description.
- Now we turn to the proof of Theorem 6.3. By "Px"
in this proof, Sipser
actually means a machine I will call P'x. This machine, given any
input w, outputs the pair of strings (w.x).
- In this second proof, B is defined slightly differently as well. Its
input must be a pair (w,x), and on this input it outputs a pair
(P'xx, w).
- The machine T in this second proof takes a pair of strings (y,z)
as input and computes the partial function t(y,z).
- In this proof, R is defined to be the machine P'BTBT. We can
trace the computation of R on a single input R. First P'BT takes
w and outputs (w, BT). Then B takes this pair as input and outputs
(P'BTBT, w). Finally T takes this pair and outputs
t(P'BTBT, w) which is equal to t(R, w) because R is equal to
P'BTBT.
- (7 April) Roberto Olivares, a student in this class, is looking for fellow
students with whom to study for the exam, particularly tonight and tomorrow.
His email is his first name, at cs.umass.edu (not student.umass.edu).
- (4 April) I just received and answered some thoughtful
questions on HW#4. If and when I get more questions I will answer them on
this page.
- (4 April) I have just posted a practice exam
for the second midterm, which will be next Thursday evening, 7-9 p.m., in
ELAB 306.
- (24 March) I have also just posted HW#4, which
is due in class on 9 April (two weeks from Wednesday).
- (24 March) As I mentioned in class today, I have to miss class this
Friday, 28 March, but we will still have class as grad student Philipp Weis
will lecture on section 5.1 of Sipser. The honors class will not meet.
- (24 March) Note that tomorrow is the last day to drop the course with
a W grade. Only a few of you need to be thinking about this, as most of you
are clearly on track to pass (C or better). But please email me or see me in
office hours if you are doing badly -- you should be able to judge your
performance from your returned work and the grade scales given below.
- (24 March) Welcome back from break! Vimal has graded HW#3, and solutions
and graded papers were handed out in class today. I will use the same scale of
A = 90, B = 72, C = 54 for this homework (and for HW#2). There were two 100's
on HW#3, exactly half were above 80, and only two were below 50 (along with
three people who handed in nothing). As I just clarified on the
requirements page, the lowest of the six
homeworks will be dropped and the best five will each count for 6% of the final
grade.
- (5 Mar) A reminder that undergraduate elections are going on today
and tomorrow -- you can choose the student who represents you on the board
of trustees of UMass, choose the student president, and vote in a referendum
on whether to endorse the negotiations coming out of last fall's "strike".
- (5 Mar) There is a First Friday event this coming Friday, with some
recent alumni coming back to talk about jobs in the real world -- 3:30 in
room 151 CMPSCI building.
- (5 Mar) The Jeffrey Amherst bookstore will soon return any excess copies
of Sipser they have to the publisher, so get your book soon if you still
need one from them.
- (4 Mar) I have finished the grading -- if you can't wait for tomorrow's
class, you may pick up graded exams in my office hours 11-12 today and if you
catch me in my office this afternoon (likely 1:30-4:30). I kept the scale at
105 = A, 88 = B, 70 = C, 53 = D, 35 = F. I was generally pleased with the
results -- out of 26 exams there were:
- 8 A+ (120, 119, 116, 115, 109, 109, 109, 109)
- 1 A (106)
- 1 A- (99)
- 3 B+ (92, 92, 91)
- 3 B (90, 88, 85)
- 4 B- (83, 81, 81, 81)
- 0 C+
- 2 C (69, 68)
- 1 C- (62)
- 1 D+ (60)
- 1 D (52)
- 1 F (36)
The four people below C should talk to me individually.
- (2 Mar) I have just posted solutions for
the first midterm. I may or may not have them graded by tomorrow.
- (1 Mar) I have just posted the text for the
first midterm. Solutions will follow probably tonight or tomorrow, and I
have done about a third of the grading.
- (29 Feb) I'll get the test and solutions for it posted as soon as I can,
probably sometime over the weekend. My optimistic goal is to have them
graded by Monday. In the meantime, I have posted HW#3,
which is due on 14 March, the last lecture before spring break.
- (29 Feb) Honors class today will be in a different room, Prof. Grupen's
office. We'll meet outside the normal room, LGRT 311, but be courteous of the
presentation that starts there at 3:00.
- (25 Feb) I have just posted solutions
to the first practice test. While writing them up I discovered an error in
the last question of the test itself, which
I have now corrected.
- (25 Feb) I have to skip my office hours tomorrow (Tuesday) because of
a dentist's appointment. Vimal will have his office hours 2-3 in LGRT 220,
and I expect to be around in general for most of the afternoon.
- (25 Feb) HW#1 has been graded and Vimal has made up paper solutions.
I will bring these to class on Wednesday. If you want them earlier, you may
be able to catch me tomorrow afternoon. The scale is A = 90, B = 72, C = 54.
The mean was around 77, and only a few people were below 70. The three people
below 50 should talk to me.
- (25 Feb) Today's lecture finished section 2.2 of Sipser and made a brief
start on 2.3 -- I plan to cover all of 2.3 on Wednesday. All of 2.3 will be
fair game for Thursday night's midterm, but I will not expect detailed
knowledge of the more complicated proofs in Chapter 2.
- (25 Feb) The exam on Thursday is in LGRT 1234, from 7-9 p.m. -- for future
reference, the second midterm on 10 April is in ELAB 306.
- (23 Feb) NO CLASS today as the University is closing at noon. I will
be in the regular room at the regular time but not present new material -- I'll
review whatever anyone wants to discuss. Of course the honors class at 3:30
is completely canceled and I will not be there.
- (22 Feb) As promised, the practice exam
for the first midterm is posted. The real exam will be comparable to this
in length and difficulty.
- (22 Feb) The weather looks threatening again for tomorrow -- please
check the UMass web page or other sources for any official closing, late
opening, or early closing.
- (18 Feb) Remember that tomorrow, Tuesday 19 February, is a Monday schedule.
Thus we will have
class at 11:15 and I will hold office hours 1:30-2:30 as usual for Mondays.
- (18 Feb) I have posted the second homework assignment
. I had to decide whether to make it due before the exam, which would give
you only a little more than a week for it, or after the exam, which means I
can't give out solutions before the exam. I chose the later deadline, but I
could be talked out of this.
- (14 Feb) I've received and answered some more good
questions in office
hours today and by email. I'll be reading email tonight until about midnight,
but I can't guarantee that I'll log in tomorrow morning until just before
class.
- (12 Feb) Vimal has set his office hour times as Tuesday 2-3 in LGRT
220 (across from the edlab) and he will be there today to talk about HW#1 if
needed. I got some good questions in office hours this morning, which I
summarized on the Q&A page.
- (12 Feb) The weather forecast for tomorrow is bad -- I will go by the
university's decision, so if the university opens before 11:15 we will have
class and otherwise we won't. If you are driving in, use your judgment as to
whether to risk it if we are open. The lecture, if we have it, will be on
section 1.4 but with special attention to the Myhill-Nerode theorem, which
Mike presents as the solution to Exercise 1.52 on pages 97 and 98.
- (7 Feb) I have posted the first question and answer
on HW#1. I'll add new questions and answer them as I get them.
- (30 Jan) I have posted the first homework
assignment, due in class Friday 15 February. I've also posted my office
hours, though I will check in class today before finalizing the Thursday
time.
- (25 Jan) The bookstore has confirmed by phone that the Sipser books
have arrived and are on the shelf. I look forward to meeting you all on
Monday!
- (21 Jan) The syllabus and the
requirements and grading page are now up.
- (17 Jan) I've ordered the textbook through the Jeffery Amherst College Store in downtown
Amherst (through the alley next to Laughing Dog cycle shop). I talked to
them today and they do not have the books on the shelf yet -- they will be there
by the first day of classes and may in fact be in the building already. I'll
confirm here when they are available. As I said above, you might be able to get
by with the cheaper first edition but the second is preferred.
- (17 Jan) This area of the main course page will serve as a blog and will
be my primary medium to communicate with the students (though I will email
everyone for urgent matters). Please check here frequently. Today I'm setting
up the basic parts of the course web page.
Last modified 16 May 2009