CS154: Introduction to Complexity and Automata Theory

taught by   Serafim Batzoglou     TA:   Gurmeet Singh Manku
Announcements

24_Mar_2003 All homework problems have been graded. Please check your grades online and inform us of any discrepancies.
19_Feb_2003 Finals have been graded. You can check your grade online. Corrected finals will be available for pickup on Thu (20 Mar) after 12pm.
Please see the Grading scheme, Solutions & Common Errors .
         Max: 91%    Mean: 52%    Median: 54%
      -------------------------------------------
        85% -- 95%   3            35% -- 44%  11
        75% -- 84%   6            25% -- 34%   8
        65% -- 74%   9            15% -- 24%   4
        55% -- 64%  14             5% -- 14%   1
        45% -- 54%  17             0% --  4%   0
Previous Announcements


Tentative Lecture Schedule

Wed, 8 Jan Lecture #1: Finite Automata Sipser 1.1, 1.2 notes1.doc
Fri, 10 Jan Problem Session #1 HW 1
Mon, 13 Jan Lecture #2: Nondeterminism, Regular Expressions Sipser 1.2, 1.3
Wed, 15 Jan Lecture #3: Nonregular Languages, Pumping Lemma Sipser 1.4
Fri, 17 Jan Problem Session #2 HW 1 & 2
Mon, 20 Jan Holiday -- Martin Luther King Day
Wed, 22 Jan Lecture #4: Context-free Grammars, PushDown Automata Sipser 2.1, 2.2 notes2.doc
Fri, 24 Jan Problem Session #3 HW 2 & 3
Mon, 27 Jan Lecture #5: Equivalence of CFG and PDA, Non-CFGs Sipser 2.2, 2.3
Wed, 29 Jan Lecture #6: Turing Machines, Variants of TMs Sipser 3.1, 3.2 notes3.doc
Fri, 31 Jan Problem Session #4 (Serafim) HW 3 & Midterm
Mon, 3 Feb Lecture #7: Equivalence of TMs, Definition of Algorithm Sipser 3.2, 3.3
Wed, 5 Feb Lecture #8: Decidable Languages Sipser 4.1 notes4.doc
Fri, 7 Feb Midterm 3:15pm -- 4:30pm (Same room as Problem Sessions)
Mon, 10 Feb Lecture #9: The Halting Problem, Diagonalization Sipser 4.2
Wed, 12 Feb Lecture #10: Undecidable Problems Sipser 5.1
Fri, 14 Feb Problem Session #5 HW 4
Mon, 17 Feb Holiday -- Presidents' Day
Wed, 19 Feb Lecture #11: A Simple Undecidable Problem,
Mapping Reducibility
Sipser 5.2, 5.3
Fri, 21 Feb Problem Session #6 HW 5 & 6
Mon, 24 Feb Lecture #12: Measuring Complexity Sipser 7.1 notes5.doc
Wed, 26 Feb Lecture #13: The Class P (Polynomial-Time) Sipser 7.2
Fri, 28 Feb Problem Session #7 HW 5 & 6
Mon, 3 Mar Lecture #14: The Class NP Sipser 7.3
Wed, 5 Mar Lecture #15: NP Completeness, P ?= NP Sipser 7.4
Fri, 7 Mar Problem Session #8 HW 6
Mon, 10 Mar Lecture #16: NP-complete Problems Sipser 7.5
Wed, 12 Mar Lecture #17: Logarithmic Space Sipser 8.4
Fri, 14 Mar Problem Session #9 (Serafim) Final Review
Mon, 17 Mar Final Exam 12:15pm -- 3:15pm (Same room as Lectures)


Homeworks

Homework 1 Out: Wed, 8 Jan Due: Wed, 22 Jan in class FAQ Solutions
Homework 2 Out: Wed, 15 Jan Due: Wed, 29 Jan in class FAQ Solutions
Homework 3 Out: Tue, 28 Jan Due: Wed, 5 Feb in class FAQ Solutions
Homework 4 Out: Wed, 10 Feb Due: Wed, 19 Feb in class FAQ Solutions
Homework 5 Out: Wed, 19 Feb Due: Mon, 3 Mar in class FAQ Solutions
Homework 6 Out: Mon, 3 Mar Due: Wed, 12 Mar in class FAQ Solutions
Midterm Solutions
Extra Credit Solutions
Final Solutions

Some of the solutions have hand-drawn diagrams that are not part of the PDF file. We distributed copies of complete solutions (text + diagrams) during lectures. Copies are also available in the cs154 file cabinet on the 4th floor in Gates.

If any of you has time to scan the images, please send me the gif/jpg files. Better still, incorporate them into the pdf file above to get one large combined pdf file. Thanks!


