Computer Science 243

Discrete mathematics and Functional Programming
Fall 2012
Thomas VanDrunen



Meeting time: MWF 2:00-3:05 pm.
Meeting place: Science 131

Office hours: MWF 9:15-10:15; Tu 2:15-3:45; Th 9:00-11:00. Contact: 163 Science; 752-5692; Thomas.VanDrunen@wheaton.edu
http://csnew.wheaton.edu/~tvandrun/cs243
Follow @TVD_CSCI243


Syllabus

ML programming guide

Starting with the assignment due Sept 10, please turn in all ML code by email to csci243ta@gmail.com. Non-ML homework should still be turned in on paper.


Final exam: Tuesday, Dec 18, 10:30 am


Color code:
Green: Background material---read carefully before class. I will not cover this. You are responsible to know it ahead of time.
Magenta: Core material---read before class. I will briefly review and highlight the content, but not lecture on it. Most of our time in class will be spent working on problems from this material.
Cyan: Advanced material---skim before class, read after class. Usually this will be for hard material that I do not expect you to get on a first read. Familiarize yourself with it before class; I will lecture on it
Moon's dayWoden' s dayFrigga's day

Aug 27

NO CLASS

Aug 29

Set. Sets and elements. 1.(1-2)
Slides

Read 1.(3-5)

Aug 31

Set operations; visual verification. 1.(3-5)
Slides

Pg 12: 1.3.(11-16)
Pg 16: 1.4.(1-6, 19)
Pg 20: 1.5.(8-11)
Read 1.6-9

Sept 3

NO CLASS

Sept 5

Intro to ML; cardinality and Cartesian products. 1.(6-9)
Slides

Pg 26: 1.6.(1-5)
Pg 29: 1.7.2
Pg 32: 1.8.(1, 4, 5)
Pg 36: 1.9.(3, 4, 8, 9, 10)
Note that the ML problems should be submitted on paper with the rest of the assignment.
Skim 1.(10-12)

Sept 7

Making things in ML. 1.(10-11)
Code from class

Pg 40: 1.10.(1-4)

Sept 10

Functions in ML. 1.(12-13)
Code from class

Pg 48: 1.11.(4, 6, 8, 10)
Pg 50: 1.12.(3, 5, 8)
Read 2.1
Skim 2.2

Sept 12

List. Introduction to lists. 2.(1 & 2)
Code from class

Pg 70: 2.1.(2-4, 7)
Pg 74: 2.2.(2, 3, 8, 9)
Read 2.3
Skim 2.4

Sept 14

More about lists; powersets. 2.(3 & 4)
Code from class

Pg 74: 2.2.(11, 13, 15)
Pg 82: 2.4.(8-12, 14 & 15)
Read carefully 2.3
Skim 2.4

Sept 17

A language processor. 2.(5 & 6)
Code from class

Pg 91: 2.B
Read carefully 3.(1 & 2)
Read 3.(3 & 4)

Sept 19

Proposition. Propositional forms; boolean values; logical equivalence. 3.(1-4)
Slide
Code from class

Pg 102: 3.3.(5 & 6)
Pg 105: 3.4.(2, 4, 8-12)
Read 3.(5-7)

Sept 21

Conditionals. 3.(5-7)
Slides
Code from class

Pg 108: Ex 3.5.(1 & 2)
Pg 115: Ex 3.7.(1 & 2, 7-9, 12 & 13)
Read 3.(8 & 9)

Sept 24

Arguments. 3.(8 & 9)
Slides

Pg 119: 3.8.(3 & 5)
Pg 122: 3.9.(3-7)
Read 3.(10 & 11) carefully
Skim 3.(12 & 13)

Sept 26

Predicates; quantification. 3.(10-13)
Code from class

Pg 133: 3.12.(1 & 2)
Pg 135: 3.13.(4 & 5)
Read 3.14

Sept 28

Quantification and arguments. 3.14
Slides

Pg 139: 3.14.(6-9)

Oct 1

Review

Oct 3

TEST

Oct 5

Proof. Introduction to proofs; subset proofs. 4.(1 & 2)

