combinatorics and graph theory workbook · combinatorics and graph theory ... chapter 11 –...

115
Combinatorics and Graph Theory Workbook Note to Students (Please Read): This workbook contains examples and exercises that will be referred to regularly during class. YOU WILL BE EXPECTED TO HAVE THE RELEVANT PORTIONS OF THIS WORKBOOK WITH YOU FOR EVERY CLASS SESSION. To Print Out the Workbook. Go to the web address below http://www.sonoma.edu/users/l/lahme/m316/ and click on the link “Math 316 Workbook”, which will open the workbook as a .pdf file. *A special thanks to Dr. Izabela Kanaana for generously sharing her class notes and activities, which greatly helped in the preparation of this workbook.

Upload: buiminh

Post on 10-Jun-2018

240 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Combinatorics and Graph Theory

Workbook∗

Note to Students (Please Read): This workbook contains examples and exercises thatwill be referred to regularly during class. YOU WILL BE EXPECTED TO HAVE THE RELEVANTPORTIONS OF THIS WORKBOOK WITH YOU FOR EVERY CLASS SESSION.

• To Print Out the Workbook. Go to the web address below

http://www.sonoma.edu/users/l/lahme/m316/

and click on the link “Math 316 Workbook”, which will open the workbook as a .pdf file.

*A special thanks to Dr. Izabela Kanaana for generously sharing her class notes and activities, which greatlyhelped in the preparation of this workbook.

Page 2: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

2 Sonoma State University

Table of ContentsChapter 1 – What Is Combinatorics? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Chapter 2 – The Pigeonhole Principle

Sections 2.1 & 2.2 – Pigeonhole Principle: Simple and Strong Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Chapter 3 – Permutations and Combinations

Sections 3.1-3.3 – Counting Principles, Permutations, and Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Sections 3.4 & 3.5 – Permutations and Combinations of Multisets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Chapter 5 – The Binomial Coefficients

Sections 5.1 & 5.2 – Pascal’s Formula and the Binomial Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Section 5.3 – Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Chapter 6 – The Inclusion/Exclusion Principle and Applications . . . . . . . . . . . . . . . . . . . . . . . . 37

Chapter 7 – Recurrence Relations and Generating Functions

Sections 7.1 & 7.2 – Recurrence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Section 7.4 – Generating Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Chapter 9 – Matchings in Bipartite Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Chapter 11 – Introduction to Graph Theory

Section 11.1 – Basic Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Section 11.2 – Eulerian Trails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Section 11.3 – Hamilton Chains and Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Section 11.4 – Bipartite Multigraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Section 11.5 & 11.7 – Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Chapter 13 – More on Graph Theory

Section 13.1 – Chromatic Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Section 13.2 – Plane and planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Section 13.3 – A Five-Color Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??

Page 3: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 3

Chapter 1 – What is Combinatorics?

Preliminary Exercise. Two experimental courses,Course A and Course B, are to be taught in the math and statis-tics department in each of 3 consecutive semesters. During eachsemester, three sections of each course will be taught, each bya different instructor. Nine faculty members have agreed toparticipate in the experiment, and each of the nine will teachCourse A once and Course B once. Can a teaching schedule bemade so that, during all three semesters, Courses A and B willboth be taught by professors of three different ranks (assistant,associate, and full) and of three different concentration areas(stats, teaching, and pure)? If so, indicate how the scheduleshould be made.

Fall 2011• Course A Instructors:• Course B Instructors:

Spring 2012• Course A Instructors:• Course B Instructors:

Fall 2012• Course A Instructors:• Course B Instructors:

Note: Before starting this excercise, you’ll be given a list of the 9 participating instructors, with their rankings(indicated by color) and their concentration areas (indicated by the letters P, S, and T).

Page 4: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

4 Sonoma State University

Definition. A Latin square of order n > 1 is an n×n matrix that contains each of the integers 1, 2, 3, . . . , nexactly one time in each row and in each column of the matrix. Two Latin squares of order n are calledorthogonal if, when they are juxtaposed, all of the n2 possible ordered pairs (i, j), with i = 1, 2, 3, . . . , n andj = 1, 2, 3, . . . , n, result.

Example 1. Rephrase the preliminary exercise from the previous page using the language of Latin squares.

Some facts about Latin squares

1. Orthogonal Latin squares can be constructed using techniques from modern algebra; in particular, using finitefields.

2. Euler first showed how to construct a pair of orthogonal Latin squares of order n whenever n is odd or is amultiple of 4.

3. Euler correctly conjectured that, for order n = 6, no pair of orthogonal Latin squares exist. This was provenin 1901 by Tarry.

4. Euler incorrectly conjectured that no pairs of orthogonal Latin squares exist for n = 10, 14, 18, 22 . . . . Themathematician/statisticians Bose, Parker, and Shrikhande disproved this conjecture around 1960 by showinghow to construct pairs of orthogonal Latin squares for these values of n.

5. To summarize, it is possible to construct a pair of n× n orthogonal Latin squares for every order except.

Page 5: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 5

Example 2. Construct two orthogonal Latin squares of order 4.

The Map Coloring Problem

Definition. A map in the plane is a subdivision of the plane into simply connected regions called countries.Two countries are called adjacent if they share a common boundary; that is, if they share some portion of aline or a curve. A coloring of the map is an assignment of colors to each of the countries; we call the coloringproper if adjacent countries are always assigned different colors.

Note: Two countries that share only a common point are not considered adjacent.

Example 1. For each of the following maps, find a proper coloring that uses as few different colors as possible.

(a)

Page 6: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

6 Sonoma State University

(b)

(c)

The Map-Coloring Problem. What is the smallest number of colors necessary to guarantee a propercoloring of any map in the plane?

History of the Map-Coloring Problem:

• Problem posed by Francis Guthrie (1852). He noticed that it appeared that four colors would suffice for anymap in the plane.

• Alfred Kempe publishes a widely acclaimed proof of the Four Color Theorem (1879).

• Percy Heawood discovers an error in Kempe’s proof (1890). However, the strategy in Kempe’s invalid proofcan be altered to prove a Five Color Theorem.

• K. Appel and W. Haken successfully prove the Four-Color Theorem (1976). The proof amounted toexhaustive checking of many map configurations, and was unique in that the proof was computer-generatedusing over a thousand hours of computer time!

Page 7: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 7

Combinatorics: concerned with the existence, enumeration, analysis, and optimization of discrete structures

I. Enumeration: Arrangements of the objects of a set into patterns satisfying specified rules

• existence of the arrangements

• enumeration or classification of the arrangements

• study of a known arrangement

• construction of an optimal arrangement

II. Graph Theory

III. Combinatorial Designs

Exercise. (Please do this and turn it in during our next class.)

To the right, a proper four coloring of the contiguous48 U.S. states is shown. Maps like this can be createdat the following website:

http://www.apples4theteacher.com/coloring-pages/usa/regional/usa.html

(a) Can the 48 U.S. states be properly colored usingfewer than four colors? If yes, go to the websiteabove and create and print out such a map (don’tforget Rhode Island!)? If no, find a configurationof states that forces you to use all four colors andexplain.

(b) Now, suppose that we want to also color the region outside of the 48 states (this region is sometimes calledthe “outer country” of a map). Is there a proper way to color the 48 states and the outer region and still useonly four colors? If yes, go to the website above and create and print out such a map. If no, explain why not.

Page 8: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

8 Sonoma State University

Sections 2.1 & 2.2 – The Pigeonhole Principle

Preliminary Exercise. How many people must be in a group in order to guarantee that

(a) at least 2 people in the group were born in the same month?

(b) at least 3 people in the group were born in the same month?

(c) at least 4 people in the group were born in the same month?

(d) at least r people in the group were born in the same month?

The Pigeonhole Principle (Weak Form). If n+1 objects (pigeons)are placed in n boxes (holes), then at least one box must contain two or moreof the objects.

The Pigeonhole Principle (Intermediate Form).If objects are placed in n boxes, then at least one boxmust contain r or more of the objects.

The Pigeonhole Principle (Strong Form). Let q1, q2, . . . , qn bepositive integers.If objects are placed in n boxes, theneither the first box contains at least q1 objects, or the second box contains atleast q2 objects, . . . , or the nth box contains at least qn objects.

Page 9: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 9

Examples and Exercises

