Department of
Computer Science

CS 311 Computational Structures

 

Course Description

Frequently Asked Questions

Blackboard (formerly WebCT)

Course Overview

Required Textbooks

Grading Policy

Detailed Course Outline

Getting a Computer Account

Academic Integrity Policy

Class Mailing List

List Archives

ML Resources

Web CT site

 

Blackboard access should now be fixed — please email me if you can't get in.

Spring Quarter 2008
Tuesday and Thursday 16:40–18:30
URBAN 204
CRN 65455

Read the FAQ

Instructors

Professor Andrew Black

black (at) cs.pdx.edu
503 725 2411

Office: FAB 115–10

Office hours: Monday 13:30–14:30 and Wednesday 16:30–17:30, or by appointment.

Teaching Assistant
Sudheer Mogilappagari

sudheerm (at) cs.pdx.edu

Office hours: Tuesday 10:30–11:45 and Thursday 15:00–16:15, probably in the "fishbowl" outside FAB 120.

Recitation sections: can be arranged if there is demand

Official Course Description

Course Overview

This course might be subtitled: how to think like a computer scientist. It gets to grips with the fundamental issues of what a computer is (in the abstract), what is computable and what is uncomputable. Yes, some things are uncomputable—and we will prove it. We also touch lightly on what is a computationally hard problem.

The approach of the course is mathematical: much of it is about proving properties of computing machines. However, there will also be some programming, using the programming language ML to model the various computing machines and to transform them into other kinds of machines. (We will not be using Prolog this year.)

Required Textbook

The required book is Discrete Structures, Logic and Computability (second edition) by James L. Hein. Published by Jones and Bartlett. 2002. ISBN 978-0-7637-1843-5.

The book is the same one that you have used for the pre-required courses in Discrete Structures, CS250 and CS251. Chapters 11–14 are relavant to this course. The price at Amazon.com is $64.26.

Errata for the book.

Recommended Textbook

This book, Introduction to the Theory of Computation, by Michael Sipser, was used at PSU in Spring 2007. List price is $129; the price at Amazon.com is $103.16. ISBN 978-0534950972.

The book is intended for a graduate course. It is a lot more succinct that Hein, and the notation is more standard. It also has fewer examples, and takes a more matehmatical approach. It is not required, but some students really liked it: I'm listing it here as resource that you may like to own.

Course Policies

Attendance

I recommend that you come to class, that you participate actively, and that you take notes. The act of taking notes (even if you never look at them again) is a powerful learning aid. I will generally make any visual aids, code samples, etc. that I used in class available on the web, but these are not a substitute for being in class and taking notes. If you do have to miss a class, say because of illness or work-related travel, you are responsible for getting notes and finding out what went on in class from another student.

Reading Assignments

Reading listed in the syllabus for each week should be completed before coming to class. I may check on the completion of reading assignments by various means: oral or written quizzes in class, written summaries, discussion (web-based or in class), etc. Anything in a reading assignment is fair game for an exam question.

Programming Assignments

Print-outs of assignments are due at the start of class. On-line submissions are due before the start of class.

Regrading

I do sometimes make mistakes. If you believe that I have not graded your assignment according to the published grading scheme, please let me know in writing or by email within 1 week of the assignment being returned to you. Be specific as to why you think that my grading is inconsistent. I will then re-grade the whole assignment; the second grading will stand, whether it is higher or lower than the original grading.

Disabilities

If you are a student with a disability in need of academic accommodations, you should first register with the Disability Resource Center, and then notify the instructor to arrange for support services.

Makeup Exams

If you have a medical or a family emergency and must miss an exam, let me know, if at all possible before the exam, and I will work with you to find an alternative. Other reasons for absence such as scheduled travel are not emergencies and are not cause for a make-up.

Passing the Course

