macm 201 fact sheets cedric chauve and marni...

63
MACM 201 Fact Sheets Cedric Chauve and Marni Mishna

Upload: doankhue

Post on 01-Nov-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

MACM 201 Fact Sheets

Cedric Chauve and Marni Mishna

Page 2: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Contents

Basic CountingThe Binomial TheoremInclusion-Exclusion ProblemsBasic and Conditional ProbabilityFormal Power SeriesCombinatorial Generating FunctionsInteger Composition Enumeration example in MAPLECoefficient extraction in generating functionsBinary Tree Enumeration example in MAPLESolving Recurrences ISolving Recurrences IIGenerating function approaches to recurrencesInteger partitionsInteger partitions with odd or distinct partsProof Techniques for Graph TheoryGraphs and parallel computer architecturesEulerian Trails and CircuitsPlanar GraphsDepth-First Search and Bredth-First Search Spanning TreesHuffman CodingDijsktra’s shortest path algorithmKruskal and Prim’s algorithms

Page 3: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Basic Counting

Description Basic counting formulas for sets and permutations.

Note. Modified on Monday Jan 9 by KY.

Notation

n! = n · (n− 1) · (n− 2) . . . 2 · 1[n] = {1, 2, . . . , n− 1, n}(nk

)= n!

k!(n−k)!

Formulas

Parameters Formula1. Permutations n distinct objects n!

ai objects of type i, such that∑k

i=1 ai = n. n!a1!a2!...ak!

2. Lists n distinct objects; list of length k n!(n−k)!

n distinct letters; words of length k with no re-peated letter

nk

3. Subsets k element subset of [n](nk

)k-element multi-sets with elements from [n]

(n+k−1

k

)4. Words length n with letters from an alphabet of size k kn

and possibly repeated letters in the words

Note that the concept of list implies a total order on the elements in the list: as lists, abc 6= acb, butas sets {a, b, c} = {a, c, b}. The notation used is important: lists are written as consecutive elements,while sets are written using the notation {, }.

Examples

1. All permutations of abcde: abcde, abced, abdce, . . . , edcbaTotal: 5! = 120

2. All permutations of aabbcc: aabbcc, aabcbc, aabccb, aacbbc, . . . , ccbbaaTotal: 6!/2!/2!/2! = 90

3. Lists from {a, b, c, d, e} of length 3: abc, abd, abe, bac, bad, bae, . . . , edcTotal: 5!/2! = 60

4. 3-subsets of {a, b, c, d, e}: {a, b, c} = {b, a, c}, {a, b, d}, {a, c, d}, . . . {c, d, e}Total:

(53

)= 10

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 4: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

5. 3-multi-sets of {a, b, c, d, e}: {a, a, a}, {a, a, b} = {a, b, a} = {b, a, a}, . . . , {e, e, e}Total:

(73

)= 35

6. Words using {a, b, c, d, e} of length 3: aaa, aab, aac, aad, aae, aba, . . . , eeeTotal: 53 = 125

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 5: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

The Binomial Theorem

Description Statement and consequences of the binomial theorem

Theorem (The Binomial Theorem)

For all positive integers n,

(x + y)n =n∑

k=0

(n

k

)xkyn−k.

How to prove it

To compute the left hand side, we expand the monomial product into an ordered sequence of n copiesof (x + y). When we multiply this out (a la the FOIL rule): for each (x + y) we choose either x or y. Ifwe select k x’s and (n − k) y’s in this process, we contribute to the term xkyn−k. There are

(nk

)ways

to choose precisely k x’s and n− k y’s, since it is equivalent to choosing some k element subset of [n]:the positions of (x + y) contributing x’s in the original ordered sequence of n copies of (x + y).

Consequences

•∑n

k=0(−1)k(nk

)= 0 Proof: x = −1, y = 1

•∑n

k=0

(nk

)= 2n Proof: x = 1, y = 1

•∑n

k=0 k(nk

)= n2n−1 Proof: y = 1; apply d

dx ; set x = 1

Advanced

• Which formulas arise from the expansion of (x + y + z)n? (x1 + x2 + · · ·+ xm)n?

• What happens when n is negative? or a fraction?

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 6: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Inclusion-Exclusion ProblemsNote. A mistake was corrected on wednesday may 19 in the first example.

Description An outline of how to solve problems using inclusion exclusion

What to look for when deciding to apply inclusion-exclusion

Look for a problem of the form “All somethings except those of type X, type Y, and type Z” where thereis overlap between things of type X and things of type Y and things of type Z. Typically, computingthe number of things of a given type (e.g. the number of things of type X) will be straightforward andcan be achieved using the basic counting techniques learned in MACM101.

Notation

Let S be the underlying set, and let X be a property that is either true or false about every elementin the set. Then CX is the boolean function