1. (Taken from Brualdi) Prove that, for any n+ 1 integers a1, a2, . . . , an+1, there exist two of the integers ai andaj with i 6= j such that ai − aj is divisible by n.

2. Show that if 26 of the first 50 positive integers are chosen, there must be two integers whose sum is 51.

Page 10: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

10 Sonoma State University

3. (Taken from Rosen) During a month with 30 days, abaseball team plays at least 1 game a day, but no morethan 45 total games (see diagram to the right for onepossible schedule). Show that with these conditions, nomatter how the games are scheduled, there must be aperiod of some number of consecutive days during whichthe team plays exactly 14 games.

Tue1 2 3 4 5

6 7 8 9 10 11 12

13 14 15 16 17 18 19

2120 22 23 24 25 26

27 28 29 30

JuneSun Mon Wed Thu Fri Sat

Page 11: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 11

4. (Taken from Rosen) A drawer contains a dozen brown socks and a dozen black socks, none of them joined. Aman takes socks out at random in the dark. How many socks must he take out to be sure he has at least 2 ofthe same color?

5. A community of 82 town houses wants to repaint its houses. What is the maximum number of color choicesthat the residents can be given in order to guarantee that at least 5 houses in the community share a commoncolor?

Page 12: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

12 Sonoma State University

6. Several apples, bananas, and peaches have been sliced, mixed, and are ready to be put in an ambrosia salad.How many total slices of fruit must be put in the salad to guarantee that there are either at least 20 appleslices, at least 10 banana slices, or at least 16 peach slices?

7. At the Lahme family reunion, family members can escape the general mayhem indoors and settle theirdifferences on the back porch with a friendly game of ping pong. Each ping pong game involves exactly twofamily members playing against each other. Show that, after the reunion is over, there are at least two familymembers who have played against the exact same number of different opponents.

Page 13: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 13

Sections 3.1-3.3 – Counting Principles, Permutations, and Combinations

Addition Principle. If an object can be selected from one pile in p ways or from a separate pile in q

ways, then the selection of one object from either of the two piles can be made in p+ q ways.

Multiplication Principle. If a first task has p outcomes and, no matter what the outcome of the firsttask, a second task has q outcomes, then the two tasks performed consecutively have pq different outcomes.

Example 1. There are 10 computer science students, 8 mathematics students, and 4 chemistry students who areeligible to receive scholarships from the School of Science and Technology.

(a) In how many ways can just one student be chosen to receive a scholarship?

(b) In how many ways can one student from each of the three departments be chosen to receive a scholarship?

Example 2. Brigitte wants toast with jam for breakfast. If she can choose from either white or wheat bread,and from either strawberry, blackberry, or raspberry jam, how many different breakfast choices are there?

Page 14: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

14 Sonoma State University

Example 3. How many four letter “words” can be formed using the standard 26 letter English alphabet if

(a) there are no restrictions?

(b) all letters in the word must be distinct?

(c) the word must end with a vowel (a, e, i, o, or u)?

(d) the letters in the word must be distinct and the word must end in a vowel?

Page 15: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 15

Example 4. A math club consists of 5 members: Amy, Bob, Jane, Mary, andPhil.

(a) In how many ways can the math club select a president, vice-president, anda treasurer, assuming that one person cannot serve in multiple positions?

Amy

Phil

Mary

Bob

Jane

(b) In how many ways can the math club choose a committee of 3 to plan the Rick Luttmann fashion show?

ABJ ABM ABP AJM AJP AMP BJM BJP BMP JMPAJB AMB APB AMJ APJ APM BMJ BPJ BPM JPMBAJ BAM BAP JAM JAP MAP JBM JBP MBP MJPBJA BMA BPA JMA JPA MPA JMB JPB MPB MPJJAB MAB PAB MAJ PAJ PAM MBJ PBJ PBM PJMJBA MBA PBA MJA PJA PMA MJB PJB PMB PMJ

Definition and Theorem. Let S be a set having n elements.

1. An r-permutation of S is an ordered arrangement of r of the n elements in S. The number of distinctr-permutations of a set of n elements is given by

P (n, r) =

2. An r-combination of S is an unordered selection of r of the n elements in S. The number of distinctr-combinations of a set of n elements is given by

C(n, r) =

Page 16: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

16 Sonoma State University

Example 5. A recital with 3 singing acts and 2 poetry readings is to be organized. The organizer must choose 5people from a group of 12 to perform. Of the 12 available performers, 6 of them can sing a song, 4 of them canrecite a poem, and 2 of them can either sing a song or recite a poem. Assuming that the order of the acts in theperformance is irrelevant, how many different recitals are possible?

Page 17: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 17

Example 6. The password for a telephone voice mail system must be a string of 3 digits. How many possiblepasswords are there that contain at least one zero?

(a) Explain why the following “solution” to the above problem is incorrect.

Case 1. Password looks like 0 ←− 10 · 10 = 100 passwords like this

Case 2. Password looks like 0 ←− 10 · 10 = 100 passwords like this

Case 3. Password looks like 0 ←− 10 · 10 = 100 passwords like this

Therefore, there are 100 + 100 + 100 = 300 total passwords that contain at least one zero.

(b) Give a correct solution to this problem.

Page 18: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

18 Sonoma State University

Example 7.

(a) List all distinct subsets of the one-element set {1} . Don’t forget the empty set!

(b) List all distinct subsets of the two-element set {1, 2} .

(c) List all distinct subsets of the three-element set {1, 2, 3} .

(d) Using the results of parts (a) through (c) as a guide, answer the following question: How many distinctsubsets does an set that contains n elements have? Prove that your answer is correct.

Page 19: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 19

Sections 3.4 & 3.5 – Permutations and Combinations of Multisets

Preliminary Exercise 1.

(a) Suppose we have unlimited supplies of butterscotch, cinnamon, and mint candies. How many differentselections of two candies are there?

(b) Now, suppose we have unlimited supplies of butterscotch, cinnamon, mint, licorice, and apple candies. Howmany different selections of 7 candies are there?

Page 20: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

20 Sonoma State University

Preliminary Exercise 2. How many different ways are there to arrange the letters in the word“PAPPELAPAPP”?

Theorem.

1. Suppose we have an infinite supply of r different kinds of objects. The number of distinct n-combinations of these objects is given by

2. Suppose we have n total objects, with n1 objects of one kind, n2 objects of a second kind, ..., and nk

objects of a kth kind. Then the number of distinct permutations of the n objects is given by

Page 21: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 21

Examples and Exercises

1. A donut shop sells 15 different varieties of donuts, one of which is chocolate. How many selections of 6 donutsare possible if

(a) there are no restrictions?

(b) the selection must include exactly 2 chocolate donuts?

(c) the shop only has 2 chocolate donuts left?

Page 22: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

22 Sonoma State University

2. With each entree, the Gutbomb family restaurant offers your choice of 3 side dishes from the followingselection: green beans, scalloped potatoes, corn, baked potato, mixed vegetables, french fries, mashedpotatoes, or onion rings. How many different side dish selections are possible if

(a) repeat selections of side dishes are not allowed?

(b) repeat selections of side dishes are allowed?

3. How many different 5-card poker hands are of the following types?

(a) full houses (three of one kind and two of a second kind)

(b) three of a kind (but not four of a kind or a full house)

Page 23: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 23

4. A woodwind quintet consists of five musicians playing five instruments: the flute, oboe, clarinet, bassoon, andFrench horn. There are 12 musicians available, 7 women and 5 men, and each of the 12 can play any of thefive instruments. In how many ways can the quintet be chosen if

(a) there are three men and two women in the quintet?

(b) there are three men and two women in the quintet, but one particular man and one particular womanrefuse to perform together?

Page 24: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

24 Sonoma State University

5. A disgruntled postman has 11 pieces of mail that he wants to deliver to three mailboxes labeled “Barnier”,“Ford”, and “Mendez”, though he doesn’t particularly care which mail goes into which mailbox, as long aseach piece of mail ends up in someone’s box! In how many different ways can the mail be delivered undereach of the following assumptions? (The order in which the pieces of mail are placed or arranged in a givenmailbox is irrelevant.)

(a) The 11 pieces of mail are indistinguishable.

(b) The 11 pieces of mail are all different.