Pg 158: 4.2.(2-7)
Read 4.(3 & 4)

Oct 8

Set equality proofs; set emptiness proofs. 4.(3 & 4)

Pg 160: 4.3.(3, 14, 15, 18)
Pg 161: 4.4.(5 & 6)
Read 4.(5-8)

Oct 10

Conditional proofs. 4.(5-8)

Pg 162: 4.5.(1, 4, 5)
Pg 164: 4.5.(2, 5)
Pg 165: 4.7.(1, 6)
Review 2.4, especially Ex 2.4.15
Skim 4.9

Oct 12

Powersets. 4.9
Slides

Pg 174: 4.9.(1, 3, 4, 6)
Skim 4.10 & 11

Oct 15

From theorems to algorithms. 4.(10 & 11)
Code from class

Pg 177: 4.10.(3, 4, 6)
Read carefully 5.1
Read 5.(2 & 3)

Oct 17

Relation. Introduction. 5.(1-3)
Slides
Code from class

Pg 205: 5.3.(5, 6, 8, 10-14) DUE OCT 24
Read 5.4

Oct 19

Properties of relations. 5.4

Pg 208: 5.4.(3-5, 22, 24, 26). DUE OCT 26
Read 5.5

Oct 22

NO CLASS

Oct 24

Equivalence relations. 5.5

Pg 212: 5.5.(5, 7, 9, 10). Due Oct 26, as normal
Read 5.(6 & 7)

Oct 26

Transitive closure. 5.(6 & 7)
Code from class

Pg 217: 5.6.(1, 3); pg 222: 5.7.(3,4,5)
Read 5.(8 & 9)

Oct 29

Partial orders. 5.(8 & 9)

Pg 222: 5.7.3; pg 226: 5.8.(1-5); pg 231: 5.9.(1 & 8)

Oct 31

Review

Nov 2

TEST

Nov 5

Self Reference. Recursive types. 6.(1-3)
Slides
Code from class
Code for the assignment

Pg 260: 6.2.(6-8, 14-17)
Read 6.4

Nov 7

Structural induction. 6.4

Pg 268: 6.4.(3, 4, 6, 7)
Skim 6.(5 & 6)

Nov 9

Mathematical induction. 6.(5 & 6)

Pg 273: 6.5.(2 & 4); pg 278: 6.6.(2 & 3)
Read 6.9 carefully
Skim 6.10

Nov 12

Loop invariants. 6.(9 & 10)
Code from class

Pg 306: 6.10.(2-5). Due 11/16

Nov 14

More on loop invariants. 6.(10-11)
Slides

Read 7 intro and 7.1 carefully
Read 7.2
Skim 7.3

Nov 16

Function. Introduction. 7.(1-3)
Code from class
Code for the assignment

Pg 331: 7.2.(2 & 3)
Read 7.4
Skim 7.5

Nov 19

Images and inverse images. 7.(4 & 5)

Pg 335: 7.3.(3, 4, 8)
Pg: 342: 7.4.(2, 5, 8, 9, 10)
Read 7.(6-8)

Nov 21

NO CLASS

Nov 23

NO CLASS

Nov 26

Function properties; inverse functions; composition. 7.(5-8)


Pg 346: 7.6.(2, 3, 6)
Pg 351: 7.8.(1, 5, 6)

Nov 28

Map and foldl; more practice on earlier function topics. 7.(5-8)
Code from class

Pg 344: 7.5.(4 & 5)
Pg 346: 7.6.7
Pg 351: 7.8.(3, 7)
Skim 7.9

Nov 30

Cardinality. 7.9
Slides

Pg 359: 7.9.(1 & 2)

Dec 3

No-credit quiz. Countability. 7.15
Slides

Dec 5

Review

Dec 7

TEST

Dec 10

Huffman encoding. 6.12
Slides
Code from class

Pg 315: 6.(A-D)
Read 7.12 carefully
Skim 7.13

Dec 12

Fixed-point iteration. 7.(12 & 13)
Code from class

Pg 375: 7.13.(1, 3, 4)

Dec 14

Review