CX(s) ={

True if s has property XFalse otherwise .

We compose them as follows:

CXCY (s) ={

True if s has property X AND property YFalse otherwise .

• N(CX) is the number of elements in S for which X is true and N(CX) is the number of elementsfor which it is false.

• N(CXCY ) is the number of elements with property X and Y ;

• N(CX CY ) is the number of elements with NEITHER X NOR Y . (i.e. the number of elementss ∈ S such that CX(s) = False and CY (s) = False)

• N(CXCY ) is the number of elements that doesn’t have BOTH X nor Y . (i.e. the number ofelements s ∈ S such that EITHER CX(s) = False OR CY (s) = False OR BOTH (CX(s) = FalseAND CY (s) = False). In this case, one of X or Y may be true, but not both).

Steps

1. Decide what your underlying set S is. Let N denote its size or cardinality (the number ofelements in S). Note that N can be given, or needs to be computed, depending on the question;

2. Define desired properties (e.g. X, Y , Z if we consider only three prperties on the set S) suchthat what you are looking for is the number of elements of S that have none of these properties;

3. Compute N(CX), N(CY ), N(CZ), N(CXCY ) . . . N(CXCY CZ) usic basing counting techniques(most of the time the techniques learned in MACM101 are sufficient for that step);

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 7: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

4. Apply the formula for inclusion exclusion:

N(CX CY CZ) = N −N(CX)−N(CY )−N(CZ)+N(CXCY ) + N(CY CZ)−N(CXCZ)−N(CXCY CZ).

Example

Determine the number of integers between 1 and 100 not divisible by any of 2, 5, and 7.

1. S = {1, 2, 3 . . . , 100}. The size is N = |S| = 100.

2. We define: C2(k) = true iff1 2 divides k; C3(k) = true iff 3 divides k; and C7 = true iff 7 dividesk;

3. We note that N(C2) = |{2, 4, 6, . . . , 98, 100}|=100/2. We can compute the other values similarly.Here they are expressed for general k, which we will set to values of 2, 5 and 7: N(Ck) = b100/kc,N(CkCl) = b100/k/lc, N(C2C5C7) = b100/70c.

4. We want N(C2 C5 C7). The formula is

N(C2 C5 C7) = N −N(C2)−N(C5)−N(C7) + N(C2C5) + N(C5C7) + N(C2C7)−N(C2C5C7)= 100− (b100/2c+ b100/5c+ b100/7c) + (b100/10c+ b100/35c+ b100/14c)− b100/70c= 100− (50 + 20 + 14) + (10 + 2 + 7)− 1= 34

Example

Find the number of non-integer solutions to X1 + X2 + X3 + X4 = 21 such that Xi ≥ 0 AND Xi ≤ 7.

First we remark that the number of solutions to X1 + X2 + X3 + X4 = n such that Xi > 0 is equalto(n−13−1

). This is the same as n balls in 4 bins. To change the condition on Xi to Xi ≥ 0, we create

an instance of the no empty bin problem: Imagine first dropping a ball into each bin, and thenconsidering all possibilities. This is the same as computing the number of configurations with n + 4balls into 4 bins. (In general, n + k balls into k bins), and the formula is given by

(n+k−1

k−1

), since now

no bin will be empty.

For this question, it is easier to compute the opposite kind of restriction, i.e. Number of solutionswhere Xi > 7, since we can quickly imagine this combinatorially. Imagine we want to place n balls ink bins, and we know the first bin has at least 8 balls. This configuration is in direct correspondencewith a configuration with n − 8 balls, and no restriction on the first bin. i.e. there are

(n−8+k−1

k

)configurations with more than 7 balls in the first bin. This suggests we set our conditions to theCONVERSE condition in inclusion exclusion.

1. S = {(X1, X2, X3, X4) : X1 + X2 + X3 + X4 = 21, Xi ≥ 0}. The size is given by the formula|S| =

(n+k−1

k−1

)=(21+4−1

4−1

)=(243

). For example (10, 3, 8, 0) ∈ S.

1if and only if

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 8: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

2. We define: C1(s) = true iff X1 > 7; C2(s) = true iff X2 > 7; C3(s) = true iff X3 > 7; C4(s) = trueiff X4 > 7; For example, C1(10, 3, 8, 0) = TRUE, C2(10, 3, 8, 0) = FALSE.

3. We note that N(C1) = N(C2) = N(C3) = N(C4) =(21−8+3−1

3

)=(153

). If two variables are greater

than seven, we can similarly reduce the system: N(CiCj) =(21−16+3−1

3

)=(73

). If three variables

are greater than seven, well, there are no solutions! N(CiCjCk) =(21−24+3−1

3

)= 0. Likewise

with 4 conditions: N(C1C2C3C4) = 0.

4. We want N(C1 C2 C3 C4). The formula is

N(C1 C2 C3 C4) = N −∑

i=1..4

N(Ci) +∑

1≤i<j≤4

N(CiCj)−∑

1≤i<j<k≤4

N(CiCjCk) + N(C1C2C3C4)

=(

243

)−∑

i=1..4

(153

)+

∑1≤i<j≤4

(73

)−

∑1≤i<j<k≤4

0 + 0

=(

243

)− 4 ·

(153

)+(

42

)(73

).

Advanced Ideas

• Write out a formula for a general number of conditions.

• How many terms are there in the general formula with n total conditions which require exactlyk conditions? That is, terms of the form N(CiCj . . . Ck) in the general formula for n conditions.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 9: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Basic & Conditional Probability

Description Basic definitions and results around probability

Note. Modified on Monday Jan 9 by KY.

Basics

• An outcome θ is a possibility.

• A sample space S is the set of all possible outcomes.

• An event E is a set of outcomes.

• The complement of an event E is the set of all outcomes not in E. It is denoted E.

• Two events are mutually exclusive if their intersection is empty.

• A probability is a number between 0 and 1. 0 =⇒ impossible, 1 =⇒ certainty.

• A Discrete Probability Model (S, P ) satisfies:

1. S is a sample space;

2. A probability assigned to each outcome θ ∈ S: P (θ);

3. 0 ≤ P (θ) ≤ 1;

4.∑

θ∈S P (θ) = 1.

• The probability that an event A has occurred given the knowledge that event B has occurred iscalled the conditional probability of A, and is denoted by P (A|B).

• Events A and B are said to be independent events if P (A|B) = P (A).

Computing Probabilities

• The probability of an event A, denoted P (A) is: P (A) :=∑

θ∈A P (θ).

• If each outcome in a probability model is equally likely, then we say that the model has equallylikely outcomes. In this case, the probability of an event A is P (A) = |A|/|S|.

• Let A and B be events. The following formulas are true:

– P (A ∪B) = P (A) + P (B)− P (A ∩B);

– P (A ∩B) = 0 if A an B are mutually exclusive;

– P (A ∩B) = P (A) · P (B|A) = P (B) · P (A|B);

– P (A ∩B) = P (A)P (B) if A and B are independent;

– P (A) = 1− P (A);

– P (B|A) = P (B)/P (A) if B ⊆ A.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 10: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Formal Power Series

Description Here are some basic facts about formal power series. Some have been seen in class,some others are more advanced but should be understandable from the material seen in class, some ofthem are optional.

Properties seen in class

Definitions

Let a0, a1, a2, . . . be a sequence of rational numbers. We call the (possibly infinite) sum a0 + a1x +a2x

2 + · · ·+ akxk + . . . a formal power series. Here x is a variable, but we do not apriori care if the

sum makes sense for any value of x aside from 0. Despite this, we can consider it a function of x andwrite it as A(x). We say that ak is the coefficient of xn in A(x), and we make use of the shorthand

[xk]A(x) = ak.

The sum is said to be formal because we cannot collapse any of the terms. So, if a0 + a1x + a2x2 =

b0 + b1x+ b2x2, then it must be that a0 = b0, a1 = b1 and a2 = b2. There is a single power series equal

to 1: 1 = 1 + 0x+ 0x2 + . . . , and a single one equal to 0: 0 + 0x+ 0x2 + . . . .

The formal power series turns out to be a very convenient way to store a sequence. We will see thatwe can store infinite sequences with a very small amount of memory using what we know aboutfunctions formal power series which arise as Taylor series expansions around 0.

Sum and Product

A formal power series is a mathematical object which behaves essentially like an infinite poly-nomial. We can define addition and multiplication of power series. Let A(x) =

∑n≥0 anx

n andB(x) =

∑n≥0 a = bnx

n. ThenA(x) +B(x) :=

∑n≥0

(an + bn)xn

A(x) ·B(x) :=∑n≥0

∑0≤k≤n

akbn−kxn.

Remark, we have completely specified the coefficient of xn for each n, and so the sum and product arewell defined. They can be computed in finite time given A(x) and B(x).

Differentiation

We can develop a complete theory of derivatives and integrals of formal power series using the powerrule d

dxxk = kxk−1, and essentially generalizing the derivative of a polynomial. Remark, this does not

involve a limit and so the usual properties (sum rule, product rule, chain rule) should be proved fromthe definition of formal power series.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 11: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

• Definition: ddxA(x) =

∑n≥0(n+ 1)an+1x

n;

• Product rule: ddx ; (A(x)B(x)) =

(ddxA(x)

)B(x) +A(x)

(ddxB(x)

);

• Chain rule for powers: ddx(A(x))n = n(A(x))n−1 d

dxA(x).

More advanced properties (to read and understand)

Multiplicative inverse A(x)−1

The multiplicative inverse of a formal power series A(x) is the formal power series C(x) =∑

n≥0 cnxn

that satisfiesA(x) · C(x) = 1.

Thus, ∑n≥0

∑k≥n

akcn−kxn = 1 + 0x+ 0x2 + . . . .

Recall that two formal power series are equal if and only all of their coefficients are the same. Thisleads to the system of equations:

a0c0 = 1 (1)a1c0 + a0c1 = 0 (2)

a2c0 + a1c1 + a0c2 = 0 (3)... (4)

This is a triangular system, and hence we can compute ck once we know of c0, . . . , ck−1. We seefrom (1) that c0 = 1/a0, and provided that a0 6= 0, this is well-defined.

Example: The inverse of A(x) = 1− x. The above system simplifies to:

c0 = 1−c0 + c1 = 0−c1 + c2 = 0

...−ck + ck+1 = 0

...

This has the unique solution: cn = 1 for all n. We should recognize this as the geometric series:

(1− x)−1 =∑n≥0

xn = 1 + x+ x2 + x3 + . . . .

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 12: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Compostion

We define composition of formal power series as follows:

A(B(x)) :=∑n≥0

an ·B(x)n.

Advanced facts (optional)

Two special series: exp, log

The formal power series∑

n≥0 xn/n! is reminiscent of the Taylor series for the exponential, and hence

we defineexp(x) :=

∑n≥0

xn/n!.

In fact, it satisfies all of the usual properties of exp, but again, since it is defined as the sum, theseproperties should be proved from the basic formal power series properties:

• ddx exp(x) = exp(x);

• exp(F (x) +G(x)) = exp(F (x)) · exp(G(x));

• exp(F (x))−1 = exp(−F (x)).

Similarly, we can define a series

log(1− x)−1 :=∑n≥1

xn

n.

We recognize the following properties which we can derive from formal power series definitions:

• ddx log(1− x)−1 = (1− x)−1;

• log(exp(A(x))) = A(x);

• exp(log(A(x))) = A(x), if a0=1;

• log(A(x) +B(x)) = log(A(x)) + log(B(x)), if a0 = b0 = 1.

More Ideas

• Prove the derivative and exponential formulas.

• Analytic Combinatorics. Each of these analytic/ algebraic operations corresponds to a com-binatorial operation when we consider formal power series that are Generating functions ofclasses of objects: sums correspond to unions; products correspond to cartesian products of sets;differentiation corresponds to a pointing operator. There is extremely well developed theory onthis topic.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 13: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

• Laurent series. If we start the sum at a negative integer e.g. a−2x−2 + a−1x

−1 + a0 + a1x+ . . .we describe a Laurent series. How have we increased our expressive power? The theory ofcomplex functions has much to say on this topic.

• Asymptotic Analysis. The values for which A(x) is not defined can give us much informationabout the asymptotic growth of the coefficient. Consider A(x) = 1

1−2x =∑

2nxn. The coefficientan grows like 2n. Remark that A(x) is not defined at x = 1/2. In fact, very often we can formalizea connection between the smallest singularity of the formal power series ρ (roughly, the smallestvalue for which A(x) is not defined) and the growth of an: an ≈ 1/ρn. Again, complex analysis isfundamental in this remarkable theory.

Additional References

• Wilf, Herbert S. generatingfunctionology. Third edition. A K Peters, Ltd., Wellesley, MA, 2006. (free todownload)

• Flajolet, Philippe and Sedgewick, Robert. Analytic combinatorics. Cambridge University Press, Cam-bridge, 2009. (free to download)

• Stanley, Richard P. Enumerative combinatorics. Vol. 2. Cambridge Studies in Advanced Mathematics,62. Cambridge University Press, Cambridge, 1999.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 14: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Combinatorial generating Functions

Description Here are some basic facts about combinatorial generating functions, that is formalpower series related to combinatorial families.

Note

The example on integer compositions is illustrated by a Maple worksheet available both in Mapleand PDF formats on Webct.

Combinatorial generating functions

Let C be a family of combinatorial objects together with a notion of size s (from now we always assumethat s is given with C), where, for every object ainC, s(a) denotes the size of a.

Let Cn be the subset of C composed of all objects of size n and cn = Cn.

The formal power seriesC(x) =

∑n≥0

cnxn

associated to the sequence of integers c0, c1 . . ., is the generating function of C.

Fundamental Fact 1. There exists a unique formal power series associated to any family of com-binatorial objects C, denoted by C(x) and called its generating function.

Example: binary strings. If C ={binary strings}, and the size of a binary string is defined by itslength, then Cn ={binary strings of length n}, cn = 2n and

C(x) =∑n≥0

2nxn =1

1− 2x.

The calculus of combinatorial generating functons

We have seen with formal power series that we can combine/modify them using operations such assum or product for example. The second fundamental fact on combinatorial generating functions isthe following.

Fundamental Fact 2. Operations on combinatorial generating functions can be interpreted interms of operations on the corresponding combinatorial families, and conversely, operations on com-binatorial families can be interpreted in terms of operations on their generating functions.

Let A,B, C be three combinatorial families with respective generating functions A(x), B(x), C(x).

Rule 1. Union/sum.If C = A ∪ B then C(x) = A(x) + B(x).

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 15: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Rule 2. Cartesian product/product.If C is the cartesian product of A,B, C = A× B = {(a, b) | a ∈ A, b ∈ B}, with s((a, b) = s(a) + s(b),then C(x) = A(x).B(x).

Rule 3. Sequences.If C is defined as the set of all sequences of k objects of A then C(x) = A(x)k.If C is defined as the set of all sequences of objects of A then C(x) = 1/(1−A(x))

Example: binary strings. A binary string of length n is a sequence of n symbols belonging to{0, 1}. Let A = {0, 1}; A(x) = 2x. Let C ={binary strings}.An other definition of C is then C ={sequences of objects belonging to A}, which implies immediately(by Rule 3) that C(x) = 1/(1− 2x).

Example: integer compositions. An integer composition is a sequence (ordered list) of strictlypositive integers. Its size is the sum of all integers in the sequence. For example, 2.1.5.3.1 is acomposition of size 12 = 2 + 1 + 5 + 3 + 1; it is not the same composition that 2.1.5.1.3: they both havethe same size and contain the same integers, but the order of the integers is different.

Let C be the set of all non-empty compositions. Let A be the set of all integers. The generatingfunction of A is

A(x) = x + x2 + x3 + x4 + · · · = x(1 + x + x2 + x3 . . .) = x∑n≥0

xn =x

1− x

(The last identity follows from Rule 3 and the fact that an integer can be seen as a sequence of 1s).

As compositions are defined as non-empty sequences of integers, we can say that the generatingfunction of C is defined by

C(x) + 1 =1

1−A(x).

Note the +1 term that aims at handling the case of an empty sequence of integers: by Rule 1, C(x)+1is the generating function of all compositions (empty or not).

From now, we need only to do calculus on the corresponding formal power series to find a nice formfor the generating function of non-empty integer compositions:

11−A(x)

=1

1− x1−x

=1

1−2x1−x

=1− x

1− 2x.

HenceC(x) =

11−A(x)

− 1 =1− x

1− 2x− 1 =

x

1− 2x.

This is a nice closed form for the generating function of integer partitions. It shows a clear link withbinary strings (the generating functions between the two cfamilies differ only by a multiplication byx), that was not obvious from the definitions of the objects.

Using this generating function and coefficient extraction techniques (next fact sheet), we will be ableto prove that the number of integer compositions of n is 2n−1 if n ≥ 1.

It is up to you now to explain, at the level of the combinatorial objects, how integer compositions ofn and binary strings of length n− 1 are in one-to-one correspondance. It is not very difficult, but not

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 16: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

trivial, and it is the power of generating functions to have unraveled this fact using simple calculusrules.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 17: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

(2)(2)

O O

O O

(1)(1)

O O

(4)(4)

O O

(3)(3)

(5)(5)

O O

O O

MACM201, Summer 2010, Cedric ChauveInteger Composition Enumeration

We first load two useful libraries: combstruct (for Combinatorial Structures) and gfun (for Generating Functions) that implements all notions we have seen on generating functions of combinatorial families.

with(combstruct):with(gfun):

Next, we write,e in the syntax of combstruct the decomposition of binary trees asInteger_Compositions := { ONE = Atom, # Represents the integer 1 INTEGERS = Sequence(ONE,card>=1), # A non-zero integer K is seen as a sequence of K 1s C = Sequence(INTEGERS) # A composition is a sequence of non-zero integers};

Integer_Compositions := C = Sequence INTEGERS , ONE = Atom, INTEGERS= Sequence ONE, 1 % card

Number of binary trees having from 1 to 20 nodes using the combstruct command "count"seq(count([C, Integer_Compositions, unlabeled], size=n-1), n=1..20);

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072,262144

Functional equation of ther generating functions using the combstruct command "gfeqns"gfeqns(Integer_Compositions, unlabeled, x);

C x =1

1K INTEGERS x , ONE x = x, INTEGERS x =1

1K x K 1

Solving the functional equation using the combstruct command "gfsolve"gfsolve(Integer_Compositions, unlabeled, x);

C x =K1C xK1C 2 x , ONE x = x, INTEGERS x = K

xK1C x

The first 20 coefficients of the generating function C(x).series((-1+x)/(-1+2*x), x, 21);

1C xC 2 x2 C 4 x3 C 8 x4 C 16 x5 C 32 x6 C 64 x7 C 128 x8 C 256 x9 C 512 x10

C 1024 x11 C 2048 x12 C 4096 x13 C 8192 x14 C 16384 x15 C 32768 x16 C 65536 x17

C 131072 x18 C 262144 x19 C 524288 x20 CO x21

Page 18: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Coefficient extraction in generating functions

Description Here are the steps to find the coefficient of xn in rational formal power series R(x) = p(x)q(x)

where p(x) and q(x) are polynomials in the variable x (most generating functions we will consider forcoefficient extraction have this form).

Key Theorems and Definitions

If A(x) =∑∞

n=0 anxn, then [xn]A(x) := an.

Power rule[xn]A(px) = pn[xn]A(x)

Reduction rule[xn]xmA(x) = [xn−m]A(x)

Sum rule[xn] (A(x) + B(x)) = [xn]A(x) + [xn]B(x)

Product rule

[xn]A(x)×B(x) =n∑

k=0

([xk]A(x)

)×([xn−k]B(x)

)Binomial theorem Let n and k be positive integers.

[xn](1− x)k =(

n

k

)=

n!(n− k)!k!

.

Extended binomial theorem Let k be a positive integer, and r be a real number. Then define(r

k

):=

r(r − 1)(r − 2) . . . (r − k + 1)k!

.

Then[xk](1 + x)r =

(r

k

).

A Useful Binomial Formula(−n

k

)=

(−n)(−n− 1) . . . (−n− k + 1)k!

= (−1)k (n)(n + 1) · · · (n + k − 2)(n + k − 1)k!

· (n− 1)!(n− 1)!

= (−1)k

(n + k − 1

n− 1

).

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 19: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Steps

From the above theorems, we compute [xk](1−mx)r = mr(r+k−1

k

)for any reals numbers m and r. Let

us reduce the computation to these kinds of terms.

1. Partial fraction Decomposition Simplify the form of the rational function. This is the mostcomputationally intensive part of the computation. Here pi(x) is a polynomial. Then

R(x) =∑ pi(x)

(1−mix)ki

i.e. a sum of rational generating functions such that the bottom polynomial has the simple form(1−mix)ki .

2. Separate Use sum rule to separate into terms of the form [xn](1−mix)ki .

3. Apply the binomial theorem Compute each of these terms independantly.

4. Sum Take the sum of the resulting terms.

Example

Let R(x) = 2 x2−4 x+11−18 x+129 x2−460 x3+816 x4−576 x5 . Compute [xn]R(x).

1. First we compute that

2 x2 − 4 x + 11− 18 x + 129 x2 − 460 x3 + 816 x4 − 576 x5

=−16

(1− 4 x)+

12(1− 3 x)

+2

(1− 4 x)3+

3(1− 3 x)2

.

We can use several techniques to do this manually (seen in class). Note that here, all polynomi-als pi(x) are of degree 0 (i.e. constant terms); this will often be the case.

2. We expand and solve using the rules described in the previous page.

[xn]R(x) = [xn]−16

(1− 4 x)+

12(1− 3 x)

+2

(1− 4 x)3+

3(1− 3 x)2

= −16[xn]1

1− 4x+ 12[xn]

11− 3x

+ 2[xn]1

(1 + (−4x))3+ 3[xn]

1(1 + (−3x))2

= −16 · 4n + 12 · 3n + 2(−3n

)(−1)n(−4)n + 3

(−2n

)(−1)n(−3)n

= −16 · 4n + 12 · 3n + 2 · 4n

(n + 2

2

)+ 3n+1

(n + 1

1

)= (−16 + (n + 1)(n + 2)) · 4n + (12 + 3(n + 1)) · 3n.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 20: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

(3)(3)

O O

O O

O O

O O

(1)(1)

(2)(2)

O O

(4)(4)

O O

(5)(5)

MACM201, Summer 2010, Cedric ChauveBinary Trees Enumeration

We first load two useful libraries: combstruct (for Combinatorial Structures) and gfun (for Generating Functions) that implements all notions we have seen on generating functions of combinatorial families.

with(combstruct):with(gfun):

Next, we write,e in the syntax of combstruct the decomposition of binary trees asBinary_Trees := { N = Atom, # N is the family of the tree reduced to a single node T = Union(N,NT), # T is the family of non-emptybinary trees NT = Prod(N,T,T) # NT is the family of binary trees of size > 1};

Binary_Trees := N = Atom, NT = Prod N, T, T , T = Union N, NTNumber of binary trees having from 1 to 20 nodes

seq(count([T, Binary_Trees, unlabeled], size=n-1), n=1..20);0, 1, 0, 1, 0, 2, 0, 5, 0, 14, 0, 42, 0, 132, 0, 429, 0, 1430, 0, 4862

Functional equation of ther generating functionsgfeqns(Binary_Trees, unlabeled, x);

N x = x, NT x = x T x 2, T x = xCNT xSolving the functional equation

gfsolve(Binary_Trees, unlabeled, x);

N x = x, NT x = K12

K1C 1K 4 x2

x K x, T x = K12

K1C 1K 4 x2

xDeveloping both solutions in series: only one has positive coefficients.

series(-(1/2)*(-1+sqrt(1-4*x^2))/x, x, 21);series(-(1/2)*(-1-sqrt(1-4*x^2))/x, x, 21);

xC x3 C 2 x5 C 5 x7 C 14 x9 C 42 x11 C 132 x13 C 429 x15 C 1430 x17 C 4862 x19

CO x21

xK1 K xK x3 K 2 x5 K 5 x7 K 14 x9 K 42 x11 K 132 x13 K 429 x15 K 1430 x17 K 4862 x19

CO x21

Page 21: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Solving Recurrences I

Description How to solve a second order homogenous linear recurrence

Aan +Ban−1 + Can−2 = 0 a0 = D a1 = E

Note

These notes contained a mistake: −2A should have been 2A. It has been corrected on WednesdayJune 23, afternoon.

How to find a closed form expression for an

1. Compute the first few terms a0, a1, a2, a3 Doing this helps you verify the solution that you find,and gives you a chance to recognize your solution.

2. Determine the characteristic polynomial c(r) := Ar2 +Br + C.

3. Find the roots of c(r) You can find the solutions to c(r) = 0 by any classic method: factoring orthe quadratic formula. Label the two roots α and β.

α :=−B +

√B2 − 4AC2A

β :=−B −

√B2 − 4AC2A

4a. CASE 1: The roots are different, and are real numbers. Solve for x and y in the followingsystem of equations:

x+ y = D

αx+ βy = E

THE SOLUTION IS

an = xαn + yβn

4b: CASE 2: Repeated real roots. If α = β the general solution is a little bit different. Solve for xand y in the following system of equations:

x = D

α(x+ y) = E

THE SOLUTION ISan = xαn + ynαn

If the roots are distinct and complex, we can actually still apply CASE 1, but simplifying the expres-sion to a real formula is slightly more complicated.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 22: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Example 1 an − 6an−1 + 8an−2 = 0, a0 = 0, a1 = 6

1. Initial terms We can rewrite the rule to be an = 6an−1 − 8an−2. Thus,

an = 6an−1 − 8an−2

a2 = 6(6)− 8(0) = 36a3 = 6(36)− 8(6) = 168.

2. Characteristic Polynomial c(r) = r2 − 6r + 8 = (r − 4)(r − 2)

Roots of c(r) Since the polynomial factors easily, we can see that α = 4 β = 2 are the two roots.

3. Solve system

x+ y = 0 (1)4x+ 2y = 6 (2)

(1) =⇒ x = −y; (2) =⇒ 4x− 2x = 6 =⇒ x = 3 =⇒ y = −3. (3)

4. Write out solution an = 3 · 4n − 3 · 2n

5. Verifyn = 2 : 3(16)− 3(4) = 36n = 3 : 3(64)− 3(8) = 168.

Example 2 an − 6an−1 + 9an−2 = 0, a0 = 2, a1 = 9

1. Initial terms We can rewrite the rule to be an = 6an−1 − 9an−2. Thus,

an = 6an−1 − 9an−2

a2 = 6(9)− 9(2) = 36a3 = 6(72)− 9(9) = 135.

2. Characteristic Polynomial c(r) = r2 − 6r + 9 = (r − 3)2

3. Roots of c(r) The polynomial factors easily, and we see that we have one real, repeated root: α = 3

4. Solve system

x = 2 (4)3(x+ y) = 9 (5)

(4) =⇒ 3(2 + y) = 9 =⇒ y = 1. (6)

5. Write out solution an = (2 + 1 · n) · 3n

6. Verifyn = 0 : (2 + 0)30 = 2n = 1 : (2 + 1)31 = 9n = 2 : (2 + 2)32 = 36n = 3 : (2 + 3)33 = 135.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 23: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Higher Order Relations

THEOREM 1.If an = f(n) and an = g(n) are two solutions to the linear recurrence with constant coeffi-cients of the form:

C0an + C1an−1 + · · ·+ Ckan−k = 0

Then an = f(n) + g(n) is also a solution.

PROOF.

C0(f(n) + g(n)) + C1(f(n− 1) + g(n− 1)) + · · ·+ Ck(f(n− k) + g(n− k))= C0f(n) + C0g(n) + C1f(n− 1) + C1g(n− 1) + · · ·+ Ckf(n− k) + Ckg(n− k)= C0f(n) + C1f(n− 1) + · · ·+ Ckf(n− k) + C0g(n) + C1g(n− 1) + · · ·+ Ckg(n− k)= 0 + 0 = 0.

THEOREM 2.Consider a general recurrence relation given by

C0an + C1an−1 + · · ·+ Cjan−j + · · ·+ Ckan−k

with C0 6= 0, where each Ci is real for i from 1 to k. Suppose that α is a root of the charac-teristic polynomial

c(r) = C0rk + C1r

k−1 + · · ·+ Cjrk−j + · · ·+ Ckr,

and suppose that α is a root of multiplicity1 m of c(r). Then α contributes solution

an =(A0 + A1n + A2n

2 + · · · + Am−1nm−1

)αn

where the Ai are constants that can be determined by solving the system of equations thatarise by substituting ai into this formula for n = 0..m− 1.

Putting these two results together, we have a way to determine the complete family of solutions toa recurrence: We factor the characteristic polynomial, apply THEOREM 2 to each root and take thesum of all results.

Example an − 6an−1 + 12an−2 − 8an−3 = 0, a0 = 1, a1 = 1, a2 = 2

1. Initial terms 1, 1, 2, 8, 32, 112

2. Characteristic Polynomial c(r) = r3 − 6r2 + 12r − 8 = (r − 2)3

3. Roots of c(r) The polynomial factors easily, and we see that we have one real, repeated root: α = 2of multiplicity 3.

1This implies that the polynomial (r − α)m divides c(r).

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 24: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

4. Solve system

(x+ 0y + 0z) · 20 = x = 1(x+ 1y + 12z) · 21 = 2(x+ y + z) = 1 =⇒ 2y + 2z = −1

(x+ 2y + 22z) · 22 = 4(x+ 2y + 4z) = 2 =⇒ 8y + 16z = −2

Solution this system: x = 1, y = −3/4, z = 1/4

5. Write out solution an = (1 +−3/4 · n+ 1/4 · n2) · 2n

6. Verifyn = 3 : (2− 3

4(3) + 14(32))33 = 8

n = 4 : (2− 34(4) + 1

4(42))34 = 32

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 25: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Solving Recurrences II

Note.

Two mistakes and one confusing example have been corrected/removed on Monday July 5th.

Description How to solve a second order non-homogenous linear recurrence

Aan + Ban−1 + Can−2 = F (n) a0 = D a1 = E

The method

1. Determine the homogenous solution Find hn which satisfies Aan +Ban−1 +Can−2 = 0. Do notsolve for the constants.

a. Characteristic polynomial c(r) := Ar2 +Br + C.b. Find the roots of c(r) You can find the solutions to c(r) = 0 by any classic method: factoring

or the quadratic formula. Label the two roots α and β.

α :=−B +

√B2 − 4AC−2A

β :=−B −

√B2 − 4AC−2A

c. CASE 1: The roots are different, and are real numbers. Set hn = xαn+yβn and do notSolve for x and y yet!

c’. CASE 2: Repeated real roots. α = β =⇒ hn = (x + yn)αn and do not solve for x and yyet!

2. Determine the particular solution Find pn which satisfies the recurrence, but may disagreeon the initial conditions.

a. Look up a candidate on the table based on what f(n) looks like Choose your particu-lar solution based upon what f(n) looks like

f(n) Proposed pn

b, a constant xbn+ c xn+ ybn2 + cn+ d xn2 + yn+ zA polynomial of degree k A polynomial of degree kbn xbn

cbn xbn

bn + cn+ d xbn + yn+ z

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 26: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

b. Solve for the free parameters How to solve for the unknowns:

1. Set an = candidate.2. Expand the equation as much as you can.3. Candidate is a polynomial: Match up coefficients of nk on both sides: this is a new

equation to solve4. Candidate is an exponential: Compare coefficients of the exponential on both sides:

this is an equation to solve.5. If this process leads to a tautology, say “0=0” with nothing to solve, do not panic!

You have simply chosen a poor candidate. Multiply your candiate by n, add anotherconstant, and try again. More details on this below.

3. The solution is an = pn + hn

4. Solve for the remaining parameters in the homogeneous part using the initial conditionsa0 = p0 + h0 and a1 = p1 + h1.

Example 1 an − 6an−1 + 8an−2 = n, a0 = 0, a1 = 6

1. Homogeneous solution

Characteristic Polynomial c(r) = r2 − 6r + 8 = (r − 4)(r − 2)

Roots of c(r) Since the polynomial factors easily, we can see that α = 4 β = 2 are the two roots.

Solution hn = x · 4n + y · 2n

2. Particular solution Our right hand side is linear, so according to the table we take pn = cn+ d.

pn − 6pn−1 + 8pn−2 = n

=⇒ (cn+ d)− 6(c(n− 1) + d) + 8(c(n− 2) + d) = n

=⇒ cn− 6cn+ 8cn+ d− 6d+ 6c− 16c+ 3d = n

=⇒ (3c)n+ (3d− 10c) = n

3c = 1 =⇒ c = 1/33d− 10c = 0 =⇒ d = 10/9

pn = n/3 + 10/9

3. Put them together an = n/3 + 10/9 + x · 4n + y · 2n

4. Solve for x and y using initial conditions 0 = p0 + h0 = 10/9 + x + y and 6 = p1 + h1 = 1/3 +10/9 + 4x+ 2y. The solution is:

an = −9/2 2n +6118

4n +109

+ 1/3n.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 27: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Example 2 an − 6an−1 + 8an−2 = 3n, a0 = 0, a1 = 6

1 Homogeneous solution

Characteristic Polynomial c(r) = r2 − 6r + 8 = (r − 4)(r − 2)

Roots of c(r) Since the polynomial factors easily, we can see that α = 4 β = 2 are the two roots.

Solution hn = x · 4n + y · 2n

2. Particular solution Our right hand side is linear, so according to the table we take pn = c3n.

pn − 6pn−1 + 8pn−2 = 3n

=⇒ (c3n)− 6(c3n−1) + 8(c3n−2) = 3n

=⇒ (c3n)− 2c(3n) +89c(3n) = 3n

=⇒ c− 2c+89c = 1

=⇒ c = −9

pn = 3n

3. Put them together an = pn + hn = (−9)3n + x · 4n + y · 2n

4. Solve for x and y using initial conditions 0 = p0+h0 = −9+x+y and 6 = p1+h1 = 27+4x+2y.The solution is:

an =322n +

152

4n − (9)3n.

Subtleties

We are trying to find independant solutions. If our proposed particular solution is the same, or isimplied by the homogeneous solution then we are missing solutions.

Here are some examples to illustrate possible problems and how to solve them:

• hn = x3n + y2n, f(n) = 3n: The particular solution is not independant from the particularsolution. We treat this like the multiple root case and multiply by n: in this case, take pn = cn3n.

• hn = (x + ny)3n, f(n) = 3n: The particular solution is not independant from the particularsolution. We treat this like the multiple root case and multiply by the next power up: takepn = cn23n.

• hn = x(1n) + y(3n), f(n) = c: Two constant solutions. Take pn = cn+ d.

• hn = x(1n) + y(3n), f(n) = polynomial of degree k: take pn = a polynomial of degree k + 1.

Ultimately, our solution is the same as in the multiple root case. We multiply by increasing powersof n into the coefficient.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 28: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Example 3 an − 6an−1 + 8an−2 = 4n, a0 = 0, a1 = 6

The homogeneous solution is hn = x · 4n + y · 2n conflicts with our candidate particular solution. Wetake pn = cn4n instead. The answer is

an = 2n − 4n + 2 · 4nn.

Why does this work?

Suppose that we could find a solution pn that satisfied:

Apn +Bpn−1 + Cpn−2 = F (n) (1)

for all n ≥ 2, but didn’t neccessarily fit the initial conditions. We can use a solution to the homoge-neous problem to adapt this solution. Suppose that hn satisfies the following for n ≥ 2:

Ahn +Bhn−1 + Chn−2 = 0. (2)

We know how to find a solution that can adapt to any initial conditions.

Consider the sum pn + hn:

A(pn + hn) +B(pn−1 + hn) + C(pn−2 + hn−2) = Apn +Bpn−1 + Cpn−2 +Ahn +Bhn−1 + Chn−2

(by distributive property of multiplication)= F (n) + 0.

Thus, the sum clearly satisfies the recurrence, and by careful adaptation of the parameters for thesolution of hn we can find an answer that matches with the initial conditions.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 29: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Generating function approaches to recurrences

Description Generating function method for solving recurrences and how to find the recurrencesatisfied by the coefficients of a rational generating function

Note

These notes contained a mistake: D and E were switched in a few places. It has been corrected onWednesday June 23, morning.

1 Solving a recurrence using generating functions

1.1 Basic idea

We can use generating functions to solve linear recurrence relations. Linear homogeneous recurrencerelations lead to generating functions that are a quotient of two polynomials. We explain the generalidea with an example of order 2. Suppose an satisfies the relation:

an +Ban−1 + Can−2 = 0, a0 = D, a1 = E.

We compute A(x) =∑

n≥0 anxn directly from the recurrence, then determine an expression for an by

coefficient extraction.

Multiply both sides by xn

anxn +Ban−1x

n + Can−2xn = 0 · xn = 0.

Sum from n = 2 to∞ ∑n≥2

anxn +B

∑n≥2

an−1xn + C

∑n≥2

an−2xn =

∑n≥2

0 = 0.

Rewrite using A(x) =∑

n≥0 anxn

(A(x)− a1x− a0) +Bx (A(x)− a0) + Cx2A(x) = 0

Isolate A(x) by factoring and using a0 = D; a1 = E

(1 +Bx+ Cx2)A(x)− (E +BD)x−D = 0 =⇒ A(x) =(E +BD)x+D

1 +Bx+ Cx2.

Coefficient Extractionan = [xn]

(E +BD)x+D

1 +Bx+ Cx2.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 30: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

1.2 Example

Solve the following recurrence using generating functions:

an − 2an−1 + an−2 = 0, a0 = 1, a1 = 2.

Multiply by xn

anxn − 2an−1x

n + an−2xn = 0 · xn = 0.

Sum from n = 2 to∞ ∑n≥2

anxn − 2

∑n≥2

an−1xn +

∑≥2

an−2xn =

∑≥2

0 = 0.

Rewrite using A(x) =∑

n≥0 anxn

(A(x)− a1x− a0)− 2x (A(x)− a0) + x2 (A(x)) = 0

Isolate A(x) using a0 = 1; a1 = 2

(1− 2x+ x2)A(x)− 2x− x+ 2x = 0 =⇒ A(x) =x

1− 2x+ x2=

x

(1− x)2.1

Coefficient Extractionan = [xn]

x

(1− x)2

We can solve this several ways:

• Generalized Binomial Theorem [xn](1 + x)α =(αn

).

an = [xn]F (x)

= [xn]x

(1− x)2

= [xn−1]1

(1− x)2

= (−1)n−1

(−2n− 1

)=

(n

1

)= n.

• Recognize the derivative:

1(1− x)2

=d

dx

11− x

=d

dx

∑n≥0

xn =∑n≥0

(n+ 1)xn

Hence an = [xn−1] 1(1−x)2 = n

• Use the identity F (x)/(1− x) =∑

n≥0 (∑

k=0..n fk)xn.

Here we set F (x) = 11−x =

∑n≥0 x

n, thus [xn] 1(1−x)2 =

∑k=0..n 1 = n + 1 Then an =

[xn−1] 1(1−x)2 = n.

1We used here that (1− x)2 = (−1)2(1− x)2 = ((−1)(1− x))2 = (x− 1)2.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 31: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

1.3 Advanced: Connection to other method

Remark, that the denominator of A(x) is 1 + Bx + Cx2 = x2C(1/x) where C is the characteristicpolynomial of the recurrence. If α and β are the two roots of C, then C(r) = (r − α)(r − β).

The justification for the other method comes from the following observation:

11 +Bx+ Cx2

=1

x2C(1/x)

=1

x2( 1x − α)( 1

x − β)

=1

(1− xα)(1− xβ)

=p(x)

1− xα+

q(x)1− xβ

for some polynomials p and q by partial fraction decomposition.

= p(x)∑n≥0

αnxn + q(x)∑n≥0

βnxn.

=∑n≥0

{p(x)αn + q(x)βn} xn

So, when we do the coefficient extraction we get that the solution is of the form

an = (something) αn + (something) βn,

where α and β are the (distinct) roots of the characteristic polynomial.

Test yourself: If you understand this, follow through to figure out what happens in the case of arepeated root.

Advanced: How is this adapted to solve non-homogeneous recurrence relations?

2 The recurrence satisfied by the coefficients of a rational generat-ing function

The steps are summarized

1. Set up a formal equation

2. Clear the denominator to get new equation Multiply through the denominator, expand eachterm, and re-write each term so that the coefficient of zn is known.

3. Equate coefficients of zn

4. Solve this system to find initial conditions

5. Find generic condition, i.e. the recurrence

6. Verify the answer!

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 32: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

2.1 Example

Find the recurrence satisfied by the coefficient sequence of A(z) = 3z+11−2z .

1. Set A(z) =∑∞

n=0 anzn = 3z+1

1−2z .

2. We multiply both sides by the denominator

(3z + 1) = (1− 2z)∞∑n=0

anzn

=

( ∞∑n=0

anzn

)− 2

(z∞∑n=0

anzn

)

=

( ∞∑n=0

anzn

)−

( ∞∑n=0

2anzn+1

)

=

( ∞∑n=0

anzn

)−

( ∞∑n=1

2an−1zn

)

= a0 +

( ∞∑n=1

(an − 2an−1)zn).

3. We compare coefficients of zn on the left hand side and the right hand side:

z0 : 1 = a0

z1 : 3 = a1 − 2a0

z2 : 0 = a2 − 2a1

z3 : 0 = a3 − 2a2

...zk : 0 = ak − 2ak−1

4. a0 = 1, a1 = 3 + 2a0 = 3 + 2 = 5, a2 = 2a1 = 10, . . .

5. ak = 2ak−1

Advanced Ideas

• Describe a scheme convert a linear recurrence satisfied by the coefficients of a generating func-tion into differential equation satisfied by the generating function. (Assume that d

dzA(z) =∑∞n=0 anz

n−1.)

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 33: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Integer partitions

Description The generating function of integer partitions

Preamble

The goal of these notes is to show how, understanding the combinatorial structure of integer par-titions and using the link between operations on combinatorial families (union, cartesian productand sequences) and operations on generating functions, leads easily to a formula for the generatingfunction for integer partitions.

Integer partitions

An integer partition of size n is a non-increasing sequence of integers that sums up to n. Each integerin a partition is called a part.

For example (5, 3, 3, 2, 1, 1, 1) is a partition of size 16 (5 + 3 + 3 + 2 + 1 + 1 + 1 = 16) with 7 parts.

Note that the empty partition (i.e. the partition with no part) is of size 0.

We denote by P the (combinatorial) family of all integer partitions. We denote by P` the (combinato-rial) family of all integer partitions composed only of parts ofm size `.

P` = {∅, (`), (`, `), (`, `, `), . . . }

Reminder: operations on combinatorial families and on generatingfunctions

Rule 1. Union/sum.If C = A ∪ B then C(x) = A(x) + B(x).

Rule 2. Cartesian product/product.If C is the cartesian product of A,B, C = A× B = {(a, b) | a ∈ A, b ∈ B}, with s((a, b) = s(a) + s(b),then C(x) = A(x).B(x).

Rule 3. Sequences.If C is defined as the set of all sequences of k objects of A then C(x) = A(x)k.If C is defined as the set of all sequences of objects of A then C(x) = 1/(1−A(x))

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 34: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Let ` be a strictly positive integer.

Let P`` be the family containing only the integer par-

tition composed of a single part of size `, i.e. (`).Let P `

` (x) be the generating function of P`` .

P`` is composed of a single object of size `. P `

` (x) = x`.

Let P` be the family containing all partitions com-posed of parts of size `, including the empty partition. Let P `(x) be the generating function of P`.

P` is then the family of all (possibly empty) sequencesof objects of P`.

By the sequence rule (rule 3),

P `(x) =1

1− P `` (x)

=1

1− x`.

Alternatively, P` = {∅} ∪ {(`)} ∪ {(`, `)} ∪ {(`, `, `} ∪. . . : P` is the union of a family composed of one object(partition) of size 0, a family composed of one partitionof size `, a family composed of one partition of size 2`,. . . .

By the union/sum rule (rule 1),

P `(x) = 1 + x` + x2` + x3` + · · · = 11− x`

Let P be the family containing all integer partitions,including the empty partition.

Let P (x) be the generating function of P(i.e. the generating function of integer par-titions).

Each integer partition can be decomposed into one(possibly empty) partition of P1, one (possibly empty)partition of P2, one (possibly empty) partition of P3,. . . .

P is then defined as the cartesian product of P1, P2,P3, . . . :

P = P1 × P2 × P3 . . . .

By the product rule (rule 2),

P (x) = P 1(x).P 2(x).P 3(x). . . .

P (x) =1

1− x.

11− x2

.1

1− x3· · ·

Using the product (∏

) notation, we canrewrite as

P (x) =∏`≥1

P `(x) =∏`≥1

11− x`

.

To conclude,

P (x) =∏`≥1

11− x`

= (1 + x + x2 + x3 + . . . ).(1 + x2 + x4 + x6 + . . . ).(1 + x3 + x6 + x9 + . . . ) . . . .

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 35: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Integer partitions with odd or distinct parts

Description A bijection between integer partitions with odd parts and integer partitions with dis-tinct parts

Preamble

The goal of these notes is to show a different technique to prove that the counting sequences of twofamilies of different combinatorial objects are equal.

The result

Let Po be the family of integer partitions with odd parts, pon be the number of such partitions of size

n and P o(x) =∑

n≥0 ponx

n its generating function.

Let Pd be the family of integer partitions with distinct parts, pdn be the number of such partitions of

size n and P d(x) =∑

n≥0 pdnx

n its generating function.

We have seen (and proved using the calculus of generating functions) in class that, despite the factthat Po 6= Pd (i.e some partitions with odd parts do not have distinct parts and conversely),

P o(x) = P d(x) =∏`≥1

(1 + x`).

By definition of formal power series, it is equivalent to∑n≥0

ponx

n =∑n≥0

pdnx

n

which implies thatpo

n = pdn, n ≥ 0.

What we want to illustrate now is a technique that proves that pon = pd

n, n ≥ 0, without requiring thecalculus of generating functions.

It is called bijective counting, and requires creativity more than calculus skills.

A bijective proof: the principle

The principle is the following. We want to define two combinatorial maps φ and ψ that satisfies thefollowing properties:

1. φ : Po → Pd, (φ transforms any partition with odd parts into a partition with distinct parts),

2. ψ : Pd → Po, (ψ transforms any partition with distinct parts ion-to a partition with odd parts),

3. For every partition λ with odd parts, ψ(φ(λ)) = λ,

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 36: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

4. For every partition λ with distinct parts, φ(ψ(λ)) = λ.

The last two properties state in fact that ψ is the inverse map of φ and conversely.

If we can design these two maps ψ and φ, they define a bijection (also called one-to-one correspon-dence, between Po and Pd, that implies that po

n = pdn, n ≥ 0: to every partition λ of Po we can

associate a unique partition of Pd and conversely.

A bijective proof: the maps

We first describe φ. Let λ = (λ1, . . . , λk) be a partition with odd parts. We transform it into a partitionwith distinct parts as follows: as long as the partition has equal parts, pick two equal parts and mergeinto a single part of double size.

For example, if λ = (3, 3, 3, 1, 1, 1, 1), we construct the following intermediate partitions (6, 3, 1, 1, 1, 1)(merge two parts of size 3), (6, 3, 2, 1, 1) (merge two parts of size 1), (6, 3, 2, 2) (merge two parts of size1), (6, 4, 3) = φ(λ) (merge two parts of size 2). This map φ satisfies property 1 as it transforms apartition with odd parts into a partition with distinct parts.

We now describe the converse map ψ. Let λ = (λ1, . . . , λk) be a partition with distinct parts. Wetransform it into a partition with odd parts as follows: as long as the partition has at least one evenpart, pick one even part and split it into two parts of half its size.

For example, if λ = (6, 4, 3), we construct the following intermediate partitions (6, 3, 2, 2) (split part 4into 2, 2), (6, 3, 2, 1, 1) (split a part 2 into 1, 1), (6, 3, 1, 1, 1, 1) (split the part 2 into 1, 1), (3, 3, 3, 1, 1, 1, 1) =ψ(λ) (split part 6 into 3, 3). This map ψ satisfies property 2 as it transforms a partition with distinctparts into a partition with odd parts.

It is not hard to prove that properties 3 and 4 are satisfied (but not easy to write it properly, and notour focus in this note).

We then have described a bijection between Po and Pd, that implies that pon = pd

n, n ≥ 0.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 37: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Proof Techniques for Graph Theory

Introduction

The general problem is the following: we are given a result (say a theorem) and asked to prove it.There are some initial steps before starting to write a proof.

Step 1. First, a careful reading of the result to prove should lead to identify two parts:

• the hypothesis (sometimes claaed assumptions) of the result,

• the statement of the result.

Here is an example.

Theorem. If G is a loop-free connected planar simple graph then |E(G)| ≤ 3|V (G)| − 6.

Here the hypothesis are:

• G is an (undirected) graph,

• G can not have loops,

• G can not have multiple edges (it is simple),

• G is connected,

• G is planar.

The statement is

• |E(G)| ≤ 3|V (G)| − 6, i.e. the number of edges of G is not greater than three times its numberof vertices minus six.

This first step is important because to prove a result, we have to deduce its statement from thehypothesis. I.e. we have to find a sequence of logical steps, that starts from the hypothesis, uses theirproperties and the results we know about the graph staisfying these hypothesis, to end up with thestatement we want to prove.

Step 2. The second step consists in chosing the proof technique we will follow. The principle hereis that the sequence of logical steps we will write to prove the statement will follow some generalpattern corresponding to the technique we chose. There are a few techniques we will consider:

Deduction Begin with the hypothesis and apply simple logical implications or algebra or existingresults to deduce the result. This is not really a technique, but more the natural way to proceedfor simple proofs.

Contradiction Begin by adding one hypothesis: the statement you want to prove is false (reminder:we want to prove this statement is true). Then show that the resulting set of hypothesis (theinitial ones plus the added one) is not consistent: they can not be satisfied all at the same time,or a known result is contradicted. This implies that the statement is in fact true, which is whatwe wanted to prove.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 38: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Induction Identify an ordered parameter, like number of edges or number of vertices or the numberof connected components or the number of minimal cycles . . . . Call it n (this is your inductionparameter). Show that the result is true for some base case, e.g. n = 0, and show that if it istrue for n < k, k ≥ 1 it has to also be true for n = k.

This is a good proof strategy to try if you are trying to prove a result about a graph that remainstrue if you delete an edge, or a vertex. (e.g. planar; chromatic number; acyclic).

The ability to make the good choice (i.e to chose the proof technique that is the most adapted to theproof to write) is central, and can be developed by practice only.

Step 3. The third step consists in writing the proof: i.e. following the general scheme implied bythe chosen proof technique and using the hypothesis, their properties, results we know are true forgraphs satisfying these hypothesis.

Fundamental prerequisite. Graph theory, unlike the first past of the class, relies heavily ondefinitions and results, more than on computational techniques. Especially, there are plenty offamilies of graphs, with different properties, as well as plenty of structures associated to graphs(isomorphisms, degree, paths, cycles, colorings, . . . ). In order to be able to write correct proofs, it isfundamental to know very well:

• all definitions related to graphs and graph families,

• all results presented in class.

In particular, it is fundamental to know the precise statement of a result, including its hypothesis. Ifwe consider the result above, we know we can not use it to prove a result on a non-simple graph forexample.

A large part in the art/craft of proof writing, that comes with practice, is to develop an ability toquickly identify which known results related to the given hypothesis will be useful to advance aproof closer to the desired endpoint (i.e. the statement to prove). We give below a few example ofknown results we will use in our examples of proofs. Also, a useful step, at least at the beginning, isto write out all of the definitions and results you know that are related to the hypothyesis and mightbe useful to prove the statement: having them written in fron of you might be helpful to see whcihone to start with.

Extremely useful graph theory results

Theorem 1. In any graph or multigraph G, ∑v∈V (G)

deg v = 2|E|.

Theorem 2. (Euler’s Formula) For any non empty planar graph or multigraph,

|V (G)| − |E(G)|+ |R(G)| = 2.

Theorem 3. For any tree T ,|V (T )| = |E(T )|+ 1.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 39: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Example 1. A simple result proved by induction

Theorem 1. If G is a graph or a multigraph,∑v∈V (G)

deg v = 2|E|.

Proof.

Hypothesis G is an (undirected) graph that can have loops and multiple edges.

Statement∑

v∈V (G) deg v = 2|E|.

Proof technique: inductionInduction parameter. Let n be the number of vertices of G

Base case. Let n = 0. G has no vertex and no edge, so∑

v∈V (G) deg v = 2|E| = 0. The statementis statisfied in the base case.

Induction hypothesis. If 0 ≤ n < k then∑

v∈V (G) deg v = 2|E|.

Inductive step. Let n = k. Let x be any vertex of G and G′ be the graph G where x and alledges containing x have been removed. G′ has k − 1 vertices and then by induction hypothesis,∑

v∈V (G′) deg v = 2|E(G′)|.Now, let ` be the number of edges containing x, `′ of them being loops (x, x). By definition of thedegree,

∑v∈V (G) deg v = (

∑v∈V (G′) deg v) + 2(`− `′) + 2`′ .

So∑

v∈V (G) deg v = 2|E(G′)|+ 2` = 2|E(G)|, which is what we wanted to prove.

Example 2. A proof by contradiction

Theorem 1. The number of vertices with odd degree in any graph is even.

Proof. Hypothesis G is a graph, with no constraint on G.

Statement G has an even number of odd degree vertices.

Proof technique: contradiction

Let’s add one hypothesis: G has an odd number of odd degree vertices.It follows that sumv∈V (G) deg v is odd, as the sum of an odd number of odd numbers is odd.This contradicts the known result that sumv∈V (G) deg v = 2|E| and is then even.The hypothesis that G has an odd number of odd degree leads to a contradction with a knownresult, so this hypothesis is false, which implies that G has an even number of odd vertices.They key here was to see that the contradiction would not be with one of the hypothesis butwith a known result, and to identify this result.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 40: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Example 3. A proof by Induction

Theorem 2. If T is a tree with at least two vertices, then |V | = |E|+ 1.

Proof. Hypothesis • T is a tree,

• T has at least two vertices

Statement |V | = |E|+ 1

Proof technique: inductionInduction parameter. Let n be the number of vertices of T

Base case. Let n = 2 (due to the second hypothesis). T has 2 vertices and 1 edge |V | = |E| + 1and the statement is satisfied in the base case.

Induction hypothesis. If 2 ≤ n < k then |V | = |E|+ 1.

Inductive step. Let T be a tree with k > 2 vertices. T has an edge e = {x, y}. Consider the graphT \ e.

This graph is disconnected since there is a unique path between any two vertices in T , henceremoving e removes the unique path between x and y.

This graph can have at most two connected components since T is connected and we removed asingle edge.

Each connected component is cycle-free, since T is.

Hence, by definition of trees and forests, T \ e is composed of two trees, T1 and T2.

The number of vertices in T1 is less than k, hence the inductive hypothesis is true, and V (T1) =E(T1) + 1. Similarly, we have V (T2) = E(T2) + 1.

Now, consider the following equations:

|V (T )| = |V (T \ e)| = |V (T1)|+ |V (T2)|= E(T1)− 1 + E(T2)− 1 (by the induction hypothesis)= (|E(T1)|+ |E(T2)|+ 1) + 1= |E(T )|+ 1.

Hence, it is also true for graphs with k vertices. By the Principle of induction, the result is true.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 41: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Graphs and parallel computer architectures

Motivation

A parallel computer is composed of two kinds of elements: processors and interconnections betweenprocessors (an interconnection connects two processors and allows to exchange information). Thisarchitecture can be modeled by a graph: processors are modeled by vertices and interconnection aremodeled by edges.

The challenge in the design of a parallel computer architecture with a given number of processors(say 2n as it is often the case a power of 2 is used for the number of processors) is to balance thefollowing competing desiderata:

1. having vertices (processors) that are close by, in order to minimize the time spend by dataexchange;

2. minimizing the number of edges, in order to ease and reduce the cost of the disposition ofthe processors and interconnection on a chip computer and minimize the crossings betweeninterconnections, that can result in data transmission errors for example.

First examples: complete graph and paths

Let see two possible simple architectures: the complete graph K2n (seen in class) and the path P2n

defined by V (P2n) = {1, . . . , 2n} and E(P2n) = {{i, j}, s.t. j = 1 + 1}.

To measure how vertices are close in a graph, we define the notions of distance and diameter of agraph.

Definition 1. The distance between two vertices i and j of a graph G is the length (in number ofedges) of the shortest path between i and j in G. It is denoted by dG(i, j).

Definition 2. The diameter of a G, denoted by d(G) is the maximum distance between two verticesof G: d(G) = maxi,j∈V (G) dG(i, j).

In other words, the diameter of G is the maximum communication steps (in number of interconnec-tions to follow) between two processors of the parallel architecture modeled by G.

For K2n , by definition, any pair of vertices defines an edge, so

∀ i, j ∈ V (G), dK2n (i, j) = 1

andd(K2n) = 1.

Hence, objective 1 is well satisfied (every pair of vertices is adjacent), but the cost is high as the

number of edges to use is (2n

2 )2 that is in O(22n−1) and is then extremely high (roughly the square of

the number of vertices). Results on planar graphs will also tell us that, if n ≥ 3, K2n is not planarand there will be many edge crossings, which is not acceptable.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 42: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

The properties of P2n are quite opposite to the properties of K2n . There are very few edges, as|E(P2n)| = 2n − 1, which is the minimum number of edges needed to have 2n vertices connected.So P2n is optimal with respect to objective 2. But the diameter of P2n is high, as dP2n (1, 2n) = 2n − 1,and some communication between two processors can take a time linear in the number of edges ofthe graph, which is not acceptable.

Note that we considered above only the maximum distance in a graph (i.e. the worst possible commu-nication time between a pair of processors). It would be more fair to consider the average distance,that is what we expect in terms of distance between a pair of random processors.

Definition 3. The average distance (also called the average path length) in a graph G with N vertices,denoted by `(G) is defined by

`(G) =2

N(N − 1)

∑1≤i<j≤N

dG(i, j)

(i.e. the sum of all distances between pairs of vertices divided by the number of pairs of vertices).

For K2n , computing the average distance is easy: every pair of vertices are at distance 1, so `(K2n) = 1.For the path, it is a little more complicated, but the formula is simple, `(P2n) = (2n + 1)/3. Hence theaverage communication time in a path is still linear in the number of vertices, which is not acceptableagain.

Exercise. Redo the same analysis with the cycle C2n defined by V (C2n) = {1, . . . , 2n} and E(C2n) ={{i, j}, s.t. j = 1 + 1} ∪ {1, 2n}.

Hypercubes

Hypercubes are graphs with many applications in theoretical computer science and discrete mathe-matics. In particular, they have been widely considered as parallel computers architectures.

Definition 4. The hypercube of dimension n, Qn is defined by V (Qn) = {1, . . . , 2n} and E(Qn) ={{i, j} s.t. the binary representation of i and j on n bits differ in a single bit}.

For example, vertices 1 and 5 are adjacent in Q4 as their binary representations are respectively0001 and 0101 and they differ only by the bit in position 2, while 1 and 2 are not adjacent in Q4

because their respective binary representations are 0001 and 0010, which differ in two positions. Forillustrations of hypercubes, I refer you to your class notes. Below is a property we will need and thatwe have seen in class (and it is easy to prove).

Property 1. Qn is n-regular.

Definition 5. The Hamming distance dH(s, t) between two binary sequences s and t of the samelength is the number of positions where they differ.

For example, dH(0010101, 1001100) = 3 because these two binary sequences differ in positions 1, 3, 7.

What are the properties of Qn, with respect to the two objectives of parallel computer architectures,compared to K2n and P2n?

Theorem 1. Let i and j be two vertices of Qn and si, sj their binary representations on n bits. ThendQn(i, j) = dH(si, sj).

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 43: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Proof.

Hypothesis. i and j are two vertices of the hypercube Qn.

Statement. dQn(i, j) = dH(si, sj).

Proof technique. Proof by induction.

1. Induction parameter. We choose to use p = dH(si, sj), that is the hamming distance between thebinary representations of i and j.

2. Base case. If p = dH(si, sj) = 0, then si = sj , so i = j and the distance dQn(i, i) = 0 (there is no edgeto visit to go from i to itself).

3. Induction hypothesis. Let 0 ≤ q ≤ p. If dH(si, sj) = q then dQn(i, j) = q.

4. Inductive case. Assume dH(si, sj) = p + 1.

Let a be a position where si and sj differ. If we swap the bit in position a in si, then we obtain abinary sequence sk that encodes a number k.

By construction of k and definition of the hypercube edges, vertices i and k are adjacent (there is anedge {i, k}).

Now, by construction of k and definition of the Hamming distance, we also have that dH(sk, sj) = p.

We can then apply the induction hypothesis, which implies that dQn(k, j) = p.

Because dQn(i, k) = 1, we then have that dQn(i, j) ≤ p + 1.

To conclude, we only need to remark that dQn(i, j) ≥ p + 1 because no vertex of Qn whose binarystring differs in p+1 positions from si can be reached from i in visiting less than p+1 edges. (I agreeI cut the corners a little short here. Exercise. Write the proof of this claim properly).

Hence p + 1 ≤ dQn(i, j) ≤ p + 1, so dQn(i, j) = p + 1.

What can we deduce from this Lemma? The maximum distance between two vertices of Qn can ben, as two binary strings of length n can differ in at most n positions. hence, d(Qn) = n. This is wellbetween the horrible diameter of P2n and the perfect diameter of K2n .

We can also use simple discrete probabilities to investigate the average distance, which is also linearin n.

Theorem 2. The average distance of Qn is `(Qn) = n/2.

Proof.

Hypothesis. None to mention here.

Statement. `(Qn) = n/2.

Proof technique. Proof by deduction.

From Theorem 1, we can say that the average distance in Qn is exactly the average Hamming dis-tance between pairs of binary sequences of length n, or again, the average number of positions wheretwo random binary strings of length n differ.

Let X1, . . . , Xn be random variables, defined as follows: Xi = 1 if bits in position i in two random

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 44: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

binary sequences differ, and Xi = 0 otherwise. It is clear that

P (Xi = 1) = P (Xi = 0) =12

as there are fours cases ((0, 0), (1, 1), (0, 1), (1, 0)), two of them leading to Xi = 1 and two of themleading to Xi = 0.

By definition of the expected value, we then have that, for every i = 1, . . . , n, E(Xi) = 1/2.

By linearity of expected values, the average Hamming distance between random binary strings oflength n is X1 + · · ·+ Xn = n/2.

Hence `(Qn) = n/2.

Finally, what is the number of edges in Qn? We saw it in class, but I redo it here.

Theorem 3.|E(Qn)| = n2n−1

Proof.

Hypothesis. None to mention here.

Statement. |E(Qn)| = n2n−1.

Proof technique. Proof by deduction.

We know that ∑v∈V (Qn)

deg(v) = 2|E(Qn)|.

We also know from Property 1 that Qn is n-regular. So, for every vertex v of Qn, we have thatdeg(v) = n.

So ∑v∈V (Qn)

deg(v) = n2n.

Finally n2n = 2|E(Qn)| ⇒ |E(Qn)| = n2n−1.

Conclusion

Here are the properties of the possible parallel computer architecture we considered, all on 2n ver-tices/processors.

Graph Number of edges Diameter Average distanceK2n O(22n−1) 1 1P2n 2n − 1 2n − 1 (2n + 1)/3C2n

Qn n2n−1 n n/2

Make your choice, but for me, the hypercube is a winner. For example, check which numbers we getif n = 10, that is our computer has 1024 processors.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 45: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Eulerian Trails and CircuitsDefinition 1. A graph G = (V,E) has a Eulerian trail, if there is a trail in G that visits all edges ofG.

Definition 2. A graph G = (V,E) has a Eulerian circuit, if there is a circuit in G that visits all edgesof G.

Reminder. A trail or circuit can visit a same vertex more than once, but can not visit the same edgetwice or more.

Theorem 1. Let G = (V,E) be a connected (undirected) graph. G has an Eulerian circuit if and onlyif each vertex of G has even degree.

Here, we want to prove two statements in fact:S1. If G has a Eulerian circuit, then each vertex of G has even degree.S2. If each vertex of G has even degree, then G has a Eulerian circuit.

So we will need to consider a proof for each.

Proof of S1.

Hypothesis.H1. G is a connected graph.H2. G can have multiple edges and loops.H3. G has a Eulerian circuit.

Statement. Each vertex of G has even degree.

Proof technique. Deduction.

Let C = (e1, . . . , em) be a Eulerian circuit in G (G has m edges and each ei = {v1i , v

2i } is a different

edge between vertices v1i and v2

i ). Let S = (v11, v

21, v

12, v

22, . . . , v

1m, v2

m) be the sequence of vertices definedby C, of length 2m.

The following claim follows from the fact that C visits all edges of G and from the definition of thedegree of a vertex: for any vertex v of C, deg(v) is the number of times v appears in S.

By definition of a Eulerian circuit, S has the following properties:

• if ei is a loop then v1i = v2

i

• for all i = 1 . . . , m− 1, v2i = v1

i+1

• v2m = v1

1.

Note. If these properties are not obvious to you, draw a small graph with a Eulerian circuit.

It follows from these properties that every vertex v of G appears an even number of times in S, whichimplies that every vertex v of S has an even degree.

Proof of S2.

Hypothesis.H1. G is a connected graph.H2. G can have multiple edges and loops.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 46: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

H3. Every vertex of G has even degree.Without loss of generality, we assume that the vertices of V are labeled by 1, . . . , n.H4. V (G) = {1, 2, . . . , n}

Statement. G has a Eulerian circuit.

Proof technique.

1. Induction parameter. The number m of edges in G.

2. Base case. Assume m = 1.

Because G is connected (hypothesis H1), G has a single vertex v and a single edge {v, v}, so this edgein itself is a Eulerian circuit.

3. Induction hypothesis. If G is a graph with ≥ m ≥ k edges, and hypothesis H1, H2, H3 are satisfied,then G has a Eulerian circuit.

4. Induction step. Assume G is a graph with k + 1 edges and hypothesis H1, H2, H3 are satisfied.

There are three possible configurations for vertex 1 in G:

• either 1 belongs to a loop {1, 1},

• or there is no loop {1, 1} and 1 has a single neighbor v, or

• or there is no loop {1, 1} and 1 has at least two neighbors.

These three cases are clearly exclusive of each other, and every graph G satisfies exactly one of thesecases. We will check that, in each case, G contains a Eulerian circuit.

Remark. Note that now we want again to deduce a statement (G has a Eulerian circuit) from a set ofhypothesis (H1, H2, H3, H4 and the induction hypothesis), so we need to decide on a proof techniqueto do this. Here we will use deduction.

1. First, assume G contains a loop e = {1, 1}. Let G′ = G − e. As we removed one loop from G, bythe definition of the degree of a vertex and hypothesis H3, we have that every vertex in G′ has evendegree and is connected.

Moreover, G′ has k edges. So by the induction hypothesis, G′ has a Eulerian circuit that visits vertex1. Let C ′ be such a circuit, C ′ = (e1, . . . , ek), with e1 = {1, v} and ek = {w, 1}.

By construction, C = (e, e1, . . . , ek) = e.C ′ is then a Eulerian circuit in G.

2. Now assume that G does not contain a loop {1, 1} and 1 has a single neighbor v.

From H3, 1 has even degree, so there is an even number of edges {1, v} in G (say 2p).

Let G′ = G − {1} (i.e. we remove all edges {1, v} and the vertex 1 from G). By construction, G′ isconnected and all its vertices have even degree (we removed an even number of edges, all incident tov, that had an even degree in G).

So, by induction hypothesis, G′ contains a Eulerian circuit. Let C ′ be such a circuit, C ′ = (e1, . . . , e`),with e1 = {v, w} and e` = {y, w} and ` ≤ k − 1 (because we removed at least two edges from G and G′

has k + 1 edges).

Then, by construction, C = {1, v}, {1, v}, . . . , {1, v}, e1, . . . , e` is a Eulerian circuit in G.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 47: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

3. Finally, assume that G does not contain a loop {1, 1} and 1 has at least two neighbors. Let u and vbe two of these neighbors.

Let G′ = G − {{1, u}, {1, v}} ∪ {u, v} (we remove edges {1, u}, {1, v} and add one edge {u, v}). Again,in G′ all vertices have even degree, by construction and hypothesis H3. G′ has also m− 1 edges.

If G is connected, then we can apply the induction hypothesis, and claim that G′ contains a Euleriancircuit C ′ = (e1, . . . , em−1), and we can assume that e1 = {u, v}.

If G′ is not connected, then G′′ = G′ − 1 (G′ where the disconnected vertex 1 is removed) is connectedand has m− 1 edges and all vertices of even degree. So we can apply the induction hypothesis on G′′

it contains a Eulerian circuit C ′ = (e1, . . . , em), with e1 = {u, v}.

In both cases, by construction, C = ({1, v}, e2, . . . , em−1, {u, 1}) is a Eulerian circuit in G.

Corollary 1. Let G = (V,E) be a connected (undirected) graph. G has an Eulerian trail, that is nota Eulerian circuit, if and only if G has exactly two vertices of odd degree.

Here again, we want to prove two statements in fact:S3. If G has a Eulerian trail, then G has exactly two vertices of odd degree.S4. If G has exactly two vertices of odd degree, then G has a Eulerian trail.

Proof of S3.

Hypothesis.H1. G is a connected graph.H2. G can have multiple edges and loops.H3. G has a Eulerian trail that is not a Eulerian circuit.

Statement. G has exactly two vertices of odd degree

Proof technique. Deduction.

Let T = (e1, . . . , em) be a Eulerian trail in G. Assume e1 = {u, v} and em = {x, y}. By definition of atrail, u 6= y.

Let G′ = G ∪ {u, y} (add an edge {u, y} in G).

By construction, C = ({y, u}, e1, . . . , em) is a Eulerian circuit in G′.

So by Theorem 1, all vertices in G′ have even degree.

As we added only one edge in G between distinct vertices u and y, we deduce that all vertices of Gbut u and y have even degree, and that u and y have odd degree.

Proof of S4.

Hypothesis.H1. G is a connected graph.H2. G can have multiple edges and loops.H3. Every vertex of G has even degree but two that have odd degree.

Statement. G has a Eulerian trail.

Proof technique. Deduction.

Assume the two vertices of G with odd degree are u and v.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 48: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Let G′ = G ∪ {u, v}. Let e = {u, v} be the added edge in G.

By construction, in G′ all vertices have even degree.

By Theorem 1, G′ contains a Eulerian circuit C = (e, e1, . . . , em).

By construction, T = (e1, . . . , em) is then a Eulerian trail in G.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 4

Page 49: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Planar Graphs

Description Collected wisdom on planar graphs, and how to determine whether or not a givengraph is planar

Definitions

• A graph is planar if it can be drawn in the plane without any of the edges crossing.

• Any drawing of a graph without crossed edges is called a planar embedding.1

• The graph G′ obtained by subdivision of an edge {x, y} in G is the graph G′ = (V ′, E′) such thatV ′ = V ∪ z and E′ = E \ {x, y}∪{x, z}∪{z, y}. Essentially you add a vertex smack in the middleof the edge {x, y}:• − • is subdivided to • − • − •.

• A region or face of a planar embedding is a minimal area enclosed by edges. The degree of aregion is the number of edges enclosing a region. We denote it deg(r).

• The dual of a planar embedding of G = (V,E) with re-gions R is the graph Gd = (R,E′) where {r1, r2} ∈ E′ ifthey share an edge on their respective boundaries. Thefollowing figure illustrates a graph and its dual. Remark(Gd)d = G.

TWO EXAMPLES OF GRAPH EMBEDDINGS AND

THEIR DUALS.

1We consider the plane as opposed to other surfaces, such as the torus (donut). You may be able to draw a graph thathas no planar embedding on a torus such that no edges cross. This is clearly beyond the scope of this class.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 50: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Useful Theorems

Theorem K5 is not planar.

Theorem K3,3 is not planar.

Theorem If G contains a non-planar graph as a subgraph, then G is not planar.

Kuratowski’s Theorem A finite graph is planar if and only if it does not contain a subgraph thatis a subdivision of K5 or K3,3.

Theorem Let r be the set of regions in a planar embedding of G. Then∑

r∈R deg(r) = 2|E(G)|.

Euler’s Formula. Given a planar embedding of G, let r be the number of regions, e be the numberof edges and v be the number of vertices. Then:

v + r − e = 2.

Corollary 1 If G is a simple graph and has at least three vertices, then if e is the number of edgesand v the number of vertices:

e ≤ 3v − 6.

Corollary 2 If G has at least four vertices, and has no triangles, multiple edges or loops, then if e isthe number of edges and v the number of vertices:

e ≤ 2v − 4.

Theorem Let G be a planar simple graph. Then G contains at least one vertex of degree 5 or less.

Proof.Hypothesis. H1. G is a simple graph. H2. G is planar.

Statement. G has at least one vertex of degree 5 or less.

Remark. We can also notice that, ifG has less than three vertices, the statement holds obviously.So we add one hypothesis:H3. G has at least three vertices.

Proof technique. Contradiction.We add an additional hypothesis, that is the negation of the statement to prove.H4. All vertices of G have degree 6 or more.

Proof steps. From H4, the number of edges of G is at most 6v/2: e ≥ 3v.

From H1, H2 and H3, G staisfies the hypothesis of Corollary 1. So we can use this result:e ≤ 3v − 6.

We combine these two inequalities: 3v ≤ e ≤ 3v − 6.

So if all four hypothesis are true, we have 3v ≤ 3v − 6, which is obviously impossible: we havefound a contradiction, and we can then say that hypothesis H4 is wrong.

4-colour Theorem Any planar graph has a proper vertex colouring using at most 4 colours. Thatis, χ(G) ≤ 4 for all planar G.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 51: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Is it or isn’t it? Deciding planarity.

How to answer to a question: is a given graph G planar?

If you think G is planar...

1. Try to draw a planar embedding of G. This is the surest proof that a graph is planar.

If you doubt that G is planar...

1. Check the inequalities in Corollaries 1 and 2. If these inequalities do not hold, then you aredone. Remark, if they do hold, you can conclude nothing.

2. Try to find K5 or K3,3 subdivision as a subgraph. If the maximum degree is 3, then look for K3,3,since a K5 sub-division will require 5 vertices of degree 4.

Examples

The following graph is planar because there is a planar embedding.

The following graph is not planar because it contains a subgraph isomorphic to a subdivisionof K5.

K5 is not planar K5 has 5 vertices and 10 edges. We see that 3v − 6 = 9 < 10 = e, hence it is notplanar.

K3,3 is not planar K3,3 has no triangles since it is bipartite, has 6 vertices and 9 edges. 2v − 4 =8 < 9 = e, hence it is not planar.

The Petersen graph is not planar We can find a subdivision of K3,3.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 52: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Depth-First Search and Breadth-First Search Spanning Trees

Description The Depth-First-Search and Breadth-First-Search algorithms to compute spanningtrees.

Introduction.

We consider a connected graph G = (V,E), such that |V | = n and its n vertices are denoted {1, . . . , n}.We want to compute a spanning tree T = (T, ET ) of G. By definition of a spanning tree, T = V andthe problem is then to compute the n − 1 edges of ET . The two approaches we describe in this notesare the Depth-First Search (DFS) and the Breadth-First Search (BFS).

Why is-it important to compute a spanning tree of a graph? Think for example to a communicationnetwork, modeled by a graph with n vertices, where each vertex represents a computer and eachedge a cable linking two computers. You have two kinds of cables, expensive ones that never fail,and cheap ones that can fail. By using n− 1 expensive and robust cables such that the correspondingedges form a spanning tree of the graph, then, as a tree is connected, you are sure that at any timethere will always be a path between any two computers, even if all cheap cables have failed. Moregenerally, many graph algorithms require to know a spanning tree in order to be implemented in anefficient way.

We will first describe the two algorithms, then discuss some properties.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 53: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

The DFS algorithm.

1. Let v = 1 and ET = ∅. Mark 1 as visited.

2. Let i be the smallest neighbor of v that has not been visited.

(a) Mark i as visited.

(b) Add the edge {v, i} to ET and call v the parent of i in T , denoted v = pT (i).

(c) Let v = i

(d) Return to step 2.

3. If all neighbors of v have been visited

(a) If v = 1 then stop (ET contains n− 1 edges)

(b) Else return to step 2 with v replaced by its parent p(v) (this step is the backtrack step).

Why does this algorithm compute a spanning tree of G?

• First we can notice that this algorithm visits all vertices. Indeed, assume a vertex j is nevervisited. As G is connected, there is a path that connects j to 1, and without loss of generalitywe can assume that all vertices on this path but j have been visited (otherwise, we considerinstead of j the unvisited vertex that is closest to 1). Then the vertex preceding j on this pathwas visited, during step 2 of the algorithm, and by definition of this step, j should have beenvisited, which contradicts our assumption that j was not visited. So every vertex of V is visited(and incidentally the algorithm terminates, which is an important property of an algorithm).

• Moreover, by definition of step 2, when a vertex, but 1, is visited for the first time, an edge isadded to ET . So after visiting all n vertices, |ET | = n− 1.

• Finally (T, ET ) is acyclic. Indeed, if adding an edge {v, i} during step 2 when visiting i for thefirst time, creates a cycle, this implies that i has already been visited (because some edge isincident to it already, otherwise we would not create a cycle), and then, again by definition ofstep 2, i would not be considered as an unvisited neighbor of v, and then adding such an edge icontradicts the algorithm.

• To summarize, we just proved that T = (T, ET ) is a graph with n vertices, n− 1 edges and thatis acyclic, so it is a tree (Theorem 12.5), and then, as T = V , a spanning tree of G.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 54: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

The BFS algorithm.

This algorithm requires an additional data structure, a queue Q, such that vertices enter Q by theend and exit it by the beginning (this is the definition of a queue, think about when you take the bus:first in, first out).

1. Let v = 1, ET = ∅ and Q = ∅. Insert 1 in Q and mark 1 as visited.

2. While Q is not empty do

(a) Let v be the vertex at the beginning of Q (the first vertex in Q).(b) Remove v from Q

(c) For each unvisited neighbor i of v doi. Insert i at the end of Q and mark i as visited.

ii. Add the edge {v, i} to ET .

To show that this algorithm terminates and computes a spanning tree of G, the proof is similar thanfor the DFS algorithm: (1) every vertex is visited, as it is linked by a path to 1, and at the first visit,an edge is added to ET , which implies that (2) |ET | = n − 1, and (3) a cycle can be created only byadding an edge between two already visited vertices, which is in contradiction with the definition ofstep 2 that creates an edge between an already visited vertex and a vertex that is just visited.

Discussion.

These two algorithm follow a common general “local approach”: at every time, there is a currentvertex (denoted v) and its neighbors are considered to look for unvisited neighbors; this commongeneral “local approach” explains why the same validity proof applies to both algorithms. Also, inboth cases, the computed spanning tree could be different if the starting vertex is not 1.

However, they differ in a very important aspect, that is the way siblings and children are considered.If you consider the resulting spanning trees (say TD for the tree computed using the DFS algorithmand TB for the tree computed using the BFS algorithm), and use 1 as the root for both trees, then

• in TD, if a vertex i has a vertex j for sibling, with i < j, then all the vertices in the subtree ofTD rooted at i have been visited (during the DFS algorithm) before j is visited;

• in TB, if a vertex i has a vertex j for sibling, with i < j, then j has been visited (during theBFS algorithm) before any vertex in the subtree of TB rooted at i is visited; more generally, allvertices of level h in TB have been visited before the vertices of any level h′ > h.

This difference explains the name of both algorithms: in the DFS algorithm, one first go deep (inthe higher levels) in the computed tree, while in the DFS algorithm, one first complete a given levelbefore visiting the higher levels.

For the algorithms aficionados, note that the DFS algorithm can be seen as an algorithm using astack data structure (Last in, First out), where the current vertex is stacked at the first visit andunstacked when all its neighbors have been visited. This points at a very general link between datastructures such as stacks and queues and tree traversals.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 55: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker
Page 56: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker
Page 57: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Huffman Coding

Description How to encode strings using Huffman coding

Goal

Encode a text with a binary string in a manner that is efficient, and uniquely decodable.

Anti-example #1: a 7→ 1 b 7→ 10 c 7→ 11. This is efficient, but we cannot tell if the coded string 1110encodes aab or cb. A code word is not uniquely decodable.

Anti-example #2: Make each string 5 bits long. Then a string is uniquely decodable by cutting it intosegments of 5 bits long each. a 7→ 00000 b 7→ 00001 c 7→ 00010 . . . Then, to decode 000100000000001 =00010 00000 00001 = cab. But, this is not efficient: A word of length n is encoded by a binary string oflength 5n.

We can do better.

Huffman coding

The idea is to use complete binary trees to construct a coding scheme. A complete binary tree withn leaves can encode an n-letter alphabet, by labelling the leaves with the letters, and using the pathfrom the root (left child=0; right child =1) to encode the letter. Huffman coding uses letter frequencyin the text to decide the shape of the tree so that the average coded length of a text is minimized. Weuse a letter weight function or table to keep track of the weight of a letter.

Algorithm Description

input: Alphabet A; Letter weight function σ : A→ Routput: A Huffman coding tree W whose set of leaves is exactly A.

1. For each letter a in A make a tree consisting of a single vertex labelled with its weight σ(a). LetL be the list of trees, in increasing order of weight of the root vertex.

2. If there is a single entry in L, output this tree.

3. Otherwise, choose the smallest two trees W1 and W2 and make a tree W with a root, left child= W1, right child = W2.

4. Label the root of W by the sum of the weights of the root of W1 and the root of W2.

5. Insert W into the list in the correct place in L with respect to this weight.

6. Go to Step 2.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 58: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Remark

If we start with a desired text, the optimal strategy makes the weight function the frequency of theword in the text. Otherwise, we can use a generic letter frequency table for the english language.

Example

Encode the phrase “bananas in pyjamas”

Input:Letters a b n s i p y j m “space”Frequency/Weight 5 1 3 2 1 1 1 1 1 2

Steps:

1. L = [(b, 1), (i, 1), (p, 1), (y, 1), (j, 1), (m, 1), (s, 2), (“space”, 2)(n, 3), (a, 5)].

2. After a three iterations we have

L =

(s, 2)2↙↘b i

,2↙↘p y

,2↙↘j m

, (n, 3), (a, 5), (“space”, 2)

3. After a two more we have:

L =

2↙↘j m

, (n, 3),4↙↘

s “space”

4↙↘

2↙↘b i

2↙↘p y

, (a, 5)

4. The final tree looks like:

Now we making the coding table:Letters a b n s i p y j m “space”Binary string encoding 00 1100 011 100 1101 1110 1111 0100 0101 101

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 59: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Finally we code the string:

bananas in pyjamas = 1100 00 011 00 011 00 100 101 1101 ...

The length of this string is the weight of the coding tree:

length =∑x∈A

height(x) · σ(x) = 2(5) + 4(1) + 3(3) + 3(2) + 4(1) + 4(1) + 4(1) + 4(1) + 4(1) + 3(2) = 55.

If we had done a uniform scheme (the approach in the second “anti-example”) we would have required4 bits per letter (since there are 10 distinct letters/symbols.). The phrase as 18 letters long, so it wouldhave required a string of length 72.

Advanced thoughts Compare this example to a phrase 18 characters long, comprised of 18 dif-ferent characters (e.g. abcde...pqr). How compressed is the encoded version of this phrase? Whataccounts for improved compression in the Huffman scheme?

How to the frequencies of letters we used in the example compare to the expected frequency inEnglish?

Appendix: English language letter frequencies

Letter Frequency Letter Frequencya 0.08167 n 0.06749b 0.01492 o 0.07507c 0.02782 p 0.01929d 0.04253 q 0.00095e 0.12702 r 0.05987f 0.02228 s 0.06327g 0.02015 t 0.09056h 0.06094 u 0.02758i 0.06966 v 0.00978j 0.00153 w 0.02360k 0.00772 x 0.00150l 0.04025 y 0.01974m 0.02406 z 0.00074

Source: http://pages.central.edu/emp/LintonT/classes/spring01/cryptography/letterfreq.html

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3

Page 60: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Dijkstra’s shrotest path algorithm

Introduction.

We consider a connected graph G = (V,E), such that |V | = n and its n vertices are denoted {1, . . . , n}.Edges of G are weighted by positive integers. The weight of an edge e is denoted by w(e).

The length of a path P = {v0, v1}, {v1, v2}, . . . , {vk−1, vk} is the sum of the weights of the edges itcontains: w(P ) =

∑e∈P w(e) = w({v0, v1}) + w({v1, v2}) + . . . + w({vk−1, vk}).

For two vertices u and v of G, we denote by d(u, v) the distance between u and v, that is the length ofthe shortest path between u and v.

We want to compute, for given vertex v of G the list of distances to all other vertices: ∪u∈V d(v, u).

Dijkstra’s algorithm.

Input. G = (V,E), v ∈ V .

Preamble. To each vertex u of G, we associate a pair pu = (L(u), u′) that represents the followinginformation: (1) L(u) is the length of the shortest known path P between u and v (if no path betweenu and v isd known, we have L(u) = ∞), (2) u′ is the vertex on P that is just before u (if no pathbetween u and v isd known, we have u′ = −).

The principle of the algorithm is to incrementally build a set of vertices S such that, for u ∈ S,L(u) = d(u, v) (i.e. we know the length of the shortest path between u and v).

Notation. If S ⊆ V is a subset of vertices of V , then S = S − V is the complement of S.

Algorithm.

1. Initialisation.

(a) Let v0 = v. pv0 = (0,−) (there is no vertex on the path between v0 and itself).(b) For each u ∈ V − {v0} do pu = (∞,−).(c) S0 = {v0}.

2. Main loop.

(a) For i from 1 to |V | − 1 doi. For each edge e = {u, x} ∈ E such that u ∈ Si−1 and x ∈ Si−1 do

A. ` = min(L(x), L(u) + w(e))B. If L(x) > ` then px = (`, u)

(b) Let vi be a vertex of Si−1 such that L(vi) is minimum (among all vertices of Si−1).(c) Si = Si−1 ∪ {vi} (i.e. add vi to S).

Theorem. At the end of Dikstra’s algorithm, for every vertex u ∈ V , if pu = (L(u), u′), then L(u) =d(u, v) and u′ is the vertex on that is just before u on a shortest path between u and v.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 61: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Kruskal and Prim algorithms

Introduction.

We consider a connected graph G = (V,E), such that |V | = n and its n vertices are denoted {1, . . . , n}.Edges of G are weighted by positive integers. The weight of an edge e is denoted by w(e).

The weight of a spanning tree T of G composed of n− 1 edges T = (V, {e1, . . . , en−1}) is the sum of theweights of these edges:

w(T ) =n−1∑i=1

w(ei).

We want to compute a spanning tree T of G of minimum weight. We will see two algorithms, due toJ. Kruskal (1956) and R. Prim (1957).

Kruskal’s algorithm.

Input. G = (V,E).

Principle. We construct iteratively a set ET of edges that is acyclic.

Algorithm.

1. Initialisation.

(a) Let ET = ∅.(b) Add to ET an edge of E of minimum weight. Call it e1.

2. Main loop.

(a) For i from 1 to |V | − 2 do (Comment: assume ET = {e1, . . . , ei})i. Let e be an edge of E − ET that satisfies

A. (V,ET ∪ {e}) is acyclic,B. e is of minimum weight among all edges of E−ET that satisfies the above property.

ii. Add e to ET and denote it by ei+1.

Theorem. Kruskal’s algorithm terminates and at the end (V,ET ) is a spanning tree of G of minimumweight.

Proof. Part 1. We first prove the following statement: if the algorithm terminates, then (V,ET ) is aspanning tree of G.

Proof technique: proof by deduction, that uses one of the many definition of trees se have seen.

Hypothesis: The only hypothesis we have from the statement is that the algorithm terminates, whichis equivalent to: n− 2 iterations of the main loop are performed.

If the algorithm terminates, |ET | = n − 1, as we start the main loop with |ET | = 1, we add one edgeto ET at every iteration of this loop and, by hypothesis, we perform n− 2 iterations of this loop.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 1

Page 62: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Moreover, by construction, (V,ET ) is acyclic. So it is a tree, and as it contains all vertices of G, it is aspanning tree of G.

Proof. Part 2. Now, we want to prove that the algorithm terminates, that is that it performs n − 2iterations of the main loop.

This is equivalent to the following statement: for every 1 ≤ i ≤ n− 2, there exists an edge in E − ET

that can be added to ET without creating a cycle.

Hypothesis: (1) G is connected, (2) 1 ≤ |ET | ≤ n− 2 (if |ET | = n− 1, we are done with the main loop).

Proof technique: contradiction (simpler than the induction seen in class).Contradiction hypothesis: (3) assume that every edge of E − ET creates a cycle with ET .This implies that for every edge e = {x, y} ∈ E−ET , there exists at least one edge in ET that containsx (respectively y).Hence (V,ET ) is a spanning subgraph of G: every vertex of G belongs to at least one edge in ET .However, |V | = n and by hypothesis (2), |ET | < n− 1, so (V,ET ) is not connected.By hypothesis (1), G is connected, so there is then at least one edge e in E − ET that connects twoconnected components of (V,ET ).By definition of connectivity, this implies this edge e does not create a cycle with ET , which contradictshypothesis (3).

Proof. Part 3. We now turn prove that (V,ET ) is a minimum weight spanning tree of G.

Hypothesis: (1) for every i, ei is an edge of minimum weight that does not create a cycle with ET .

Proof technique: contradiction.

Contradiction hypothesis: (2) there exists a minimum weight spanning tree T ′ = (V,E′) whose weightis smaller than the weight of T .

Let ET = {e1, . . . , en−1}: as T 6= T ′, we can assume that there exist k such that {e1, . . . , ek} ⊂ E′ andek+1 /∈ E′.

Without loss of generality, we can assume that k is maximal, which adds a new hypothesis: (3) thereis no minimum weight spanning tree T ′′ = (V,E′′) such that {e1, . . . , e`} ⊂ E′′ and ` > k.

We now turn to a sequence of deductions that uses these hypothesis and some results on trees to finda contradiction.As T ′ is a tree, by definition, (V,E′ ∪{ek+1}) contains a single cycle C (Theorem 12.5 of the textbook).At least one edge f of C does not belong to {e1, . . . , ek}, by hypothesis (1) and the fact that ek+1 waspicked by the algorithm.Let T ′′ = (V,E′ − {f} ∪ {ek+1}) (i.e. remove edge f from E′ and add edge ek+1).T ′′ is a tree: it contains n−1 edges and removing f opened the only cycle there was in (V,E′∪{ek+1}).By construction, f /∈ {e1, . . . , ek}, {e1, . . . , ek} ⊂ E′ and f ∈ E′, so {e1, . . . , ek, f} ⊂ E′. As {e1, . . . , ek, f}is acyclic, by hypothesis (1), w(f) ≥ w(ek+1).Combined with hypothesis (2), this implies than the weight of T ′′ is equal to the weight of T ′, whichalso implies that w(f) = w(ek+1).But T ′′ is a minimum spanning tree that has k + 1 edges in common with T , which contradictshypothesis (3). This concludes the proof.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 2

Page 63: MACM 201 Fact Sheets Cedric Chauve and Marni Mishnapeople.math.sfu.ca/~kya17/teaching/201_fact_sheets.pdf · Week Date Sections from FS2009 Part/ References Topic/Sections Notes/Speaker

Week Date Sections from FS2009

Part/ References Topic/Sections Notes/Speaker

1 Sept 7 I.1, I.2, I.3 Combinatorial StructuresFS: Part A.1, A.2Comtet74Handout #1(self study)

Symbolic methods

2 14 I.4, I.5, I.6 Unlabelled structures

3 21 II.1, II.2, II.3 Labelled structures I

4 28 II.4, II.5, II.6 Labelled structures II

5 Oct 5 III.1, III.2 Combinatorial parametersFS A.III(self-study)

Combinatorial Parameters Asst #1 Due

6 12 IV.1, IV.2 Multivariable GFs

7 19 IV.3, IV.4 Analytic MethodsFS: Part B: IV, V, VI Appendix B4Stanley 99: Ch. 6Handout #1(self-study)

Complex Analysis

8 26IV.5 V.1

Singularity Analysis

9 Nov 2 Asymptotic methods Asst #2 Due

109 VI.1 Sophie

12 A.3/ C

Random Structures and Limit LawsFS: Part C(rotating presentations)

Introduction to Prob. Mariolys

1118 IX.1 Limit Laws and Comb Marni

20 IX.2 Discrete Limit Laws Sophie

1223 IX.3 Combinatorial

instances of discrete Mariolys

25 IX.4 Continuous Limit Laws Marni

13 30 IX.5 Quasi-Powers and Gaussian limit laws Sophie

14 Dec 10 Presentations Asst #3 Due

Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITYVersion of: 11-Dec-09

f acul ty of sc ience MATH 895-4 Fall 2010depar tment of mathemat ics Course Schedule MACM 201 FACT SHEET

Prim’s algorithm.

Input. G = (V,E).

Principle. We construct iteratively a set ET of edges that is connected.

Note that this principle is similar to the one of Kruskal’s algorithm once we replace “acyclic” by“connected”, which are both the fundamental properties of trees.

Algorithm.

1. Initialisation.

(a) Let ET = ∅.(b) Let v1 = 1, VT = {v1} and N = V − VT (P contains an arbitrary vertex of G).

2. Main loop.

(a) For i from 1 to |V | − 1 do (Comment: assume VT = {v1, . . . , vi} and ET = {e1, . . . , ei−1})i. Let e = {x, y} be an edge of E − ET that satisfies

A. x ∈ VT , y /∈ VT

B. e is of minimum weight among all edges of E−ET that satisfies the above property.ii. Add e to ET and denote it by ei.

iii. Add y to VT (and remove it from N ) and denote it by vi+1.

Theorem. Prim’s algorithm terminates and at the end (V,ET ) is a spanning tree of G of minimumweight.

To prove that the algorithm computes a spanning tree (V,ET ), we only need to prove that, for everyi, there is an edge of E − ET that can be added to ET while keeping VT , ET ) connected. Once it isestablished, it implies that (V,ET ) contains n vertices and n − 1 edges and is connected, so it is aspanning tree of G.

The difficult part is to ensure it is of minimum weight, which is addressed in agreedy way by thealgorihtm: at each iteration we add to ET the edge of smaller weight that keeps the subgraph (VT , ET )connected.

CEDRIC CHAUVE, SUMMER 2010 (ADAPTED FROM MARNI MISHNA, SPRING 2010) 3