(c) The 11 pieces of mail are all different, and 5 pieces of mail go to Dr. Barnier, 4 pieces of mail go to Dr.Ford, and 2 pieces of mail go to Dr. Mendez.

Page 25: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 25

Sections 5.1 & 5.2 – Pascal’s Formula and the Binomial Theorem

Definition. Recall that the number

(

n

k

)

counts the number of k-combinations of a set containing n

distinct elements. We call such a number a binomial coefficient.

Introductory Exercise. For values of k ≤ n, fill in the missing binomial coefficients in the table below. Doyou notice any patterns?

k

0 1 2 3 4 5 6 7 8

0

1

2

3

n 4

5

6

7

8

...

Page 26: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

26 Sonoma State University

Pascal’s Theorem. Let n and k be nonnegative integers with n ≥ k. Then(

n

k

)

=

(

n− 1

k − 1

)

+

(

n− 1

k

)

Algebraic Proof:(

n− 1

k − 1

)

+

(

n− 1

k

)

=(n− 1)!

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

(n− 1)!

k!(n− k − 1)!

=k · (n− 1)!

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

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

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

=k(n− 1)!

k!(n− k)!+

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

k!(n− k)!←− since j(j − 1)! = j!

=n!

k!(n− k)!=

(

n

k

)

.

“Combinatorial” Proof:

Page 27: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 27

Binomial Theorem. Let n be a positive integer. Then, for all x and y,

(x+ y)n =

Page 28: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

28 Sonoma State University

Example 1. What is the coefficient of x6y14 in the expansion of (3x− 5y)20?

Example 2.

(a) Substitute x = y = 1 into the Binomial Theorem and write down both sides of the resulting formula.

(b) Give a combinatorial proof of the identity that you wrote down in part (a).

Page 29: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 29

Exercises

1. Find the coefficient of x27 in the expansion of (1− 3x)50.

2. In this problem, you will investigate and combinatorially prove the identity

(

n

k

)

=

(

n

n− k

)

.

(a) In the space below, make a two-column table. In the first column, list all 2-subsets of {a, b, c, d, e}. In thesecond column, list the complements of the sets in the first column. For what values of n and k doesyour table illustrate the truth of the above identity?

Page 30: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

30 Sonoma State University

(b) Use the idea of part (a) to write a combinatorial proof that

(

n

k

)

=

(

n

n− k

)

.

Page 31: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 31

Section 5.3 – Identities

Example 1. Let n be a positive integer.

(a) Use the binomial theorem to write down the expansion of (1 + x)n.

(b) By taking the derivative of the above formula and substituting an appropriate value for x, derive the identity

n2n−1 =

(

n

1

)

+ 2

(

n

2

)

+ 3

(

n

3

)

+ · · · + n

(

n

n

)

.

Page 32: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

32 Sonoma State University

(c) Give a combinatorial interpretation of the identity from part (b).

Page 33: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 33

Example 2.

(a) For n = 1, 2, 3, and 4, find the value of the sumbelow and locate the sum in Pascal’s Triangle:

(

n

0

)2

+

(

n

1

)2

+

(

n

2

)2

+ · · · +

(

n

n

)2

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

(b) Based on your observations above, make a conjecture by filling in the blank below:

(

n

0

)2

+

(

n

1

)2

+

(

n

2

)2

+ · · · +

(

n

n

)2

=

Page 34: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

34 Sonoma State University

(c) Give a combinatorial proof of your identity. (Hint: Count the number of ways to choose n people from agroup having n women and n men.)

Page 35: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 35

Exercises

1. (a) Prove the identity 3n =

(

n

0

)

+

(

n

1

)

2 +

(

n

2

)

22 +

(

n

3

)

23 + · · · +

(

n

n

)

2n by substitution into

the Binomial Theorem.

(b) Give a combinatorial proof of the above identity. (Hint: Count the number of ways to paint n housesred, blue, or not at all.)

Page 36: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

36 Sonoma State University

2. (a) Substitute x = 1 and y = −1 into the Binomial Theorem and simplify the resulting identity.

(b) Let A = {a, b, c}. Write down two separate lists, one that contains all subsets of A with odd numbers ofelements, and one that contains all subsets with even numbers of elements. What do you notice aboutthe length of each list?

(c) Rearrange your identity from part (a) to illustrate that every n-element set has equal numbers of subsetswith even and odd numbers of elements.

Page 37: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 37

Section 6.1 – The Principle of Inclusion-Exclusion

Example 1. A trick-or-treater has 7 candy bars in her Halloween basket, each of a different type: Almond Joy,Butterfinger, Milky Way, Mounds, Nestle Crunch, Snickers, and Twix.

(a) How many different selections of 4 candy bars can she make?

(b) How many different selections of 4 candy bars can she make that contain an Almond Joy or a Butterfinger(possibly both)?

Theorem. Let S be a finite set of objects, let A1 be the set of objects in S

having property P1, and let A2 be the set of objects in S having property P2.

Then the number of objects having either property P1 or P2 is given by

|A1 ∪A2| =

S

A1 A2

The number of objects having neither property P1 nor P2 is given by

|A1 ∩A2| =

Page 38: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

38 Sonoma State University

Example 2. Derive similar formulas to the previous theorem with sets A1, A2,

and A3.2A1 A

SA3

Example 3. How many integers between 1 and 6000, inclusive, are not multiples of 4, 6, and 7?

Page 39: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 39

General Principle of Inclusion-Exclusion. Let S be a finite set of objects, and for each i, letAi be the set of objects in S having property Pi. Then the number of objects having at least one of theproperties P1, P2, . . . , Pm is given by

|A1 ∪ A2 ∪ · · · ∪Am| =∑

|Ai| −∑

|Ai ∩ Aj | +∑

|Ai ∩ Aj ∩ Ak|

+ · · ·+ (−1)m+1|A1 ∩ A2 ∩ · · · ∩Am|,

where the first sum is over all 1-combinations of {1, 2, . . . ,m}, the second sum is over all 2-combinations of{1, 2, . . . ,m}, the third sum is over all 3-combinations of {1, 2, . . . ,m}, and so on. Similarly, the number ofobjects in S having none of the properties P1, P2, . . . , Pm is given by

|A1 ∩ A2 ∩ · · · ∩ Am| = |S| −∑

|Ai| +∑

|Ai ∩Aj | −∑

|Ai ∩Aj ∩ Ak|

+ · · ·+ (−1)m|A1 ∩ A2 ∩ · · · ∩ Am|

Example 4. Five mathematicians go to a wild party at Dr. Barnier’s house, each wearing one coat. After thefestivities, Dr. B passes back the coats at random, one to each guest. In how many different ways can none of theguests receive her or his own coat back? What is the probability that none of the guests receive her or his own coatback?

Page 40: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

40 Sonoma State University

Example 5. A bakery sells three different kinds of donuts: jelly, chocolate, and glazed. At the moment, thebakery only has 11 jelly, 11 chocolate, and 5 glazed donuts. In how many ways can Ben buy a box of 20 donutsassuming that the order in which the donuts are placed in the box is not relevant?

Page 41: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 41

Sections 7.1 & 7.2 – Number Sequences and Recurrence Relations

Example 1. For each positive integer n, let dn represent the number ofdifferent ways to completely tile a fixed 2 by n chessboard with 2× 1 pieces(dominoes) and 2×2 pieces (see diagram to the right). Such a tiling is calleda perfect cover of the board with the specified types of pieces.

(a) By drawing all possible tilings, determine the values of d1 and d2. 2 x 22 x 1

(b) Repeat part (a) above to find d3. You may find that you don’t use all of the copies of the 2× 3 board below.

(c) Below, you are given all possible perfect covers of a 2× 4 chessboard. Convince yourself that all the cases areindeed covered. Do you notice a relationship between these tilings and any of the previous tilings that youdrew?

Page 42: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

42 Sonoma State University

(d) Write down a formula that indicates how dn can be calculated from the values of dn−1 and dn−2. Such aformula is called a recurrence relation. Then, use your formula to find the number of perfect covers of a 2× 8board using 2× 1 and 2× 2 pieces.

Page 43: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 43

Example 2. (Taken from Brualdi) Determine the number hn of regions that are created by n mutuallyoverlapping circles in general position in the plane. By mutually overlapping we mean that each two circles intersectin two distinct points. By general position we mean that there do not exist three circles with a common point.

Page 44: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

