|General Course Information||What this Course is About||Required Background||Textbook|
|Required Work||Grading||The laptop-free
||Detailed Course Schedule|
What can be computed? What can a computer--the one on
your desk or on your lap or in your pocket, or computers that
have yet to be built-- do? What can't a computer
do? Are there really problems that cannot be solved by any
algorithm (and how would one ever prove such a thing)?
Are there problems that, while solvable in principle, can
never be solved in practice, because a practical solution
would require too much time or memory? Is this a purely
logical question, or is it a technological question?
Would computers that operate on different physical principles
be able to do things that our present computers cannot?
Since the 1930's, beginning with the work of Church and
Turing, mathematicians and computer scientists have been
exploring these questions by creating mathematical models of
computation and studying their formal properties. Their
discoveries have fostered a deeper understanding of the
limitations of both computation and mathematical reasoning,
aided in the development of secure (maybe) cryptographic
systems that are used by all of us every day, and the
prospect, at least in principle, of building
quantum-mechanical computers that solve problems out of the
reach of conventional computers (and also break those secure
The following is an approximate list of topics:
I don't expect that we will do everything on this list, at
least not in detail. This is a 'terminal' course, in the
sense that it is not a prerequisite for anything else you will
take as a Boston College undergraduate, and some of the ideas
are difficult. So I am in no rush to 'cover the
material': I will slow down as necessary to make sure
that as many students as possible are up to speed, and prefer
to drop a topic rather than speed through something important
that you might need more time with.
On the mathematical side, either Introduction to Abstract
Mathematics in the Math department, or Logic and Computation
in the Computer Science department, or something equivalent,
is essential. This course requires a working familiarity with
abstract mathematical notation for sets and functions, and the
ability to read, follow, and in some cases write mathematical
proofs. I know, of course, that a lot of this material
is easily forgotten, so I will often pause to remind you what
something means, but at least in terms of the basics, you
should not be seeing this stuff for the first time.
You also need to have some programming background, at least
the equivalent of a one-semester introductory course (for
example, CS1101). It should not matter much what
programming language you studied.
There is no official course textbook. Although
much of the material is by now pretty standard, there is no
one book that treats all these topics in the way I would like
to. I will post lecture notes, usually just after the
class in which the relevant material is presented, so that the
notes can take account of points the students may have found
difficult during the lecture.
Still, it's nice to be able to read something, so here is a
selection of recommended items:
Introduction to the Theory of Computation, by Michael
Sipser. If there were a textbook for the course, this
would be it. It covers the majority of the topics on the
list above (and much, much else), and at what I consider an
appropriate level. The main drawback is the price:
The current (2012) 3rd edition will set you back $200
new. If you are interested in buying something, I would
advise you to look for a copy of the 2005 2nd edition.
There are used copies available on Amazon for $75 or
less. The material in Chapters 3-5, 7, and parts of
Chapters 8 and 10 are all relevant.
Computational Complexity, A Modern Approach, by
Sanjeev Arora and Boaz Barak. In its totality, this book
is far more advanced than what is appropriate for this course,
and is more of a graduate-level textbook. But the early
chapters are about right for us, and an earlier draft is available
free at Arora's website. (The print edition is
also quite reasonably priced, but only a relatively small
fraction of it will be discussed in this course.)
Chapters 1, 2, parts of 4, 7 and 10, and Chapter 20 of the web
draft are relevant to us (corresponding to Chapters
0,1,2,4,7,9 and 10 of the print edition.)
Computers and Intractability: A Guide to the Theory of
NP-Completeness, by Michael R. Garey and David S.
Johnson. This 1979 classic, has the honor of being the
most-cited reference in the computer science literature. It
concentrates on just one piece (but a big piece) of our
course. It is still relevant, and not too expensive on
The Nature of Computation, by Christopher Moore and
Stephan Mertens. Big (> 900 pages), relatively new (2011),
quirky (it does computational complexity before computability,
unlike almost every other book on the subject), engaging and
fascinating, not at all like a standard textbook.
Logic and Computation. The free online textbook
that I wrote for CS2243 will be available on the Canvas site
for this course. It is there mostly as a reference for
the mathematical prerequisites, although the book ends where
we start, with Turing machines and computability.
If you do use other material, you should be aware that the exact definitions of many terms (especially of Turing machines) are not completely standard--the fact that they do not have to be completely standard is an important principle in the subject.
If you are a student with a documented disability seeking
reasonable accommodations in this course, please contact
Kathy Duggan, (617)552-8093, email@example.com, at
the Conors Family Learning Center, regarding learning
disabilities and ADHD. For all other types of
disabilities, including temporary disabilities, contact
Rory Stein, (617) 552-3470, firstname.lastname@example.org, in the
Disability Services Center. Advance notice and
appropriate documentation are required for accommodations.
My colleague Bob Muller calls this policy the
A successful class requires your attention, engagement,
and participation. You need to be prepared to ask
and answer questions during the lectures, and to attend to
the questions and answers of your fellow students and of
the instructor. That screen open to your e-mail or
Facebook page distracts not only you, but the students
sitting behind you. For this reason, open laptops are not
permitted in the classroom. The same applies to
smaller screens: put the phone away, you can read
and write your texts after class.
You say you're taking notes on that laptop
instead of looking at reddit? You should be aware that (a)
it is very difficult to take notes for this class on a
computer, given the large number of mathematical symbols.
formulas and diagrams that we use; and (b) taking
notes by hand is better for you.
It is acceptable to take notes on a tablet computer with
||Lecture notes and other
Encoding problems as strings.
The Turing machine model.lecture6.pdf
|Lecture 0: Overview
Lecture 1: What is a computation? Turing machines
How to use the Turing machine simulator.
reverse.tm - a typical file for the simulator.
tm.py - the simulator program (Python 3 version)
tmpy2.py - the simulator program (Python 2 version)
Turing's 1936 paper, 'On computable numbers, with an application to the Entscheidungsproblem', introducing Turing machines. Of most interest for us is the very readable Section 9, where Turing attempts to justify why the machine model captures the intuitive notion of what a 'computer' (by which he meant a person!) can do.
Resources for learning LaTeX :
The not-so-short introduction to LaTeX
Wikibook on LaTeX
1, due Thursday, September 6.
LaTeX source for assignment.
Graphics files from the assignment (you need these to get the LaTeX source to compile):
||The Turing machine
The Church-Turing thesis.
|Lecture 2: Turing machines for
equalasbs.tm - specification file for the machine that tests for equal numbers of a's and b's
Lecture 3: Church-Turing thesis; equivalence of multi-tape and one-tape Turing machines.
2, due Tuesday, September 18.
LaTeX source for assignment
Graphics files for the images in the assignment:
Assignment 2 Solutions
The Turing machine specifications for the assignment:
Equal halves (simpler version)
Move over one cell
Insert blank cells throughout input
Reversal with a unidirectional tape
Universal Turing machine
Undecidability of the Halting Problem.
A sampler of undecidable problems about Turing machines (and a few decidable ones).
|Lecture 4: Closure properties,
additional computational problems
Lecture 5: Universal Turing Machine
Lecture 6: An undecidable problem.
Lecture 7: Undecidable problems about Turing machines.
3, due Tuesday, October 2.
LaTeX source for the assignment
Rush Hour figure
A sampler of undecidable problems that are not about Turing machines and computer programs.
|Lecture 8: A sampler of
||Undecidability of the
Tiling Problem (special case)
Undecidability of arithmetic; Goedel's Theorem
|Lecture 9: Proof of
undecidability for string rewriting systems and
the constrained tiling problem.
Can't Decide? Undecide! An very readable article from the Notices of the American Mathematical Society on undecidable problems.
Lecture 10: Goedel's Theorem
||More on reductions.
||The first midterm from a
previous version of the course
||The test with
||Alternate models of
computation (recursive functions, lambda calculus)
||Lecture 11: Notes on partial
recursive functions, counter machines, and
Lecture 12: Notes on lambda calculus
4, due October 31
LaTeX source for the assignment
Examples of Tiny Python functions
The cheat-checker for Tiny Python
Example counter machine programs:
remainder and division by 2
Example FRACTRAN programs
remainder and division by 2
Lambda calculus examples in Python
Instructions for using the various simulators.
The counter machine interpreter
The FRACTRAN interpreter
||The class P.
Nondeterministic Turing machines and the class NP.
|Lecture 13: P
Lecture 14: NP
|October 30-November 1
||First two chapters from the
text for Logic and Computation (reference for
Lecture 15: Boolean satisfiability
|November 6-November 8
the Cook-Levin Theorem. The P=NP problem
An assortment of NP-complete problems
|Lecture 16: Boolean
satisfiability is NP-complete.
Lecture 17: a gallery of NP-complete problems.
Lecture 18: What if P=NP?
5, due November 29
Circuit diagram in the assignment.
to NP-complete problems: Satisfiability solvers.
||Demonstration of the SAT
solver (Python interface to PicoSAT)--there
are only two functions!
Solving the N-queens puzzle with the SAT solver.
algorithms in number theory; primality testing and
||The second test from 2016
Probabilistic algorithms--a randomized algorithm
Lecture 20: Primality testing and cryptography