Week 3 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.


Homework 1

    1de, 2bd (unknown), 3c

Homework 2:

Levin p 78: 1abc, 4abc, 11ab,

A [Not from Levin] Let S={1,2,3,4,5,6,7,8}.
(a). How many subsets of S have cardinality 5?
(b). How many subsets of S have cardinality 5 and contain the number 6?

  


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

Wed: start with the recurrence relation for bit strings. Then also for sets.

Pascal's triangle, using the recurrence rule

Binomial theorem: expansion of (x+y)n  

Counting lattice paths

Pascal's Triangle

                         1
                       1   1
                     1   2   1
                   1   3   3   1
                 1   4   6   4   1
               1   5  10  10   5   1
             1   6  15  20  15   6   1
           1   7  21  35  35  21   7   1
         1   8  28  56  70  56  28   8   1


Pascal's triangle modulo 2:

Pascal's Triangle mod 2

See also here.

Levin 1.3: Combinations and Permutations

Investigate! examples on page 81

What is a permutation? Counting them.

How many functions f:{1,...,8} -> {1,...,8} are bijections? Such functions are also known as permutations.