44 Sonoma State University

Example 3. As in Example 1, let dn be the number of different perfect covers of a 2× n chessboard. Recall thatin Example 1d, we derived the recurrence relation dn = dn−1 + 2dn−2. Find a formula for dn as a function of n.Such a formula is called a solution to the recurrence relation.

Page 45: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 45

Theorem 7.2.1. Let q be a nonzero number. Then hn = qn is a solution of the linear homogeneousrecurrence relation

(1) hn − a1hn−1 − · · · − akhn−k = 0 (ak 6= 0, n ≥ k)

with constant coefficients if and only if q is a root of the characteristic equation

(2) xk − a1xk−1 − a2x

k−2 − · · · − ak = 0.

If the characteristic equation has distinct roots q1, q2, . . . , qk, then

(3) hn = c1qn1 + c2q

n2 + · · ·+ ckq

nk

is the general solution of (1) in the following sense: No matter what initial values for h0, h1, . . . , hk−1 aregiven, there are constants c1, c2, . . . , ck so that (3) is the unique sequence which satisfies both the recurrencerelation (1) and the initial conditions.

Note: If a root q of the characteristic equation (2) is repeated s times (that is, if (x − q)s is a factor of (2)), thenthe portion of the general solution to (1) that corresponds to the root q is as follows:c1q

n + c2nqn + c3n

2qn + · · ·+ csns−1qn

Example 4. The Fibonacci sequence f0, f1, f2, . . . is defined by the recurrence relation fn = fn−1 + fn−2, wheref0 = 0 and f1 = 1.

(a) Find the first 9 terms in the Fibonacci sequence.

(b) Observe what happens when you sum entries diagonally in Pascal’s tri-angle (indicated by the arrows in the diagram to the right). Whatpattern do you notice?

151 6 20 15 6 11 5 10 5 11 4 6 4 1

31 3 11 2 11 1

10

Page 46: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

46 Sonoma State University

(c) Solve the Fibonacci recurrence relation fn = fn−1 + fn−2, f0 = 0, f1 = 1 to find a general formula forfn in terms of n.

Examples and Exercises

1. Solve each of the following recurrence relations.

(a) bn = 6bn−1 − 8bn−2, b0 = 4, b1 = 10

Page 47: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 47

(b) bn = 4bn−1 − 4bn−2, b0 = 5, b1 = 6

(c) bn = −bn−1 + 2bn−2, b0 = 4, b1 = 1

Page 48: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

48 Sonoma State University

(d) bn = bn−2, b1 = 2, b2 = −1

(e) bn = −5(2bn−1 + 5bn−2), b0 = 1, b1 = 2

Page 49: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 49

2. Let dn be the number of perfect covers of a 2× n chessboard using the following types of square pieces: white1× 1 pieces, and/or 2× 2 pieces of 6 different colors: white, black, red, green, yellow, purple. (Note that awhite 2× 2 square is different than 4 white 1× 1 squares.)

(a) Find d1 and d2.

(b) Derive a recurrence relation with initial conditions for dn.

(c) Solve the recurrence relation from part (b) above, and use it to find the number of perfect covers of a2× 100 chessboard using the pieces described above. Obviously, you’ll want to leave your answer inunsimplified form!

Page 50: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

50 Sonoma State University

3. (Taken from Brualdi) Let hn be the number of different ways in which the squares of a 1× n chessboard canbe colored, using the colors red, white, and blue so that no two squares that are colored red are adjacent.Find a recurrence relation that hn satisfies, and then find a formula for hn.

Page 51: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 51

4. (Taken from Brualdi) By evaluating each of the following expressions involving the Fibonacci numbers, guessa general formula. Then, use induction to prove your formula.

(a) f20 + f2

1 + f22 + · · ·+ f2

n

Page 52: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

52 Sonoma State University

(b) f1 + f3 + f5 + · · ·+ f2n−1

Page 53: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 53

Section 7.4 – Generating Functions

Preliminary Example. Suppose we throw three labeled six-sided dice.For each positive integer n, let hn be the number of different ways that thesum of the numbers on the dice can equal n. A graphical illustration of h5 isshown to the right.

Dice Arrangement Algebraic Term

Page 54: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

54 Sonoma State University

Example 1. Find a generating function for the sequence of binomial coefficients:

(

n

0

)

,

(

n

1

)

,

(

n

2

)

, . . . ,

(

n

n

)

Definition. The generating function corresponding to the sequence h0, h1, h2, h3, . . . is the formal powerseries

h0 + h1x + h2x2 + h3x

3 + · · · =∞∑

k=0

hkxk

with the understanding that no value is assigned to the symbol “x”; that is, we consider xn to be a “place-holder” for hn.

Some Useful Generating Functions

(1 + x)n = 1 +

(

n

1

)

x +

(

n

2

)

x2 + · · · +

(

n

n− 1

)

xn−1 + xn =

n∑

k=0

(

n

k

)

xk (1)

1− xn+1

1− x= 1 + x + x2 + · · · + xn =

n∑

k=0

xk (2)

1

1− x= 1 + x + x2 + · · · =

∞∑

k=0

xk (3)

1

1− xr= 1 + xr + x2r + · · · =

∞∑

k=0

xrk (4)

1

(1− x)2= 1 + 2x + 3x2 + · · · =

∞∑

k=0

(k + 1)xk (5)

1

(1− x)n= 1 +

(

n

1

)

x +

(

n+ 1

2

)

x2 + · · · =∞∑

k=0

(

n+ k − 1

k

)

xk (6)

Page 55: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 55

Example 2. Let hn be the number of nonnegative integer solutions to the equation e1 + e2 + e3 = n. Find aformula for hn.

Page 56: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

56 Sonoma State University

Example 3. Suppose that plentiful supplies of the following types of fruit are available to make a fruit basket:apples, bananas, oranges, and pears. You may consider different pieces of fruit of the same type to be identical, andassume that the order in which the fruit is arranged in each basket is irrelevant. With each of the followingconditions, find a generating function for hn, the number of different fruit baskets containing n pieces of fruit.

(a) There are no restrictions.

(b) The number of pears must be even.

(c) There must be at least 2 apples, no more than 3 bananas, and exactly 4 oranges.

Page 57: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 57

Example 4. Use generating functions and the fact that (1 + x)n(1 + x)m = (1 + x)n+m to derive a summationformula for the binomial coefficient

(

m+nk

)

.

Page 58: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

58 Sonoma State University

Examples and Exercises

1. (Taken from Brualdi) Given that plentiful supplies of apples, bananas, oranges, and pears are available, find agenerating function for the number of ways to fill a fruit basket with n pieces of fruit in such a way that eachbasket has an even number of apples, an odd number of bananas, between 0 and 4 oranges, and at least onepear.

2. Suppose that we have three jars: Jar A, Jar B, and Jar C. In how many ways can we put 40 identical quartersinto the three jars?

Page 59: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 59

3. Use a generating function to find the number of ways to collect $15 from 20 distinct people if each of the first19 people can give at most a dollar, and the 20th person can give either nothing, $1, or $5. Please assumethat each person who contributes gives only even dollar amounts.

Page 60: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

60 Sonoma State University

Section 9.1 – Matchings in Bipartite Graphs

Example 1. A company has 6 applicants applying for5 jobs. Let {x1, x2, . . . , x6} represent the 6 applicants and{y1, y2, . . . , y5} represent the 5 jobs. After holding interviews,the company determines which applicants are qualified for eachjob (see table to the right). Given that each applicant can holdat most one job, and each job can be filled by at most one ap-plicant, what is the maximum number of jobs that can filled?

Applicant Jobs Qualified forx1 y1x2 y2, y3x3 y2, y4x4 y4, y5x5 y2, y4x6 y3, y4

Page 61: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 61Example 2. To the right, you are given a 4 × 5 chessboard with 8“forbidden” positions labeled with “X”. What is the maximum num-ber of nonattacking rooks that can be placed on the chessboard giventhat we must avoid the forbidden positions? (Note: Rooks are called“nonattacking” when they share neither the same row nor the samecolumn of the board.)

X XX

XX X X X

Page 62: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

62 Sonoma State University

Definition. Let G = (X,∆, Y ) be a bipartite graph. A set M of edges in G is called a matching of G ifno edges of M meet at a common vertex. We define ρ(G) to be the size of the largest possible matching inG; in other words,