Time Schedule
Lectures: MW 3:15pm -- 4:30pm, Bldg 420, Room 040
Problem Sessions: Fri 3:15pm -- 4:30pm, Bldg 420, Room 040
Office Hours:
InstructorSerafim BatzoglouGates 138Mon 4:30pm -- 7:30pmserafim@cs.stanford.edu
TAYoo Chul ChungGates 24AThu 3:00pm -- 6:00pm
Cancelled
chungyc@cs.stanford.edu
TAGurmeet Singh MankuGates 26ATue 2:10pm -- 3:10pm
Tue 5:00pm -- 7:00pm
manku@cs.stanford.edu
Midterm: Fri, 7 Feb 2003, 3:15pm -- 4:30pm (Same room as Problem Sessions). Open book & notes.
Final: Mon, 17 Mar 2003, 12:15pm -- 3:15pm (Same room as Problem Sessions). Open book & notes.

Students are strongly encouraged to attend the Problem-solving Sessions. These sessions will offer (a) short review of course material, (b) step-by-step solutions of the "easy" problems in the current homework, and (c) other problems that illustrate useful proof techniques.


Textbooks

Required: Mike Sipser's "Introduction to the Theory of Computation", First Edition, 1996

Optional: Hopcroft/Motwani/Ullman's "Introduction to Automata Theory, Languages, and Computation", 2nd Edition, 2001

Both books will be on reserve in the Math/CS Library.


Course Grade

Homeworks40%
Midterm25%
Final35%
Extra credit: There will be plenty of extra credit available for solving difficult extra problems in homeworks and exams. Extra credit is extra: the course will be graded as if there is no extra credit, and then extra credit will be added to push your grades higher. (If you receive a total >= 100%, you will be commended for your performance!)


Homework Policies

1. General Info: There will be 6 homeworks. Each homework will have a set of 5 "easy" problems, 5 "moderate" problems and 1 "extra credit" problem. The "easy" problems will be worked out in the Problem Sessions. You will be graded on the "moderate" problems. However, you have the option of substituting any ONE of the moderate problems with ALL the easy problems (this means that you would be graded on 5 "easy" and 4 "moderate" problems). Even if you wish to get only moderate problems graded, you are encouraged to write solutions to the easy problems for practice and to obtain feedback.

2. Collaboration is allowed as long as (1) you acknowledge all the people you discussed the problem with, and (2) each student writes up his/her own solution without looking at any writeup/notes from another student.

3. Submission: Homeworks will be due in class on the due date. If you plan to be away at a day when one of the homeworks is due, please give it to a friend to turn in, or arrange to send it by postal mail or fax. We will NOT accept homework submissions by email. In case you plan to skip a homework because you can't turn it in on time, you are still encouraged to turn it in late and have it corrected. Please write your name and Leland login id on each homework. We will use your login id to communicate grades back to you. Each problem must be submitted on a separate sheet. Please write your own name (and your login_id) and the names of folks you collaborated with, at the beginning of each problem. We ask for separate sheets because your submission will be split among several graders, each of whom would usually grade one particular problem.

4. Late Policy: You will be allowed to turn in up to two homeworks late. A late homework will be accepted until forty-eight hours after the due date+time. We will NOT accept any homework that is more than forty-eight hours late. For late homeworks, a box outside Serafim's office (Room 138, Gates Bldg) will be placed. If you dont find a box, please slip it under the office door.

5. Grade: All homeworks will have equal weightage. At the end of the quarter, we will sum the grades for all your homeworks and scale them down to 40 points.

6. Extra credit: There will be extra credit available for solving difficult problems in both homeworks and exams. Extra credit is extra: the course will be graded as if there is no extra credit, and then extra credit will be added to push your grades higher. (If you receive a total >= 100%, you will be commended for your performance!)

7. Corrected Homeworks can be picked up from a file cabinet in the 4B Wing in Gates.

8. Regrade Policy: If you would like your homework to be regraded, please submit a written explanation of your grievance alongwith the corrected homework. A regrade request will not be entertained if it is submitted later than one week after the corrected homeworks have been returned.


Course Goals

This course aims to answer two very basic questions in Computer Science.

1. What is computable? In other words, what can a computer do, if memory and time are not an issue? Not every question in the universe can be solved by a computer. For instance as we will see, a computer cannot decide some very basic questions such as: (i) whether a given mathematical statement is true; (2) whether a program written in C (for instance) will terminate or loop forever. This is the topic of the first part of this course (including some of CS154N).

2. What is computable efficiently? In other words, what can a computer do within a reasonable amount of time and memory? As an example of a simple problem that currently computers can't do fast enough, take factorization. There is no known algorithm that can factor 1,000-digit numbers on today's computers, if we limit the time allowed to less than say 1,000,000 years. On the other hand, computers can multiply two such numbers in a split of a second. Why? This is the topic of the last part of this course.

So this course covers basic theoretical concepts in Computer Science, such as finite automata, Turing machines, and complexity classes. It also aims to provide students with basic formal proof skills. At the end of the course you should know what kinds of problems are computable, which problems are "easy" and which are "hard", and how to prove all that.

Prerequisites

CS103 (A & B, or X)


Homepage

The URL for this page is http://www.stanford.edu/class/cs154

Maintained by Gurmeet Singh Manku Send mail to manku@cs.stanford.edu if you find something amiss on this webpage.