Every assignment in the course is connected to a learning objective. It is therefore important that you make an honest attempt to complete them all. A score of less than 30% on any assignment indicates that you have not met this condition, and is sufficient cause for failing the course. That means an F, at the discretion of the instructor.

Academic Integrity

Students are at university for two reasons: to learn stuff, and to gain a credential. Because the credential is important to many of our students, part of my role as a professor is to make sure that it has value. This means ensuring that the degree is awarded only to those students who have mastered the material in my course.

I have every sympathy for those who have difficulty with the material and seek the assistance of the instructor, the TA or their fellow students. I have no sympathy at all for those who decide that the fastest way to a degree is to cheat. I have been responsible for having cheating students dismissed from the university in the past, and I will not hesitate to seek to have cheaters dismissed in the future.

The most common form of academic dishonesty is representing the work of others as your own. In all written material, you are expected to cite others' work, but to do so in a way that makes it clear what part of the work is your own, and what part is credited to others. If you reproduce someone else's work in a way that makes it appear to be yours, you are guilty of plagiarism, in other words, of cheating.

Cheating on an assignment or exam will result in an automatic zero grade for that piece of work, and the initiation of disciplinary action at the University level.

Cheating and collaboration

I encourage collaboration on certain assignments; I will not tolerate cheating. Where is the line between these activities?

First, if an assignment is explicitly set up as a team assignment, you are of course allowed — indeed, required — to collaborate with the members of your team. In this case I will generally require only one completed piece of work to be turned in from the team as a whole.

For individual assignments, I encourage you to talk about the problem with your fellow students. During such discussion, you may even write something, perhaps the code of a critical method, or a key step in a proof, as a group. If you do this, there is a danger that you might reproduce that group work as if it were your own. To guard against this danger, do the following: after the group session, destroy any notes or code that you may have brought away with you. Then go and do something else for an hour or two: go for a walk or a bike ride, play your favorite sport, go to the gym: do something to flush your short-term memory. Then sit down with a blank sheet of paper or a blank computer workspace and start work on your own solution. If you have a photographic memory or otherwise won't be able to forget what you have seen someone else write, then don't participate in collaborative problem-solving sessions.

If I see the same code or writing assignment from two or more students I will take this as evidence that these guidelines have been ignored, and will assign a grade of zero to all of the students involved.

Grading Policy

The following represents my present intention; I reserve the right to vary the grade distribution if it seems necessary or desirable.

Final Examination: 35%
Midterm 20%
Graded Homeworks: 40%
Class Participation: 5%

Detailed Outline of the course

This is provisional. The schedule will change as we see how much time we need for particular topics.

Date

Class #

Description

Reading
(before class)

Homework (see Blackboard site)

Section 1: Regular Languages and Finite Automata

w
e
e
k

1

Tuesday
1 April

Lecture Notes

1

Regular Languages

- course overview and organization
- entrance exam
- Regular Langages
- Regular expressions
- meaning of REs give by RLs
- quick intoduction to ML

Hein sections 10.1, 11.1

Assignment 0: Review/Entrance Exam

Thursday
3 April

Lecture Notes

2

Programming in ML

- Algebra of REs

- Simple ML for factorial and Fibonacci numbers
- ML programs for Regular expressions
- using the algebraic properties
- the functions match1 and nullable

Hein section 11.2

Assignment 1: complete match1 and nullable functions

w
e
e
k

2
Tuesday
8 April

Proof of RE property

Entrance Exam Notes

FSM Notes

3

Finite Automata

- Review of Entrance Exam
- DFA as 5-tuple
- Definition of non-deterministic finite state machines (NFA).
- Building NFA from Regular expressions
- Building REs from NFAs
- Representing and executing automata in ML

Hein section 11.3

Thursday
10 April

Lecture Notes

4

Formal Approach to FSA

- NFA as 5-tuple
- Transforming a NFA to a DFA
- Minimizing a DFA- Equivalence of NFAs and REs
- equivalence of NFAs and DFAs
- ML for FSA
- Constructing an NFA for an RE in ML
- Preview of the subset construction
- Λ-closure