ρ(G) =

We call a matching M∗ a max-matching of G if |M∗| = ρ(G).

Example 3. For the bipartite graph G to the right, find a matching M that is nota max-matching, a max-matching M∗, and find ρ(G).

3

1y

y2

y3

4

1x

x2

x

x

Definitions. Let u and v be two vertices in a bipartite graph G = (X,∆, Y ). A path γ joining u and v isa sequence of distinct vertices (except that u may equal v)

γ : u = u0, u1, u2, . . . , up−1, up = v

such that any two consecutive vertices are joined by an edge. Thus, for γ to be a path in G, it must be truethat {u0, u1} , {u1, u2} , . . . , {up−1, up} are all edges in ∆. We call the path γ a cycle if u = v, that is, if thepath starts and ends at the same vertex.

Page 63: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 63

3

x

y3

x

4

5

y4

y5

1

x2

x

x

1y

y2

3

x

y3

x

4

5

y4

y5

1

x2

x

x

1y

y2

Definitions. Let M be a matching in a bipartite graph G = (X,∆, Y ), and let M be the complement ofM, that is, the set of edges of G that don’t belong to M. Let u and v be vertices such that one of u and v isa left vertex and one is a right vertex. A path γ joining u and v is called an M-alternating path if all of thefollowing properties hold:

1. The first, third, fifth, . . . edges of γ do not belong to the matching M (thus, they belong to M).

2. The second, fourth, sixth, . . . edges of γ belong to the matching M.

3. Neither u nor v meets an edge of the matching M.

Observations and Notation:

• An M -alternating path always has an number of edges.

• Mγ =

• Mγ =

Page 64: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

64 Sonoma State University

Theorem 9.2.1. Let M be a matching in a bipartite graph G = (X,∆, Y ). Then M is a max-matchingif and only if

Definition. Let G = (X,∆, Y ) be a bipartite graph. A subset S of the set X ∪Y of vertices of G is calleda cover, provided that each edge of G has at least one of its two vertices in S:

{x, y} ∩ S 6= ∅ for all {x, y} in ∆

We define the cover number of G, denoted c(G), to be the smallest number of vertices in a cover of G; i.e.,

c(G) =

Example 4. For both of the following bipartite graphs, find two covers: one that is minimal, and one that isnot. Also state the cover number c(G) of each graph.

(a)

3

1y

y2

y3

4

1x

x2

x

x

(b)

3

x

y2

y3

4 y4

1

x2

x

x

1y

Page 65: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 65

Theorem 9.2.4. Let G = (X,∆, Y ) be a bipartite graph. Then

ρ(G) = c(G);

that is, the largest number of edges in a matching equals the smallest number of vertices in a cover.

Corollary. Let G = (X,∆, Y ) be a bipartite graph, and let S be a cover of G. Then, if M is a matchingof G with |M | = |S|, then M must be a max-matching and S must be a minimal cover.

Page 66: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

66 Sonoma State University

Examples and Exercises1. To the right, you are given a 6×6 chessboard with forbidden positions

labeled with an “X”. First, construct the rook bipartite graph thatcorresponds to this board.

(a) Construct the rook bipartite graph corresponding to this chess-board.

X X X XX X X XX X X X XX X XX X X XX X X

(b) What is the largest number of nonattacking rooks that can be placed on the chessboard above? Answerthis question by finding the largest possible matching in your graph from part (a), and then labeling theabove chessboard with R’s in the positions corresponding to your matching.

Page 67: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 67

2. For each of the following, you are given a graph and a matching M (denoted by the highlighted edges). IFPOSSIBLE, find an M -alternating path γ in G, and then use the path to obtain a new matching with onemore edge than M. Indicate your new matching on the second copy of the graph.

(a)

3

x

y2

y3

4 y4

1

x2

x

x

1y

3

x

y2

y3

4 y4

1

x2

x

x

1y

(b)

3

x

2

y3

x

4

5

y4

1

x2

x

x

1y

y

3

x

2

y3

x

4

5

y4

1

x2

x

x

1y

y

(c)

3

x

y3

x

4

5

y4

y5

1

x2

x

x

1y

y2

3

x

y3

x

4

5

y4

y5

1

x2

x

x

1y

y2

(d)

3

x

y2

y3

4 y4

1

x2

x

x

1y

3

x

y2

y3

4 y4

1

x2

x

x

1y

Page 68: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

68 Sonoma State University

3. For each of the following graphs, find a max-matching and use the Corollary following Theorem 9.2.4 to provethat your matching really is a max-matching.

(a)

3

x

y2

y3

4 y4

1

x2

x

x

1y

(b)

3

x

2

y3

4 y4

y5

1

x2

x

x

1y

y

(c)

3

x

y2

y3

4 y4

1

x2

x

x

1y

Page 69: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 69

4. A company has 6 applicants applying for 6 jobs. After hold-ing interviews, the company determines which applicants arequalified for each job (see table to the right). Given that eachapplicant can hold at most one job, and each job can be filledby at most one applicant, what is the maximum number of jobsthat can filled with qualified applicants? Explicitly state howthe jobs should be assigned to achieve this maximum, and showthat your answer is correct.

Applicant Jobs Qualified forx1 y1, y4x2 y1, y3, y6x3 y5x4 y2, y3, y5, y6x5 y3x6 y3

5. Prove or disprove: Given a matching M in a bipartite graph G that is not maximal, it is possible to obtain amax-matching by adding an appropriate number of edges from G.

Page 70: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

70 Sonoma State University

Section 11.1 – Basic Properties of Graphs

Definition. A graph G = (V,E) (also called a simple graph) consists of a finite vertex set, V, and a finiteset of edges, E, that join vertices in V. If x and y are vertices in V, and if

α = {x, y} = {y, x}

is an edge of G, we use the following terminology:

• α joins x and y

• x and α are incident, and y and α are incident.

The number of distinct vertices in the graph is called the order of G. The degree of a vertex v ∈ V, is definedby

deg(v) = the number of edges of G that are incident with v.

Example 1. Given to the right is a graph G = (V,E). Write down the vertex andedge sets, state the order of G, and write down the degree of each vertex.

c

a

b e

d

Definition. A multigraph G = (V,E) consists of a vertex set V and a multiset E of edges that join verticesin V, possibly multiple times.

Example 2. Given to the right is a multigraph H = (V,E). Write down thevertex and edge sets, state the order of H, and write down the degree of eachvertex.

c

b

d

a

Page 71: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 71

Definition. A general graph G = (V,E) is a multigraph that allows loops; that is, edges of the form {x, x}that are only incident with one vertex x ∈ V.

Example 3. To the right is an adjacency matrix describing train connectionsbetween 6 German cities: Alme, Berlin, Hamburg, Munich, Paderborn, andStuttgart. Each row and column of the matrix corresponds to one of the 6 cities,listed in alphabetical order (as above) from left to right and top to bottom. A“1” in the matrix represents direct train service between the two correspondingcities, while a “0” represents no direct train service. Construct a general graph tomodel this network. What do you think the loops in the graph might represent?

0 0 0 0 0 00 1 1 1 0 00 1 1 1 1 10 1 1 1 0 10 0 1 0 0 00 0 1 1 0 1

Definition. A complete graph on n vertices, denoted by Kn, is a simple graph of order n such that eachvertex in the graph is joined with all other vertices in the graph (except itself).

Example 4. Draw the graphs K2, K3, and K4. In general, how many distinct edges are there in the graph Kn?

Page 72: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

72 Sonoma State University

Example 5. For the graph G given in Example 1, add up the degrees of the vertices of G and compare the sumto the number of edges in the graph. Repeat the same calculations for the general graph H given in Example 2.What do you notice?

Theorem 11.1.1 Plus. Let G = (V,E) be a general graph. Then the sum of the degrees of all of thevertices of G equals the number of edges of G; in other words,

x∈V

deg(x) = d1 + d2 + · · ·+ dn = .

Proof.

Implications of Theorem 11.1.1 Plus:

1. The sum of the degrees in any general graph is always .

2. All general graphs must have an number of vertices of odd degree.

Page 73: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 73

Example 6. Are the two graphs below “different”? Discuss.

H = (V,E) H ′ = (V ′, E′)

