91.502 Foundations of Computer Science

   Fall 2004

Homework Assignments | Discussion Board

Sample Midterm Exam (This was the midterm exam given in Spring 04)

Sample Final Exam (This was the final exam given in Spring 04)

Final Exam will take place on December 20 (Monday) in Olsen 415 from 5:30pm to 8:00pm

Table of Contents

Finding This Document
Course Goals
Time and Place
Course Personnel and Office Hours
Course Texts

Course Outline
Grading Policy

The Honor Code

Finding This Document On-Line

The class Web page is http://www.cs.uml.edu/~wang/cs502. Note that this page is a ``living document'' and extra information is expected to be added during the semester. For up-to-date contents please refer to this Web page.

Course Goals

This course has two goals. The first goal is to give students a solid understanding of various basic computation models and fundamental concepts of computation. The second goal is to give each student a deeper sense of how to reason formally about computing, how to prove theorems about computation, and how to solve problems using rigorous mathematical methods.  

Time and Place

The class meets Mondays 5:30pm- 8:15pm, Place: Olsen 415. Each class is divided into two sessions: 5:30-6:45 and 6:55-8:10, with a 10-min recess.

Course Personnel




Office Phone

Office Hours


Jie Wang


OS 201


WF: 10:00am-11:30am

or by appointment


Ning Zhong


OS 305


M: 10-11:30

or by appointment



Prerequisites: 1) 91.500 or 92.322, 2) 91.404 or 91.583, and 3) at least one computer programming course or significant programming experience. This course is highly mathematical. This course is not for you if you miss any one of these three prerequisites.

§  Math prerequisites rubrics

o     Set theory—notations, operations, DeMorgan laws, infinity, countable sets, uncountable sets, one-to-one correspondence

o     Algebrasymbol manipulations, linear equations, substitutions, number systems (binary, decimal, etc)

o     Mathematical induction—normal version and stronger version; induction on integers, on string length, on set sizes, etc

o     Number theory—congruence relations, prime numbers, Fundamental Theorem of Arithmetic, etc

o     Combinatorics—basic concepts and counting techniques

o     Recursion—recursive definition of mathematical concepts, solving simple recursive relations

o     Integer functions—function limits, asymptotic comparisons, logarithmic functions, polynomials, exponential functions

o     Series—summation of common series, approximations to n!

o     Graph theory—basic terminology and properties, trees, traverse algorithms

Required Text:

Du and Ko, Problem Solving in Automata, Languages, and Complexity, Wiley, 2001. ISBN 0-471-43960-6 Errata


Rice Theorem handout

NP-Completeness handout

Quantum computing handout (optional topic)

Course Outline (tentative)




Week 1

Administrative Matter. Mathematical Preliminaries; Strings and Languages; Regular Languages and Regular Expressions

Note: If you find Sections 1.1 and 6.1 difficult, then this course is not for you.

1.1-1.2, 6.1

Week 2

Deterministic Finite Automata (DFA), Checker method of constructing DFA, Product automata method and complement automata method of constructing DFA, NFA, Equivalence of NFA and DFA


Week 3

DFA and Regular Expressions, Closure Properties of Regular Languages, Myhill-Nerode Theorem, Minimum DFA, Pumping Lemma


Week 4

Quiz*, Pumping Lemmas


Week 5

Context-Free Grammas, Parsing and Ambiguity, Pushdown Automata and Context-Free Grammas


Week 6

Pumping Lemmas for CFL, One-Tape Turing Machines

3.6, 4.1

Week 7

Midterm exam


Week 8

Multi-tape Turing Machines, Church-Turing Thesis, Unrestricted Grammars


Week 9

Primitive and Partial Recursive Functions (brief introduction), Universal Turing Machines, R.E. Sets and Recursive Sets



Week 10

Diagonalization, Reducibility, Rice Theorem,

5.3-5.4, handout

Week 11

Recursion Theorem, Undecidable Problems


Week 12

Time and Space Complexity, Hierarchy Theorems, NTM’s


Week 13

Context-Sensitive Languages, NP, Polynomial-Time Reducibility


7.1-7.2 Handout

Week 14

Bounded halting, Bounded tiling, and Cook’s Theorem



Final Exam



*The quiz is designed to screen your mathematical preparation.

Homework Assignments

Homework assignments are due on Mondays at the beginning of class. Homework handed in after 8:15pm will be considered late, and no late homework assignments will be accepted. However, since occasional emergencies may occur, each student is allowed one extension of 48 hours to turn in his/her homework. This amount of time cannot be divided among assignments: It applies to one assignment only.


Midterm and final exams will be given. Both exams are closed book.  No early exams will be given. Exams may be taken after a scheduled date ONLY for documented emergencies. Students are responsible to obtain appropriate written documentation. A quiz with emphasis on prerequisite courses will be given in the 4th week to help you determine whether you should stay on the course. Again, if you miss any of the listed prerequisites or you find it difficult to understand Section 1.1 and Section 6.1 on your own, then this course is not for you.  

Grading Policy

The approximate weights of the three components are











Class attendance is important. You are responsible for all scheduling and announcements made in class if you miss class. The likelihood of failing the course is subsequently increased if you fail to attend class.

Honor-Code Policy

Students should be aware of, and adhere to, the University’s rules on academic dishonesty. These rules appear in the Graduate/Undergraduate Catalogs. The basic presumption is that the work you do is your own. Occasionally, especially when working on difficult homework problems (but never on quizzes or exams!), it may be necessary to ask someone for help. You are permitted to do so, provided you meet the following two conditions.

  1. You acknowledge the help on the work you hand in.

2.      You understand the work that you hand in, so that you could explain the reasoning behind the parts of the work done for you by another.

Please note that I will not deduct credit for small amounts of acknowledged assistance in your homework assignments. Even working as a team on one of several problems in a homework problem set may not hurt your grade, as long as all members of the group acknowledge their collaboration. Such shared interest can be beneficial to all concerned. I do reserve the right to give less than full credit in circumstances where it appears that there has been large-scale division of labor, and you are not getting as much learning out of the assignment as you should. However, as long as you acknowledge your sources, you will not get into Honor-Code trouble. Again, this policy only applies to homework assignments.

Any other assistance by another person constitutes a violation of the honor code and will be treated as such. You will automatically receive a zero grade for your work on the first Honor-Code violation and receive a zero for the entire course on the second violation.

If you have any questions about what this policy means, please discuss the matter with the instructor now.