Hein section 11.4

Assignment 3: FSAs

w
e
e
k

3

Tuesday
15 April

Lecture Notes

5

Properties of Regular Languages

- Building NFAs from grammars
- Building grammars from NFAs
- L-indistinguishability
- The Myhill-Nerode Theorem

Henzinger's notes on Myhill-Nerode Theorem Assignment 4: convert NFA to DFA

Thursday 17 April

Lecture Notes

6

Regular and non-regular languages

- Pumping Lemma for Regular Languages
- Working problems

Section 2: Context-free Languages and Finite Automata

w
e
e
k

4

Tuesday
22 April

Lecture Notes

Pumping Lemma proof

7

Review of the subset construction.

Review of the pumping lemma
- More examples of non-regular languages
- Mealy and Moore Machines

Thursday
24 April

Lecture Notes

8

Context Free Languages and Context-Feree Grammars

- Various definitions for Pushdown Automata
- Non-equivalence of deterministic and non-deterministioc PDAs

Hein Section 12.1, 12.2

Assignment: Regular languages

w
e
e
k

5

Tuesday
29 April

Lecture Notes

9

CF Grammars and Pushdown Automata

- Converting PDAs into CFGs
- Converting CFGs into PDAs

Hein Section 12.2

Thursday
1 May

10

Midterm Exam

 

w
e
e
k

6

Tuesday 6 May
Lecture Notes

11

Parsing Techniques

rdparser.ml

Hein Section 12.3 Assignment 6: Parsing

Thursday
8 May
Lecture Notes (table-driven parsers)

Lecture Notes (pumping Lemma)

12

Top-down parsing with a parsing table
Properties of CFLs

- Pumping Lemma for CFLs
- Proving that a language is not context-free

Hein Section 12.4

Assignment 7: Pumping lemma

Section 3: Turing machines and the Church-Turing Thesis

w
e
e
k

7

Tuesday 13 May

Lecture Notes

13

History and Philosophy of Turing Machines

- Basic Turing machines for simple examples
- Writing programs for the xTuringMachine simulator

(Prof Hook guest lecture)

Hein Section 13.1

Thursday
15 May

Lecture Notes

14

The Turing Thesis and Alternate Models

- Deterministic and Non-deterministic Turing Machines
- Multi-tape Turing Machines
- Universal Turing Machines
- The Church-Turing Thesis

(Prof Hook guest lecture)

Hein Section 13.1.3

w
e
e
k

8
Tuesday
20 May

Lecture Notes

15

The Lambda Calculus

- Recursive Functions
- Lambda calculus

Optional reading on Lambda calculus
Tim Sheard's Lambda Calculator (download and run Hugs, type ":load LambdaCalculator.hs", and then "main")

Assignment 8: lambda calculus

Thursday 22 May

Halting Problem slides

16

Continue with defining computable functions in the λ-calculus.

The Halting problem

- Unsolvability

Hein Section 13.2

Assignment 9: Computability

w
e
e
k

9

Tuesday
27 May

17

- Code and data and their inter-convertability

Recommended Reading: Gödel, Escher, Bach: An Eternal Golden Braid

Sipser Section 4.2

(See Course Content section on WebCT)

Thursday
29 May
Lecture Notes

18

Computational Complexity

Hein chapter 14

Section 4: Computability

w
e
e
k

10

Tuesday
3 June

Lecture Notes

19

Complexity — continued.

Thursday 5 June

Lecture Notes

20

Review class

Tuesday
10 June
17:30–19:20
20 Final Exam

The exam will cover the whole of the course. The use of books is not allowed, by you may use a single 8.5" x 11" "crib sheet", as a personal reference for definitions and formulae.

Most recently modified on Tuesday 3 June 2008 at 19.30


Andrew P. Black