Definition. Two general graphs G = (V,E) and G′ = (V ′, E′) are called isomorphic if there is a 1-1correspondence (i.e. a bijection)

θ : V −→ V ′

such that, for each pair of vertices x and y of V, there are as many edges of G joining x and y as there areedges of G′ joining θ(x) and θ(y).

Notes:

1. Conceptually, if you think of the vertices of a graph as being pins on a bulletin board and the edges beingrubber bands attached to the pins, then two graphs are isomorphic if we can move the pins around in one ofthe graphs and obtain the other one by stretching or shrinking rubber bands (no breaking!).

2. An isomorphism can be thought of as a bijection between the vertex sets of two graphs that “preservesadjacency.”

3. Write down an isomorphism that corresponds to Example 6 above:

Page 74: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

74 Sonoma State University

Example 7. Which of the following graphs are isomorphic? For those that are, write down an isomorphism.

G1 G2 G3 G4 G5

Properties that isomorphic general graphs G and G′ must share:

Page 75: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 75

Definition. Let G = (V,E) be a general graph. Let U be a subset of V and F be a submultiset of Esuch that the vertices of each edge in F belong to U. Then G′ = (U, F ) is also a general graph and is calleda general subgraph of G. If F consists of all edges of G that join vertices U, then G′ is called the induced

general subgraph of G, which we denote by GU .

Example 8. For each of the following graphs G = (V,E), find two subgraphs: one that is an induced subgraph,and one that is not an induced subgraph.

(a)

ka

b

c

d

e

f

g

h i

j

(b) fa

b

c d

e

Page 76: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

76 Sonoma State University

Examples and Exercises

Definition. Let G = (V,E) be a general graph. A sequence of m edges in G of the form{x0, x1} , {x1, x2} , . . . , {xm−1, xm} is called a walk of length m that joins x0 and xm. We also denotethis walk by writing

x0 − x1 − x2 − · · · − xm.

A walk may have repeated edges. If a walk has distinct edges, then it is called a trail. If, in addition, a walkhas distinct vertices (except, possibly, x0 = xm), then the walk is called a path. A closed path (i.e. one withthe same starting and ending vertex) is called a cycle.

The distance between two vertices x and y of G, denoted by d(x, y), is the length of the shortest path joiningx and y. We also define d(x, x) = 0.

1. Let G = (V,E) be the graph shown to the right. Use the graphand the above definitions to complete the following:

(a) Write down two distinct paths in G that join a and k.

ka

b

c

d

e

f

g

h i

j

(b) Find a trail in G joining a and k that is not a path.

(c) Find a walk in G joining a and k that is not a trail.

(d) Find cycles of length 3, 4, and 5 in G.

(e) Calculate the following distances: d(a, k), d(b, i), d(c, k), and d(c, c).

(f) List all vertices of G that have distance 3 from g.

Page 77: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 77

Definition. A general graph G is called connected, if, for each pair of distinct vertices x and y there is awalk joining x and y (equivalently, a path joining x and y). Otherwise, we say that G is disconnected.

2. Sketch two graphs of order 4, one that is connected and one that is disconnected.

Definition. Let G = (V,E) be a general graph, and let let F be a submultiset of E. Then a generalsubgraph of the form G′ = (V, F ) is called spanning general subgraph. In other words, a subgraph isspanning if it contains all of the vertices of the original graph G, but not necessarily all of the edges.

3. Given to the right is a graph G = (V,E). For each of the subgraphs of G

given below, decide whether they are connected or disconnected, spanning ornot spanning, and induced or not induced.

db

a

c

e

(a)

db

a

c

e

(b)

db

a

c

e

(c)

db

a

c

e

(d)

db

a

c

e

(e)

db

a

c

e

Page 78: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

78 Sonoma State University

4. Determine whether or not each pair of graphs is isomorphic. If the graphs are isomorphic, find anisomorphism. If the graphs are not isomorphic, clearly explain why not.

(a) ea

c

b d

z

w

v

xy

(b)

eb

dc

fa

x

y

zu

v

w

(c)

ea

b cd

z

w

v

x

y

(d)

ja

b

c

d

e

f

gh

i

z

q r

s tu

wv x y

(e)f

a b

c

de

zu v w

x

y

Page 79: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 79

5. Draw all 14 nonisomorphic simple graphs of order 5 that have 4 or fewer edges.

6. Prove that, if two vertices in a general graph are joined by a walk, then they are joined by a path. (Hint: Letγ be a walk of shortest length between the two vertices, and then show that γ must be a path.)

Page 80: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

80 Sonoma State University

Sections 11.2 – Eulerian Trails

Example 1. The city of Koenigsberg in East Prussia was locatedalong the banks and on two islands of the Pregel River, with the fourparts of the city connected by seven bridges as shown to the right. Is itpossible to start in one part of the city and take a stroll so that you useeach bridge exactly once and return to the same place you started? Ifso, specify the route.

C

A

B

D

Definition. Let G be a general graph. A trail in G that contains every edge of G exactly once is calledan trail. A trail contains every edge ofthe graph exactly once and has the same starting and ending vertex.

Closed Trail Algorithm. Let G = (V,E) be a general graph, and assume that the degree of eachvertex is even. Then the following algorithm produces a closed trail in G:

(0) Pick a starting edge α1 = {x0, x1} from E.

(1) Put i = 1.

(2) Put W = {x0, x1}

(3) Put F = {α1}

(4) While xi 6= x0, do the following:

(a) Locate an edge αi+1 = {xi, xi+1} not in F.

(b) Put xi+1 in W (xi+1 may already be in W ).(c) Put αi+1 in F.

(d) Increase i by 1.

Page 81: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 81

Example 2. Using the algorithm on the previous page as a guide, find aclosed Eulerian trail in the graph G to the right. Note that G is connectedand that every vertex of G has even degree.

m

ab

c de

f gh

i j

k

Page 82: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

82 Sonoma State University

Theorem 11.2.2. Let G be a connected general graph. Then G has a closed Eulerian trail if and onlyif

Example 3. Given to the right is a graph G = (V,E).

(a) Does G have a closed Eulerian trail? Explain.

f

a b

c

e d

(b) By adding one edge e to the graph G above, create a new graph G′ = (V, E ∪ {e}) that does have a closedEulerian trail. Then, write down a closed Eulerian trail in G′ that starts with the edge you added.

(c) Use the closed trail in G′ to help you write down an open Eulerian trail in the original graph G.

Page 83: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 83

Theorem 11.2.3. Let G = (V,E) be a connected general graph. Then G has an open Eulerian trail ifand only if there are exactly two vertices of odd degree.

Examples and Exercises

1. Find a closed Eulerian trail in the graph G to the right.

n

a b

e

cd

fg

h

i j k

m

Page 84: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

84 Sonoma State University

2. For each of the graphs below, find either a closed Eulerian trail or an open Eulerian trail. Clearly indicatewhat constitutes your final trail.

(a)

j

a b

cd

efg

h i

(b)

i

a b

d ec

f g h

(c)

h

a b

c d e f

g

Page 85: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 85

Section 11.3 – Hamilton Paths and Cycles

Example 1. A mail carrier wants to deliver mail in each of the20 towns represented by vertices in the graph G to the right. Theedges in the graph indicate the existence of a direct road betweentowns. Is there a route she can take that will allow her to start inAberdeen (labeled “A”), visit each of the towns exactly once, andreturn to Aberdeen? If so, specify the route she should take.

T

A

B

HDC

EF

GIJ

KL

MN O

PQ R

S

Definition. Let G be a graph. A path that visits each vertex in the graph exactly once is called a. A closed path that visits each vertex of the graph exactly once

and returns to the starting point is called a .

Example 1. Given below are two graphs, G and H. Does either graph have a Hamilton path? a Hamilton cycle?If the answer is yes, explicitly specify the path and/or cycle.

G

z

v w

x

y

H

h

a b

c d

e f

g

Page 86: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

86 Sonoma State University

Theorem 11.3.1. A connected graph with a bridge does not have a Hamilton cycle.

Example 2. Prove that the converse of Theorem 11.3.1 is false by giving an appropriate counterexample andcarefully explaining why it works.

Definition. Let G be a graph of order n. We say that G satisfies the Ore property if, for all pairs ofdistinct vertices x and y that are not adjacent, we have

deg(x) + deg(y) ≥ n.

