The primary goal of this course is to become familiar with some of the basic mathematical ideas used in programming.

Discuss homework 1

Proving ∀n∈**N **∃k∈**N**(n=2k or n=2k+1). Our
first *Proof by Mathematical Induction*.

Two-move games. The moves are a1, b1, a2, b2

game 1: B wins if a1<b1<a2<b2. Who has the winning strategy?

game2: B wins if a1/a2 = b1/b2, or a2==b2==0. Who has the winning strategy?

game 3: B wins if exactly *one* of a1,a2 is between b1 and b2.

game 4: B wins if the line from (a1,b1) to (a2,b2) has positive slope (or a1=a2)

game 5: B wins if the line from (a1,a2) to (b1,b2) has positive slope

Sets: Levin 0.3

- membership
- Listing elements versus giving a rule
- set equality; order does not matter
- subsets
- empty set, ∅
- union and intersection
- Venn diagrams

Functions: Levin 0.4

- defined by table or by rule
- domain
- recursive functions f:
**N**->**N** - bijections
- injections (1-to-1)
- surjections
- set-theoretic definition of f:A->B as a subset of AxB

Counting: Levin 1.1, on page 57

- Additive principle
- Multiplicative principle
- Set-theoretic approach
- Pies on page 64

Counting subsets of {1, 2, ..., N}

- Counting
**all**subsets (including ∅) - Counting all nonempty subsets
- Counting all subsets of size 1
- Counting all subsets of size 3
- Binomial coefficients