Week 2 notes

Comp 163-002, Spring 2020, MWF, 12:35-1:25, in Mundelein 620

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

A has a winning strategy if ∃a1 ∀b1 ∃a2 ∀b2 (A wins).

A does not have a winning strategy if ~ ∃a1 ∀b1 ∃a2 ∀b2 (A wins)

which is    ∀a1 ∃b1 ∀a2 ∃b2 (~ A wins), which is ∀a1 ∃b1 ∀a2 ∃b2 (B wins), which means there is a winning strategy for B.

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

game 6: A and B pick points on the plane. B wins if b2 is equidistant from a1, b1, a2.

Sets: Levin 0.3

Functions: Levin 0.4

Counting: Levin 1.1, on page 57

Counting subsets of {1, 2, ..., N}, Levin 1.2 on page 70