Example 3. Draw two graphs of order 4: one that satisfies the Ore property, and one that does not.

Page 87: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 87

Example 4. Prove that any graph that satisfies the Ore property must be connected.

Page 88: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

88 Sonoma State University

Theorem 11.3.2. Let G be a graph of order n ≥ 3 that satisfies the Ore property. Then G has aHamilton cycle.

Page 89: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 89

Examples and Exercises

1. For each of the following, draw a connected graph G satisfying the indicated conditions, or explain why nosuch example exists.

(a) G has a Hamilton cycle and a Hamilton path.

(b) G has a Hamilton path but not a Hamiltoncycle.

(c) G has a Hamilton cycle but not a Hamiltonpath.

(d) G has neither a Hamilton path nor a Hamil-ton cycle.

(e) G has a closed Eulerian trail and a Hamiltoncycle.

(f) G has an open Eulerian trail and a Hamiltoncycle.

(g) G has an open Eulerian trail and a closed Eule-rian trail.

(h) G has neither an open Eulerian trail nor a closedEulerian trail.

Page 90: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

90 Sonoma State University

2. Prove that the converse of Theorem 11.3.2 is false by giving an appropriate counterexample and carefullyexplaining why it works.

3. Draw all connected nonisomorphic graphs of order 6 that have closed Eulerian trails.

Page 91: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 91

Section 11.4 – Bipartite Multigraphs

Example 1. Let G = (V,E) be a graph whose vertices are the integers from 1 to 6, with two integers joined byan edge if and only if their difference is an odd integer.

(a) Draw this graph and decide whether or not it is bipartite.

(b) Write down as many different cycles in G as you can. What do you notice about the length of each cycle?

Definition. Let G = (V,E) be a multigraph. Then G is called bipartite provided that the vertex set V

may be partitioned into two subsets X and Y such that each edge of G has one vertex in the set X and theother vertex in the set Y. A pair X,Y with this property is called a bipartition of G (or of the vertex set V ).

Definition. A bipartite graph G with bipartition X,Y is called complete provided that every vertex inX is adjacent to every vertex in Y. A complete bipartite graph with m left vertices and n right vertices isdenoted by Km,n.

Notes:

1. The graph from Example 1 above is isomorphic to .

2. In general, the graph Km,n has edges.

Page 92: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

92 Sonoma State University

Example 2. Decide which of the following graphs are bipartite. For those that are, give a bipartition.

(a)

(b)

(c)

(d)

(e)

Page 93: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 93

Theorem 11.4.1. A multigraph is bipartite if and only if

Page 94: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

94 Sonoma State University

Section 11.5 – Trees and Applications

Example 1.

(a) Let G be a graph of order n = 3 (that is, having 3 vertices). What is the smallest number of edges that G canhave in order to be connected?

(b) Answer the same question as above for n = 4 and n = 5. For each value of n, try to draw all possiblenonisomorphic graphs with the smallest number of edges required to be connected.

(c) Look back at all of your graphs from parts (a) and (b) above. Do they have anything in common? Inparticular, do they contain any cycles? Can any of the edges be removed without disconnecting the graphs?

Theorem 11.5.1. A connected graph of order n has at least edges. Moreover, for each positiveinteger n, there exist connected graphs with exactly edges. Removing any edge from a connectedgraph of order n with exactly edges leaves a graph, and henceeach edge is a .

Page 95: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 95

Definition. A tree is a connected graph that becomes disconnected upon removal of any edge. Thus, atree is a connected graph such that each of its edges is a bridge.

Equivalent Ways of Defining Trees

A connected graph G = (V,E) of order n is a tree if and only if . . .

1. . . . it has exactly n− 1 edges.

2. . . . there are no cycles in G.

3. . . . every pair of distinct vertices x and y are joined by a unique path, which is necessarily a shortest pathbetween x and y.

Page 96: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

96 Sonoma State University

Example 2. The graph G to the right represents a network of roads connecting9 cities. By removing successive edges from the graph, find a subgraph of G withas few edges as possible that keeps the network of cities connected.

Definition. A tree that is a spanning subgraph of a graph G is called a spanning tree of G.

Theorem 11.5.7. Every connected graph has a spanning tree.

Example 3. Use Dijkstra’s algorithm below to find a distance tree for thevertex u in the graph to the right.

z

4

u

v

w

x

y

1

1

1

2

23

33

2

Dijkstra’s Algorithm for a distance-tree for u

Let G = (V,E) be a weighted graph of order n, with weight function c, and let u be any vertex.

(1) Put U = {u} , D(u) = 0, F = ∅, and T = (U, F ).

(2) If there is no edge in G that joins a vertex x in U to a vertex y not in U, then stop. Otherwise,determine an edge α = {x, y} with x in U and y not in U such that D(x) + c {x, y} is as small aspossible, and do the following:

(i) Put the vertex y into U.

(ii) Put the edge α = {x, y} into F.

(iii) Put D(y) = D(x) + c {x, y} and go back to (2).

Page 97: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 97

Proof that Dijkstra’s algorithm works

Claim: Let G be a connected graph, and let T = (U, F ) be the spanning tree obtained by applying Dijkstra’salgorithm to G. Then for any vertex y of G, the distance between u and y equals D(y), and this is the same as theweighted distance between u and y in the weighted tree T.

Basic Idea of Proof: Suppose by way of contradiction that the above claim is not true. Then

there will be at least one vertex v in resulting tree T where D(v) does not equal the weighted

distance from the starting vertex to v, as illustrated in the example below:

(12)

5

(0)

(1)

(2)

(3)

(5)

(4)

(5)

(8)

(10)

(11)

(13)

(11)

(9)

a

b

c

de

f

g

h

i

j

k

l

m

n1

1

1

1

1

2

2

22

2

22

2

22

2

3

3

3

1

44

4

2

Page 98: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

98 Sonoma State University

Example 3. In Eisundkalt county of North Dakota, 9 towns areconnected by a network of dirt roads (see diagram to the right);the edge weights indicate the time required to pave that road, inthousands of man hours. The highway department wants to paveenough roads so that it is possible for a motorist to travel betweenany two towns using only paved roads. They also want to completethe project in as little time as possible, since summer only lasts 3weeks in Eisundkalt county. Use Prim’s algorithm (see bottomof page) to determine which roads should be paved in order tocomplete the project with the minimum number of man hours.

1.0

2.0

2.2 2.6

2.4

1.43.6

4.2

1.5

2.0 3.2

3.63.2

1.4

1.2

1.0

(Terminology Note: In this example, we are being asked to find a minimum-weight spanning tree.)

Prim’s Algorithm for a minimum-weight spanning tree

Let G = (V,E) be a weighted, connected graph of order n with weight function c, and let u be anyvertex of G.

(1) Put i = 1, U1 = {u} , F1 = ∅, and T1 = (U1, F1).

(2) For i = 1, 2, . . . , n− 1, do the following:

(i) Locate an edge αi = {x, y} of smallest weight such that x is in Ui and y is not in Ui.

(ii) Put Ui+1 = Ui ∪ {y} , Fi+1 = Fi ∪ {αi} , and Ti+1 = (Ui+1, Fi+1).

(iii) Increase i to i+ 1.

(3) Output Tn−1 = (Un−1, Fn−1). (Here Un−1 = V.)

Page 99: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 99

Examples and Exercises

1. Draw all nonisomorphic trees of order 6.

2. Draw all nonisomorpic spanning trees of the graph shown to the right. Is there anyrelationship between your answers to this problem and your answers to problem 1?

Definition. A vertex of degree 1 in a graph G is called a pendent vertex of G.

3. (a) By experimentation, determine, in terms of n, the smallest and largest numbers of pendent vertices thata tree of order n can have.

Page 100: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

100 Sonoma State University

(b) Prove that, if a tree T of order n has 2 vertices of degree p, then it must have at least 2(p− 1) pendentvertices. (Hint: Let k be the number of pendent vertices of T, and use Theorem 11.1 Plus to show thatk ≥ 2(p− 1).)

4. For each of the following graphs, use Dijkstra’s Algorithm to find a minimum distance tree from u. Then, useit to write down the minimum weighted distance from u to v.

(a)

v

3

1

3

5

3

2

u

1

2

13

2

4

(b)

v

22

54

5 4 2 1

u 1 3

2

