Fall 2018

CS 42: Principles and Practice of Computer Science

TTh 9:35am–10:50am in SHAN 2460

Week Tuesday Thursday Assignment
0 09 / 04

What is Computer Science?

and what's this course all about?

09 / 06

What is a computer?

Encodings, DFAs

HW 0: DFAs
Due:

Tuesday, 9/11 at 11:59pm

1 09 / 11

Regularity

NFAs, proofs

09 / 13

Computability

Turning Machines, (un)decidability

HW 1: (Ir)regularity
Due:

Tuesday, 9/18 at 11:59pm

2 09 / 18

Combinational logic

Transistors, gates, circuits

09 / 20

Sequential logic

Latches, memory

HW 2: Circuits—Arithmetic & Memory
Due:

Tuesday, 9/25 at 11:59pm

3 09 / 25

Stored-program computer I

Registers, RAM, assembly

09 / 27

Stored-program computer II

Function calls, the Stack

HW 3: Hmmm-work
Due:

Tuesday, 10/2 at 11:59pm

4 10 / 02

Functional programming

Racket, referential transparency

10 / 04

Recursion and induction

Linked lists

Take-home midterm 1
Due:

Sunday, 10/7 at 5:00pm

HW 4: Making a Racket
Due:

Tuesday, 10/9 at 11:59pm

5 10 / 09

Higher-order functions

map, filter, reduce

10 / 11

Recursive strategies, analysis

"Use it or lose it", Big O

HW 5: Ciphers
Due:

Tuesday, 10/16 at 11:59pm

6 10 / 16

Analyzing recursion

Big O, recurrence relations

10 / 18

Trees

Binary trees, binary search trees

HW 6: Recurrence
Due:

Tuesday, 10/30 at 11:59pm

7 10 / 23

Fall Break

(no class)

10 / 25

Imperative programming

Python, references, namespaces

8 10 / 30

Sequence processing

Slicing, list comprehensions

11 / 01

Optimization I

Dynamic programming with memoization

Take-home midterm 2
Due:

Sunday, 11/4 at 5:00pm

9 11 / 06

Optimization II

Dynamic programming with tabulation

11 / 08

Analyzing loops

Summations, optimization wrapup

HW 7: String theory & practice
Due:

Tuesday, 11/13 at 11:59pm

10 11 / 13

Object-oriented Programming I

Objects, classes, members, constructors

11 / 15

Object-oriented Programming II

Special methods, subclassing

HW 8: OOP in Python
Due:

Tuesday, 11/27 at 11:59pm

11 11 / 20

Sorting

Sorting algorithms, theoretical & empirical analysis

11 / 22

Thanksgiving

(no class)

12 11 / 27

Intro to Java (no class)

Static types, objects & references

11 / 29

Object-oriented design

Interfaces, subtyping

HW 9: Photo Editor
Due:

Tuesday, 12/4 at 11:59pm

13 12 / 04

Subtyping, Graphs

Subtyping, substitutability, graph definitions

12 / 06

Graphs: Implementation

Graph encodings, maps

HW 10: Graphs
Due:

Friday, 12/14 at 11:59pm

14 12 / 11

Review

12 / 13

Wrap-up

What is computation?

In-person final exam

Tuesday, 12/18 9am-noon