Computer Science 60
Principles of Computer Science
Lecture notes and schedule, Fall 2000
On This Page
Lecture Slides
Tentative Lecture Schedule
Previous Terms' Lecture Slides
Zach Dodds's Lecture Slides (Microsoft PowerPoint)
The lecture slides from last term (Spring 00) will be replaced
by those for this term (Fall 00) as we progress.
Lecture 1 slides (Fall 00)
Lecture 2 slides (Fall 00)
Lecture 3 slides (Fall 00)
Recursive Image (Fall 00)
Lecture 4 slides (Fall 00)
Lecture 5 slides (Fall 00)
Lecture 6 slides (Fall 00)
Lecture 7 slides (Fall 00)
Lecture 8 slides (Fall 00)
Lecture 9/10 slides (Fall 00)
Lecture 11 slides (Fall 00)
Lecture 12 slides (Fall 00)
Lecture 13 slides (Fall 00)
Lecture 14 slides (Fall 00)
Lecture 15 slides (Fall 00)
Lecture 15.5 slides (Fall 00)
Lecture 16 slides (Fall 00)
Lecture 17 slides (Fall 00)
Lecture 18 slides (Fall 00)
Lecture 19 slides (Fall 00)
Lecture 20 slides (Fall 00)
Lecture 21 slides (Fall 00)
Lecture 22 slides (Fall 00)
Lecture 23 slides (Fall 00)
Lecture 24 slides (Fall 00)
Lecture 25 slides (Fall 00)
Lecture 26 slides (Fall 00)
Lecture 27 slides (Fall 00)
Lecture Schedule
This list constitutes the basic topics of CS60; they
will be the focus of the lectures, assignments, and exams
for the course. This is tentative... .
- Week 1 (8/29) - Is computer science more than programming?
Lecture 1 slides
- If the answer isn't yes, this will be a short course.
- If it is yes, what else is there?
- Imperative Programming (Java)
- Functional Programming (Rex)
- Logical Programming (Prolog)
- Hey, isn't this all programming?
- How programming languages work
- Categorizing problems' difficulty
- Representing Information: Lists
- Implementing computers with logic and circuits
- Factorial, logs, binary numbers
- Week 1 - Encoding and decoding information
Lecture 2 slides
- Recursive data structures
- Using recursion effectively to write functions
- Recursion, recursion, recursion!
- Open lists
- Trees and graphs as lists and their operations
- The no-side-effects paradigm
- Base Case (phew!)
- Week 2 (9/4) - Putting the function in functional programming
Lecture 3 slides
- First-class objects
- Function composition
- Higher-order functions: some common examples
- Anonymous functions
- Rewrite rules as function definition
- Rewrite rules as computation in general!
- Week 2 - Higher-order functions
Lecture 4 slides
- Predicates as special functions
- Functions as special predicates
- More general entities: relations
- Functional decomposition of problems
- Assignment 1
- Warming up with Unix and Rex, the king of programming languages
- Week 3 (9/11) - Techniques for implementing Rex functions
Lecture 5 slides
- Accumulators
- Recursion; tail recursion
- Tree search: BFS, DFS
- Week 3 - Advanced functional programming
Lecture 6 slides
- Guards: equational, conditional
- Laziness
- Infinite lists
- Currying
- Types
- Assignment 2
- Larger project using Rex: Unicalc
- -- aka --
- Seven days to spaceship-saving software
- Week 4 (11/18) - Object-oriented programming
Lecture 7 slides
- Java syntax review
- List implementation
- Open lists vs. closed lists: nature or nurture?
- References and pointers
- Week 4 - More Java Data Structures
Lecture 8 slides
- Stacks/Queues and variants
- Deep vs. shallow equality
- Virtual memory
- More references and pointers
- Assignment 3
- From rex to java: java's easier, right ?
- Using an open list class
- Week 5 (11/25) - The Object Oriented Paradigm: Inheritance
Lecture 9 slides
- Classes and objects
- Static vs. Nonstatic
- Interfaces
- Object state and methods for making transitions
- Mutability
- appropriate uses of class derivation: "is a" not "part of"
- Week 5 - Inheritance and overriding functions
Lecture 10 slides
- Dynamic dispatch
- Message metaphor; upcasting vs downcasting
- Polymorphism and container classes
- The java built-in hierarchy
- Virtual functions
- Applets
- The java GUI hierarchy
- Assignment 4
- Extend assignment 3 to take advantage of the properties
of inheritance hierarchies.
- Trying some graphics programming: an applet
- Week 6 (10/2) - Event-driven programming
Lecture 11 slides
- Graphics syntax and AWT
- Event handling
- Double buffering
- Interfaces revisited
- Week 6 - Additional Java programming
Lecture 12 slides
- 2d arrays; matrices
- Breadth-first search, depth-first search
- Game states and transitions: chess vs. go
- Assignment 5
- Writing a full-fledged applet
- Week 7 (10/9)- Implementation of programming languages
Lecture 13 slides
- Grammars aas a specification tool for languages
- Inductive definitions
- More general notion of "language"
- General proof by induction
- Expression trees
- Precedence and associativity: tighter-binding functions
are closer further from the root
- Week 7 - Parsing of expressions
Lecture 14 slides
- Grammar generates; parser tests for membership
- Compilation steps: tokenize, parse, translate
- Parsing and recursive descent
- Assignment 6
- A Parsing program in Java
- Using an inheritance hierarchy to distribute
an application's work.
- Week 8 (10/16) - Do computers think logically?
Lecture 15 slides
- Propositional Logic
- Boolean algebra
- Combinational functions
- Encoding sets in binary
- Two-term operators
- Completeness of nor
- Tautologies, satisfiability
- Week 8 - Manipulating and analyzing logical functions
Lecture 16 slides
- Minterm reduction
- Shannon expansions
- SOP == DNF representation
- Karnaugh maps
- Computing circuits
- "Don't cares" bits; LED example
- Assignment 7
- Solving SAT
- Extra credit for polynomial-time algorithms
- Week 9 (10/30) - predicate logic
Lecture 17 slides
- Variables representing individuals
- Quantifiers
- Graphs as binary relations -- equivalent to predicates
- DeMorgan's laws for quantifiers and simplifying expressions
- Representing problems as contraints: Prolog
- Week 9 - Programming in Logic
Lecture 18 slides
- Prolog and its syntax
- Computes variables within predicates
- Answering database queries
- Closed-world assumption and assumed quantifiers
- Examples: geneology, puzzle-like problems
- Solving problems without work!
- Assignment 8
- Programs in prolog, e.g., restaurant-query example and
puzzle-solving examples.
- Week 10 (11/6) - Midterm
- Week 10 - Is this program correct?
Lecture 19 slides
- Program correctness: proving vs. debugging
- Program specification: states and transitions
- Assertions
- Loop invariants
- Proofs of correctness; assertion proofs
- examples
- Assignment 9
- Prolog, java, and rex review
- Week 11 (11/13) - Analyzing algorithms
Lecture 20 slides
- Sorting
- Program (profiler) vs. computational complexity
- Other possibilities: memory complexity
- Dependence on input size
- Counting steps: loops and recursion
- Writing and unrolling recurrences
- Growth rate and big-O definition
- Week 11 - More algorithms
Lecture 21 slides
- Comparison sorting is N*logN
- Empirical and code-analysis techniques
- Asymptotic growth rates
- Proving one function is O(another)
- Heaps
- Min-extraction
- Dynamic programming vs. divide and conquer vs. greedy strategies
- Assignment 10
- 1/3 written: Proof of correctness
- 1/3 written: Running time analyses
- 1/3 coding: Empirical running time experiments
- Week 12 (11/20 & 11/27) - Models for computers
Lecture 22 slides
- Finite-state machines
- DFA NFA and regular expressions
- More generally, what languages are accepted by what machines
- Week 12 - More models for computers
Lecture 23 slides
- Nondeterminism
- P vs. NP
- Turing machines
- Implementing finite state machines in logic
- Latches
- Assignment 11
- 1/2 jflap: create machines!
- 1/2 written: algorithm analysis
- Week 13 (11/27) - More models for computers
Lecture 24 slides
- Clocks, flip-flops
- Buses
- Multiplexors, etc.
- Latches
- Adders, registers
- RAM, one-hot selection
- Week 13 - Stored-program computers
Lecture 25 slides
- Conceptual model
- ISC assembly language
- Implementing recursion in ISC and C
- Factorial in ISC
- Memory-mapped I/O : other services of the OS
- Other hardware-related issues
- Interrupts, traps, signals
- Pipelining
- Strobes
- Types of addressing
- Assignment 12
- Write ISC programs, including implementing recursion.
- Week 14 (12/4) - Limitations of practical computing
Lecture 26 slides
- Practical limitations: exponential running time
- Examples of difficult important problems
- P ?= NP
- Real problems: undecidability
- Week 14 - Limitations of Turing computing
Lecture 27 slides
- TM limitations: undecidability
- Turing's thesis
- Other computational models: do they change things?
- Molecular computation, quantum, reversible, nerual nets,
genetic programming (not really a model of computation, but...)
- Assignment 13
- JFLAP II: turing machines
- Final Exam
Fall 1999 Lecture Slides
Professor
Keller's lecture slides
Professor
Dodds's lecture slides