3 6 3

3

4

Page 101: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 101

(c)

22

3 2

3

3

3

2

6

3

3 1

2

44

5u

v

13

4

5

5

4 45

4

41

5. In the same three graphs as in the previous exercise, use Prim’s algorithm to determine a minimum-weightspanning tree, and find the minimum weight. Do you obtain the same trees that you did in the previousexcercise?

(a)

v

3

1

3

5

3

2

u

1

2

13

2

4

(b)

v

22

54

5 4 2 1

u 1 3

2

3 6 3

3

4

(c)

22

3 2

3

3

3

2

6

3

3 1

2

44

5u

v

13

4

5

5

4 45

4

41

Page 102: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

102 Sonoma State University

Section 13.1 – Chromatic Number

Example 1. Given to the right is a schedule giving thetimes of six different math courses. What is the smallestnumber of classrooms needed to accommodate the courseswithout creating room conflicts? (Suggestion: Model thisproblem with a graph, where the classes are the vertices,and edges join vertices if and only if there are time overlapsbetween the corresponding classes.)

Class TimesIntro to Higher Math MTWF, 11-11:50

Modern Algebra MW, 10-11:50Stats Consulting TR, 10-11:50History of Math MWF, 10-10:50Real Analysis 2 TR, 9:20-10:35Vector Calculus MTWF, 10-10:50

Definitions. Let G = (V,E) be a graph. A vertex-coloring of G is an assignment of a color to each of thevertices of G in such a way that adjacent vertices are assigned different colors.

If the colors are chosen from a set of k colors, then the vertex-coloring is called a k-coloring, whether or notall k colors are used. If G has a k-coloring, then G is called k-colorable.

The smallest k such that G is k-colorable is called the chromatic number of G, and is denoted by χ(G).

Page 103: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 103

Example 2. Draw graphs that have chromatic number 2, 3, and 4.

Example 3. Find the chromatic number of the graph G shown to theright, and show that your answer is correct.

i

c

g

b

a

f

h

d

e

Example 4. Use the Greedy Algorithm for vertex coloring (see below)to find a coloring of the graph to the right. Does the algorithm produce anoptimal solution? Discuss.

x

x2

3

4

6

7

8

51x

x

x

xx

x

Greedy Algorithm for vertex-coloring

Let G be graph in which the vertices have been listed in some order x1, x2, . . . , xn.

(1) Assign the color 1 to vertex x1.

(2) For each i = 2, 3, . . . , n, let p be the smallest color such that none of the vertices x1, . . . , xi−1 whichare adjacent to x1 are colored p, and assign the color p to xi.

Page 104: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

104 Sonoma State University

Some Chromatic Number Theorems

Theorem 13.1.1. Let G be a graph of order n ≥ 1. Then

1 ≤ χ(G) ≤ n.

Moreover, χ(G) = n if and only if G is a graph, and χ(G) = 1 if and only if G is agraph.

Corollary 13.1.2. Let G be a graph and let H be a subgraph of G. Then. If G has a subgraph equal to a complete graph Kp of order p,

then .

Theorem 13.1.4. Let G be a graph with at least one edge. Then χ(G) = 2 if and only if G is.

Theorem 13.1.6 (Brooks’ Theorem). Let G be a connected graph for which the maximum degreeof a vertex is ∆. If G is neither a complete graph Kn nor an odd cycle graph Cn, then χ(G) ≤ ∆.

Page 105: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 105

Definition. For each k ≥ 0, the number of k-colorings of the vertices of a graph G is denoted by pG(k).We call pG(k) the chromatic polynomial of G.

Example 3. Find the chromatic polynomials of K3, the complete graph on 3 vertices, and N3, the null graph on3 vertices.

Fact 1. Let G be a graph having edge e = {x, y} . Then

pG(k) = pG1(k) − pG2

(k),

where G1 is the graph obtained from G by removing the edge {x, y} from G, and G2 is the graph obtainedfrom G by contracting the edge {x, y} .

Page 106: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

106 Sonoma State University

Fact 2. For any graph G, the quantity pG(k) is a polynomial in k.

Examples and Exercises

1. Find the chromatic number of each of the following graphs, and show that your answer is correct.

(a)

(b)

Page 107: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 107

(c)

(d)

2. Prove or disprove: For a graph G, if χ(G) ≥ n, then G must contain Kn as a subgraph.

Page 108: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

108 Sonoma State University

3. Let G be the complete graph shown to the right, let G1 be the graph obtainedfrom G by deleting the edge e, and let G2 be the graph obtained from G by“contracting” the edge e (see diagram to the right). Determine the numberof different 3-colorings of each graph. Is there any relationship between thenumber of colorings for these graphs?

e

G G G1 2

ba

c

ba

c

ba

c

ba

c

ba

c

ba

c

a

c

ba

c

ba

c

ba

c

ba

c

ba

c

ba

c

ba

c

ba

c

ba

cba

c

ba

c

b

a

c c c c c c

a a a a a

4. Let T be any tree of order n ≥ 1. By experimenting with small values of n, try to guess a formula for pT (k),the chromatic polynomial of T.

Page 109: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 109

5. Find the chromatic polynomial of each of the following graphs. Feel free to leave your answers in unsimplifiedform.

(a)

(b)

(c)

(d)

Page 110: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

110 Sonoma State University

Section 13.2 – Plane and Planar Graphs

Definition. Let G be a general graph. We say that G is planar if it can be drawn in the plane withoutany edge crossings. Such a drawing is called a plane-graph and is referred to as a planar representation of G.

Example 2. Each of the following plane graphs divide the plane into a finite number of connected regions,labeled R1, R2, . . . , Rk. Let fi denote the number of edges in the graph that “border” the region Ri as one walksaround its border. Find fi for each region, and then add up all the fi’s. What do you notice?

(a)

5R

RR

R R1

2

3

4

(b)

7R1

2

3 4

5

6RR

R

R R

R

(c)

4

R1

R2

R3R

Page 111: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 111

Example 3. For each of the plane graphs in Example 2 on the previous page, let n be the number of vertices, lete be the number of edges, and let r be the number regions. Calculate r − e + n for each of the graphs. What doyou notice?

Theorem 13.2.1 (Euler’s formula). Let G be a plane-graph of order n with e edges, and assumethat G is connected. Then the number of regions into which G divides the plane satisfies

r =

Page 112: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

112 Sonoma State University

Theorem 13.2.2. Let G be a connected planar graph. Then there is a vertex of G whose degree is atmost 5.

Example 4. Prove that Kn is planar if and only if n ≤ 4.

Page 113: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 113

Example 5. Investigate the planarity of the Petersen graph, which isgiven to the right.

2

1

y1x

x

2

3

y3

y

x

Definition. Let G = (V,E) be a graph, and let {x, y} be any edge of G. The process of choosing a newvertex z not in V and replacing the edge {x, y} with two new edges {x, z} and {z, y} is called subdividing

the edge {x, y}, and it leads to a new graph. A graph H is called a subdivision of G if H can be obtainedfrom G by successively subdividing edges of G.

Theorem 13.2.3 (Kuratowski’s Theorem). A graph G is planar if and only if it does not havea subgraph that is a subdivision of a K5 or of a K3,3.

Page 114: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

114 Sonoma State University

1. For each of the following, decide whether or not the graph is planar. If it is, draw a planar representation ofthe graph. If not, show that it is not planar.

(a)

(b)

(c)

(d)

Page 115: Combinatorics and Graph Theory Workbook · Combinatorics and Graph Theory ... Chapter 11 – Introduction to Graph Theory Section 11.1 – Basic Properties ..... 70 Section 11.2 –

Math 316 Workbook 115

2. In this problem, you will investigate the planarity of the complete bipartite graph K3,3.

(a) Draw K3,3 with as few edge crossings as possible. Do you think K3,3 is planar?

(b) Does K3,3 satisfy the inequality e ≤ 3n− 6? What, if anything, can you conclude from this?

(c) Observe that K3,3 has no cycles of odd length because it is bipartite. Therefore, if it were planar, wewould have fi ≥ 4 for all i, where fi represents the number of edges that border on the ith region. Usethis fact and a similar argument as in our proof of Euler’s Theorem to prove that, if K3,3 were planar,then e ≤ 2n− 4.

(d) Use part (c) to show that K3,3 is not planar.