0% found this document useful (0 votes)
67 views

Part-I Combinatorics: Elementary Counting Principles Objectives

This document discusses elementary counting principles in combinatorics. It introduces the addition principle, which states that if task A can be done in m ways and task B in n ways, there are m + n ways to do one of the tasks. It also covers the inclusion-exclusion principle, which is used when tasks can be done simultaneously. It states that if task A can be done in m ways, task B in n ways, and both tasks can be done in k ways, there are m + n - k ways to do at least one of the tasks. Several examples are provided to demonstrate applying these principles to counting problems.

Uploaded by

Ivan Misic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Part-I Combinatorics: Elementary Counting Principles Objectives

This document discusses elementary counting principles in combinatorics. It introduces the addition principle, which states that if task A can be done in m ways and task B in n ways, there are m + n ways to do one of the tasks. It also covers the inclusion-exclusion principle, which is used when tasks can be done simultaneously. It states that if task A can be done in m ways, task B in n ways, and both tasks can be done in k ways, there are m + n - k ways to do at least one of the tasks. Several examples are provided to demonstrate applying these principles to counting problems.

Uploaded by

Ivan Misic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 166

PART-I COMBINATORICS

CHAPTER 1
ELEMENTARY COUNTING PRINCIPLES
Objectives:-On completion of the chapter the students will be able to:

 Identify the elementary counting principle.


 Solve a counting problems using a counting method
 Identify the difference between the permutation and combination of a counting
method
 Understand and differentiate the method of permutation with and without
repetition.
 Understand and differentiate the method of combination with and without
repetition.
 Understand the binomial theorem.

Introduction
Combinatorics is a fascinating branch of discrete Mathematics, which deals with the
art of counting. Very often we ask the question, In how many ways can a certain task
be done? Usually combinatorics comes to our rescue. In most cases, listing the
possibilities and counting them is the least desirable way of finding the answer to such
a problem. Enumeration, the counting of objects with certain properties is an
important part of combinatorics. We must count objects to solve many different type
of problems.
Counting is also required to determine whether there are enough telephone numbers
or internet protocol addresses to meet demand. Furthermore, counting techniques are
used extensively when probabilities of events are computed.
Discrete Mathematics And Combinatorics (Math 393) 2012

The elementary counting principle, which we will study section 1.1 to 1.3 can solve a
tremendous variety of problems. We can phrase many counting problems in terms of
ordered or unordered arrangements of the objects and combinations are used in many
counting problems.

1.1 Addition principle


Objective: After completing this section the student should be able to:
 Understand the addition principle
 Solve some problems using addition principle.

Theorem1.1 (Addition principle)

Let 𝐴 and 𝐵 be two mutually exclusive tasks. Suppose task 𝐴 can be done in 𝑚 ways
and task 𝐵 in 𝑛 ways.Then there are 𝑛 + 𝑚 ways to do one of these tasks.
Example 1.1 Suppose that either a member of the mathematics faculty or a student
who is mathematics major is chosen as a representative to a university committee.
How many different choices are there for this representative if there are 37 members
of the mathematics faculty and 83 mathematics majors?
Solution: Let 𝐴 be the task, choosing a member of the mathematics faculty, can be
done in 37 ways. Let 𝐵 be the task, choosing a mathematics major, can be done in 83
ways. From the sum (addition) rule, it follows that there are 37 + 83 = 120 possible
ways to pick this representative.
The addition principle can be extended to any finite number of pair wise mutually
exclusive tasks, using induction, for instance, let 𝑇1 , 𝑇2 , 𝑇3 ,…, 𝑇𝑛 be 𝑛 pair wise
mutually exclusive tasks. Suppose task 𝑇𝑖 can be done in 𝑚𝑖 ways, where1 ≤ i ≤ n.
Then task𝑇1 , 𝑇2 , 𝑇3 ,…, 𝑇𝑛 can be done to 𝑚1 + 𝑚2 + ⋯ + 𝑚𝑛 ways.
Example 1.2: A freshman has selected four courses and needs one more course for
the next term. There are 15 courses in English, 10 in French and 6 in German. She is
eligible to task. In how many ways can she choose the fifth course?
Solution: Let 𝐸 be the task of selecting a course in English, 𝐹 be the task of selecting
a course in French and 𝐺 that of selecting a course in German.

Mathematics Program: By Werku Debele (MSc.) Page 1


Discrete Mathematics And Combinatorics (Math 393) 2012

These tasks can be done in 15,10 and 6 ways, respectively, and are mutually
exclusive, so by addition principle, the fifth course can be selected in |𝐸| + |𝐹| +
|𝐺| = 15 + 10 + 6 = 31 way.
Example 1.3: A student can choose a computer project from one of three lists. The
three lists contain 23,15and 19 possible projects, respectively. How many possible
projects are there to choose from?
Solution: Let 𝐴, 𝐵 𝑎𝑛𝑑 𝐶 be the first, second and third lists respectively. And the
list can be done 23, 15 and 19 ways respectively. Hence there are 23+15+19=57
projects to choose from.
The sum can be phrased in terms of sets as: if 𝐴1 , 𝐴2 , … , 𝐴𝑛 are disjoint sets, then the
number of elements in the union of these sets is the sum of the number of elements in
them. To relate this to our statement of the sum rule, let 𝑇𝑖 be the task of choosing an
element from 𝐴𝑖 for 𝑖 = 1,2, … , 𝑛. There are |𝐴𝑖 | (|𝐴𝑖 | is the notation for the
cardinality of 𝐴𝑖 ) ways to do 𝑇𝑖 . From the sum rule, since no two of the tasks can be
done, at the same time the number of ways to choose an element from one of the sets,
which is the number of elements in the union is
|𝐴1 ∪ 𝐴2 ∪ … 𝐴𝑛 | = |𝐴1 | + |𝐴2 | + ⋯ + |𝐴𝑛 |
This equality applies only when the sets in question are disjoint.
Exercise 1.1
1. There are 18 mathematics majors and 325 computer science major at a
college. How many ways are there to pick one representative who is either
mathematics major or a computer science major?
2. Let 𝐴 and 𝐵 be finite disjoint sets, where |𝐴| = 𝑎, and |𝐵| = 𝑏. find |𝐴 ∪ 𝐵|
3. Let 𝑈 be a universal set contain the disjoint set 𝐴 and 𝐵 such that |𝐴| = 2𝑎 +
𝑏, |𝑈| = 2𝑎 + 3𝑏. find |𝐴 ∪ 𝐵|

1.2. The inclusion- exclusion principle

Objective: After completing this section the student should be able to:
 Understand the method of inclusion-exclusion principle
 Understand the difference between the method of sum rule and
inclusion-exclusion principle.

Mathematics Program: By Werku Debele (MSc.) Page 2


Discrete Mathematics And Combinatorics (Math 393) 2012

 Solve some problems using inclusion-exclusion principle.


When two tasks can be done at the same time, we can’t use the sum rule to count the
number of ways to do one of the two tasks. Adding the number of ways to do
one of the two tasks. Adding the number of ways to do each task leads to an over
count, since the ways to do both tasks are counted twice.
Question: Let 𝐴 𝑎𝑛𝑑 𝐵 be any two finite sets. How is |𝐴 ∪ 𝐵|related |𝐴| 𝑎𝑛𝑑|𝐵| ?
Theorem 1.2 (Inclusion-exclusion principle)
Suppose a task 𝐴 can be done in 𝑚 ways, task 𝐵 in 𝑛 ways and both can be
accomplished in 𝑘 different ways. Then task 𝐴 𝑜𝑟 𝐵 can be done in 𝑚 + 𝑛 − 𝑘
We can phrase this counting principle in terms of sets. Let 𝐴 𝑎𝑛𝑑 𝐵 be two finite sets.
Then
|𝐴 ∪ 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵|
Example 1.4: Find the number of positive integers ≤ 300 and divisible by 2 or 3.
Solution: Let 𝐴 = {𝑥 ∈ ℕ: 𝑥 ≤ 300 𝑎𝑛𝑑 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2}
𝐵 = {𝑥 ∈ ℕ: 𝑥 ≤ 300 𝑎𝑛𝑑 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3}
Then 𝐴 ∩ 𝐵 consists of positive integers ≤ 300 that are divisible by 2 and 3. That is,
divisible by 6. Thus,
𝐴 = {2,4, … ,300}
𝐵 = {3,6, … ,300} and 𝐴 ∩ 𝐵 = {6,12, … ,300}.
Clearly,|𝐴| = 150, |𝐵| = 100 𝑎𝑛𝑑 |𝐴 ∩ 𝐵| = 50 . By theorem 1.2,
|𝐴 ∪ 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵| = 150 + 100 − 50 = 200
Thus, there are 200 positive integers ≤ 300 and divisible by 2or 3.
Example 1.5 Find the number of positive integers ≤ 3000 and not divisible by 7 or 8.
Solution: Let 𝐴 = {𝑥 ∈ ℕ: 𝑥 ≤ 3000 𝑎𝑛𝑑 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 7}
𝐵 = {𝑥 ∈ ℕ: 𝑥 ≤ 3000 𝑎𝑛𝑑 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 8}
We need to find |𝐴′ ∩ 𝐵 ′ |
|𝐴′ ∩ 𝐵 ′ | = |(𝐴 ∪ 𝐵)′ | = |𝑈| − |𝐴 ∪ 𝐵| , Where 𝑈 be the universal set.
= |𝑈| − |𝐴| − |𝐵| + |𝐴 ∩ 𝐵|
3000 3000 3000
= 3000 − − +
7 8 56

= 3000 − 428 − 375 + 53 = 2250


Corollary 1.3: Let 𝐴, 𝐵 𝑎𝑛𝑑 𝐶 be three finite sets.
Then |𝐴 ∪ 𝐵 ∪ 𝐶| = |𝐴| + |𝐵| + |𝐶| − |𝐴 ∩ 𝐵| − |𝐴 ∩ 𝐶| − |𝐵 ∩ 𝐶| + |𝐴 ∩ 𝐵 ∩ 𝐶|

Mathematics Program: By Werku Debele (MSc.) Page 3


Discrete Mathematics And Combinatorics (Math 393) 2012

Proof:
|𝐴 ∪ 𝐵 ∪ 𝐶| = |𝐴 ∪ (𝐵 ∪ 𝐶)|
= |𝐴| + |𝐵 ∪ 𝐶| − |𝐴 ∩ (𝐵 ∪ 𝐶)| (By theorem 1.2)
= |𝐴| + [|𝐵| + |𝐶| − |𝐵 ∩ 𝐶|] − [|𝐴 ∩ 𝐵| ∪ |𝐴 ∩ 𝐶|]
= |𝐴| + |𝐵| + |𝐶| − |𝐵 ∩ 𝐶| − [|𝐴 ∩ 𝐵| + |𝐴 ∩ 𝐶| − |(𝐴 ∩ 𝐵) ∩ (𝐴 ∩ 𝐶)|]
= |𝐴| + |𝐵| + |𝐶| − |𝐵 ∩ 𝐶| − |𝐴 ∩ 𝐵| − |𝐴 ∩ 𝐶| + |𝐴 ∩ 𝐵 ∩ 𝐶|
Example 1.6: Find the number of positive integers ≤ 2076 and divisible by 3, 5 and
7.
Solution: Let 𝐴, 𝐵 𝑎𝑛𝑑 𝐶 denote the sets of positive integers ≤ 2076 and divisible by
3, 5 and 7, respectively, by the corollary 1.3
|𝐴 ∪ 𝐵 ∪ 𝐶| = |𝐴| + |𝐵| + |𝐶| − |𝐴 ∩ 𝐵| − |𝐴 ∩ 𝐶| − |𝐵 ∩ 𝐶| + |𝐴 ∩ 𝐵 ∩ 𝐶|
2076 2076 2076 2076 2076 2076 2076
= + + − − − +
3 5 7 15 21 35 105

= 692 + 415 + 296 − 138 − 59 − 98 + 19 = 1127


Example 1.7:A survey among 100 students show that of the three ice-cream flavors
vanilla, chocolate and strawberry,50 students like vanilla, 43 like chocolate, 28 like
strawberry ,13 like vanilla and chocolate , 11 like chocolate and strawberry , 12 like
strawberry and vanilla and 5 like all of them. Find the number of students surveyed
who like each of the following flavors
a) Chocolate but not strawberry
b) Chocolate and strawberry but not vanilla
c) Vanilla or chocolate but not strawberry.
Solution: Let V, C and S symbolize the set of students who like vanilla, chocolate and
strawberry flavors, respectively, draw three intersecting circles to represent them in
the most general case as in figure 1.1
- 5 students like all flavors’, |𝑉 ∩ 𝐶 ∩ 𝑆| = 5
- 12 students like both strawberry and vanilla, |𝑆 ∩ 𝑉| = 12 but 5 of them like
chocolate also, therefore, |(𝑆 ∩ 𝑉) − 𝐶| = 5
- 11 students like chocolate and strawberry so, |𝐶 ∩ 𝑆| = 11 but 5 of them like
vanilla , therefore, |(𝑆 ∩ 𝐶) − 𝑉| = 6

Mathematics Program: By Werku Debele (MSc.) Page 4


Discrete Mathematics And Combinatorics (Math 393) 2012

Figure 1.1
- 13 students like vanilla and chocolate, so |𝑉 ∩ 𝐶| = 13 but 5 of them like
strawberry also, therefore, |(𝐶 ∩ 𝑉) − 𝑆| = 8
Of the 28 students who like strawberry, we have already a accounted for 7+5+6=18.
So, the remaining 10 students belongs to the set (𝑆 − (𝑉 ∪ 𝐶))
Similarly, |𝑉 − (𝐶 ∪ 𝑆)| = 30 𝑎𝑛𝑑 |𝐶 − (𝑆 ∪ 𝑉)| = 24
Thus, we have accounted for 90 of the 100 students.
The remaining 10 students lie outside the region 𝑉 ∪ 𝑆 ∪ 𝐶 as in figure 1.Now,
a) |𝐶 − 𝑆| = 8 + 24 = 32
So, 32 students like chocolate but not strawberry
b) |(𝐶 ∩ 𝑆) − 𝑉| = 6 Therefore, 6 students like both chocolate and strawberry
but not vanilla.
c) 30 + 8 + 24 = 62 students like vanilla or chocolate but not strawberry. They
are presented by the region (𝑉 ∩ 𝐶) − 𝑆.

Exercise 1.2

1. Let 𝐴 𝑎𝑛𝑑 𝐵 be two sets such that |𝐴| = 2𝑎 − 𝑏 , |𝐵| = 2𝑎, |𝐴 ∩ 𝐵| = 𝑎 − 𝑏


and |𝑈| = 3𝑎 + 2𝑏. Find the cardinality of each set.
a) 𝐴 ∪ 𝐵 b) 𝐴 − 𝐵 c) 𝐵 ′ d) 𝐴′ − 𝐴′

Mathematics Program: By Werku Debele (MSc.) Page 5


Discrete Mathematics And Combinatorics (Math 393) 2012

2. Let 𝐴 𝑎𝑛𝑑 𝐵 be finite disjoint set, where |𝐴| = 𝑎, |𝐵| = 𝑏. Find the
cardinality of each set
a) 𝐴∪𝐵 b) 𝐴 − 𝐵 c) 𝐵 − 𝐴
3. Find the cardinality of each set in (2) where 𝐴 ⊆ 𝐵, B is finite
4. According to a survey among 160 college students, 95 students takes a course
in English , 72 takes a course in French, 67 takes a course in German , 35 take a
course in English and in French , 37 takes a course in French and in German, 40
takes a course in
German and in English and 25 take a course in all three language. Find the number
of students in the survey who take a course in
a) English but not German b) English, French or German

1.3. Multiplication principle

Objective: After completing this section the student should be able to:
 Understand the multiplication principle
 Solve some counting problems using multiplication principle

The most important counting principle is the multiplication principle. It allows for
counting (like, example the experiment consisting of both rolling a dice and tossing a
coin), and this principle apply when a procedure is made up of separate task.
Multiplication principle: if an experiment consisting of 𝑘 independent steps, in such a
way that:
 The first step has 𝑛1 possible out come
 Any outcome of the first can be followed by 𝑛2 outcome of the 2nd step,
 Any one of the first and the second step can be followed 𝑛3 outcome of the 3rd
step
.
.
.
Then the total number of outcomes 𝑛1 , 𝑛1 ,…, 𝑛𝑘

Mathematics Program: By Werku Debele (MSc.) Page 6


Discrete Mathematics And Combinatorics (Math 393) 2012

In total 𝑛1 𝑛2 𝑛3 =
3 × 2 × 4 = 24
possible out coomes.

𝑛1 = 3 choices 𝑛2 = 2 choices 𝑛3 = 4 choices

Figure 1. 2 Illustrate multiplication principles

Example 1.8 How many distinct phone numbers are there if we assume that a phone
number is made of 6 digits with the first digit begin different from 0 and 1?
Solution: Assume that 𝑎1 be the first digit, 𝑎2 be the second digits, 𝑎3 , 𝑎4, 𝑎5, 𝑎6 be
the 3rd , 4th ,5th and 6th digit respectively. But 𝑎1 ≠ 0 𝑎𝑛𝑑 1. So we have 8 possible
choice of 𝑎1 and we have 10 possible choices for the digit 𝑎2 to 𝑎6 .
Therefore, 8 × 105 = 800,000 distinct phone number.
Example 1.9 In how many ways can the letters of the word ‘CAR’ be reordered to
produce distinct ‘words’.
Solution: We have 3 possibilities for the first letter, 2 possibilities for the 2nd letter
and have to use the remaining letter. So, there are 3 × 2 × 1 = 6 distinct ‘words’.
Theorem 1.4 (Multiplication principle)
Suppose a task 𝑇 is made up of two subtasks. Subtask 𝑇1 followed by subtask 𝑇2 . If
subtask 𝑇1 can be done in 𝑚 1ways and subtask 𝑇2 in 𝑚 2 different way for each way
subtask 𝑇1 can be done, then task 𝑇 can be done in 𝑚1 𝑚2 ways.
Example 1.10 Find the number of two letter words that being with a vowel a,e,i,o or
u.
Solution :The task of forming a two-letter word consists of two subtasks 𝑇1 𝑎𝑛𝑑 𝑇2 ,
𝑇1 consisting of the first letter and 𝑇2 selecting the second letter; as figure 1.3 shows

Mathematics Program: By Werku Debele (MSc.) Page 7


Discrete Mathematics And Combinatorics (Math 393) 2012

Number of choices

? ?
Subtask 𝑇1 Subtask 𝑇2
Figure 1.3
Since each word must begin with a vowel, 𝑇1 can be accomplished in five ways.
There is no restriction on the choice of the 2nd letter, so 𝑇2 can be done in 26 ways
(figure 1.4).
Number of choices

5 26
Subtask 𝑇1 Subtask 𝑇2
Figure1. 4
Therefore, by the multiplication principle the task can be performed in
5 × 26 = 130 different ways. In other words, 130 two letter words begin with a
vowel.
The multiplication principle can also be extended to any finite number of subtasks.
Suppose a task 𝑇 can be done by n successive subtasks, 𝑇1 , 𝑇2 , … , 𝑇𝑛 . If subtask 𝑇𝑖 can
be done in 𝑚𝑖 different ways after𝑇𝑖−1 has been completed, where 1 ≤ 𝑖 ≤ 𝑛, then
task 𝑇 can be done in 𝑚1 × 𝑚2 × 𝑚3 × … × 𝑚𝑛 ways.
The multiplication principle can be applied to prove that a set with size n has 2𝑛
subsets, as shown below.
Example 1.11: Show that a set 𝑆 with n elements has 2𝑛 subset.
Solution: Every subset of 𝑆 can be uniquely identified by an 𝑛 − bit words (see
figure1.5). The task of forming an 𝑛 –bit word can be broken down to n subtasks.
Selecting a bit for each of the n- positions. Each position in the word


? ? ? ? ? ? ? ?
Figure 1.5
has two choices 0 or 1: so by the multiplication principle, the total number of n-bit
words that can be formed is 2.2 .2…2=2n(see figure1. 6)

Mathematics Program: By Werku Debele (MSc.) Page 8


Discrete Mathematics And Combinatorics (Math 393) 2012


2 2 2 2 2 2 2
Figure 1. 6
Example 1.12: How many one to one functions are there from a set with 𝑚 elements
to one with 𝑛 elements?
Solution: First note when 𝑚 > 𝑛 there is no one to one functions from a set with 𝑚
elements to a set with 𝑛 elements. Now let 𝑚 ≤ 𝑛. Suppose the elements in the
domain are 𝑎1 , 𝑎2 , … , 𝑎𝑚 . There are 𝑛 ways to choose the value of the function at 𝑎1 .
Since the function is one to one, the value of the function at 𝑎2 can be picked in (𝑛 −
1) ways (since the value used for 𝑎1 can’t be used again). In general, the value of the
function at 𝑎𝑘 can be choosen in 𝑛 − 𝑘 + 1 ways. By the multiplication principle,
there are
𝑛(𝑛 − 1)(𝑛 − 2) … (𝑛 − 𝑚 + 1) one to one functions from aset with 𝑚 elements to
one with 𝑛 element.
For instance, there are 5 × 4 × 3 = 60 one to one functions from a set with three
elements to a set with five elements.
Exercise 1.3
1. How many bit strings are there of length eight.
2. How many bit strings of length ten begin and end with a 1?
3. How many different functions are there from a set with 10 elements to a set
with the following numbers of elements
a) 2 b) 3 c) 4 d) 5
4. How many one to one function are there from a set with five elements to a set with
the following number of element
a) 4 b) 5 c) 6 d) 7
5. A multi-choice test contains ten questions. There are four possible answer for each
question
a) How many ways can a student answer the questions on the test if every
question is answered?
b) How many ways can a student answer the question on the test if the student
can leave answers blank?

Mathematics Program: By Werku Debele (MSc.) Page 9


Discrete Mathematics And Combinatorics (Math 393) 2012

6. A particular brand of shirt comes in 12 colors, has a male version and a female
version and comes in three sizes for each sex. How many different types of this shirt
are made?
1.4 permutation and combination
Objective: After completing this section the student should be able to:
 Understand the method of permutation and combination
 Explain the definition of permutation with and without repetition
 Explain the definition of combination with and without repetition
 Solve the counting problems using these methods.

Most counting problems we will be dealing with can be classified into one of four
categories. We explain such categories by means of an example.
Example1.13: Consider the set {𝑎, 𝑏, 𝑐, 𝑑}. Suppose we “select” two letters from these
four. Depending on our interpretation, we may obtain the following answers.
i. Permutations with repetitions. The order of listing the letters is important,
and repetition is allowed. In this case there are 4 ·4 = 16 possible selections:
𝑎𝑎 𝑎𝑏 𝑎𝑐 𝑎𝑑

𝑏𝑎 𝑏𝑏 𝑏𝑐 𝑏𝑑
𝑐𝑎 𝑐𝑏 𝑐𝑐 𝑐𝑑
𝑑𝑎 𝑑𝑏 𝑑𝑐 𝑑𝑑

ii. Permutations without repetitions. The order of listing the letters is


important, and repetition is not allowed. In this case there are 4 ·3 = 12 possible
selections: 𝑎𝑏 𝑎𝑐 𝑎𝑑

𝑏𝑎 𝑏𝑐 𝑏𝑑
𝑐𝑎 𝑐𝑏 𝑐𝑑
𝑑𝑎 𝑑𝑏 𝑑𝑐

iii. Combinations with repetitions. The order of listing the letters is not
important, and repetition is allowed. In this case there are

4 ·3
+ 4 = 10 possible selections:
2

Mathematics Program: By Werku Debele (MSc.) Page 10


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑎𝑎 𝑎𝑏 𝑎𝑐 𝑎𝑑

𝑏𝑏 𝑏𝑐 𝑏𝑑
𝑐𝑐 𝑐𝑑
𝑑𝑑
iv. Combinations without repetitions. The order of listing the letters is not
important, and repetition is not allowed. In this case there are.

4 ·3
= 6 Possible 𝑎𝑏 𝑎𝑐 𝑎𝑑
2

selections:
𝑏𝑐 𝑏𝑑
𝑐𝑑

Permutations without Repetitions


Definition 1.1. A permutation of a set of distinct objects is an ordered arrangement of
these objects, we also are interested in ordered arrangements of some of the elements
of a set.
A permutation of a set of 𝑛 (distinict) elements taken 𝑟 (0 ≤ 𝑟 ≤ 𝑛) at a time is an
arrangement of 𝑟 elements of the set. For convenience, it is called a 𝑟 − permutation.
If 𝑟 = 𝑛 then the 𝑟 − permutation is called a 𝑟 − permutation. The number of 𝑟 −
permutation of a set of size 𝑛 is denoted by 𝑝(𝑛, 𝑟), 𝑛 distinct objects can be
reordered in
𝑛! = 𝑛(𝑛 − 1)(𝑛 − 2) … 2 × 1 different ways of doing so.
Note: we will use the convention that 𝑜! = 1.
Example 1.14 :Find the number of permutation, that is, 3 −permutations of the
elements of the set {𝑎, 𝑏, 𝑐}
Solution: By the multiplication principle, the number of 3 −permutation of three
elements is 3 × 2 × 1 = 6. Or can be obtained systematically using a tree diagram.

Mathematics Program: By Werku Debele (MSc.) Page 11


Discrete Mathematics And Combinatorics (Math 393) 2012

1st element 2nd element 3rd element permutation


b c abc
a c b acb
a c bac
b c a bca
a b cab
c
b a cba

Figure 1.7
Example 1.15 .Eight runners take part in a race. How many different of ways of
allocating medals (gold, silver and bronze) are there?
Solution: We choose 𝑟 = 3 medalists from the 𝑛 = 8 runners (the order dosen’t
matter). The number of 3 −permutation of 8 runners is 8 × 7 × 6 = 336 ways the
medals can be handed out, thus, 𝑝(8,3) = 336.
If we went to choose only 𝑟 ≤ 𝑛 of the n objects and retain the order in which we
choose the object the there are 𝑝(𝑛, 𝑟) = 𝑛(𝑛 − 1)(𝑛 − 2) … (𝑛 − 𝑟 + 1) different
ways of doing so.
Theorem 1.5: The number of 𝑟 −permutation of a set of 𝑛 (distinict) elements is
given by
𝒏!
𝑝(𝑛, 𝑟) = (𝒏−𝒓)!

Proof: The first elements of the permutation can be chosen in 𝑛 ways, since there are
𝑛 elements in the set. There are (𝑛 − 1) ways to choose the second elements of the
permutation. Since there are (𝑛 − 1) elements left in the set after using the element
picked for the first position.Similarlly, there are (𝑛 − 2) ways to choose the third
element, as so on until there are exactly 𝑛 − (𝑟 − 1) = 𝑛 − 𝑟 + 1 ways to choose the
nth element. Thus, by the multiplication principle,
𝑝(𝑛, 𝑟) = 𝑛(𝑛 − 1)(𝑛 − 2) … (𝑛 − 𝑟 + 1)
(𝑛−𝑟)(𝑛−𝑟−1)…2×1
= 𝑛(𝑛 − 1)(𝑛 − 2) … (𝑛 − 𝑟 + 1) (𝑛−𝑟)(𝑛−𝑟−1)…2×1
𝑛(𝑛−1)(𝑛−2)…(𝑛−𝑟+1)(𝑛−𝑟)(𝑛−𝑟−1)…2×1 𝑛!
= (𝑛−𝑟)(𝑛−𝑟−1)…2×1
= (𝑛−𝑟)!

Mathematics Program: By Werku Debele (MSc.) Page 12


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑛!
𝑝(𝑛, 𝑟) =
(𝑛−𝑟)!
𝑛!
In particular, suppose 𝑟 = 𝑛 then 𝑝(𝑛, 𝑟) = 𝑝(𝑛, 𝑛) = = 𝑛!. So, 𝑝(𝑛, 𝑛) = 𝑛!
0!

Example 1.16 How many ways are there to select a first-prize winner, a second-
prize winner and a third-prize winner, from 100 different people who have entered
contest?
Solution: The number of ways to pick the three prize winner (1st ,2nd and 3rd ) is the
number of ordered selections of three elements from a set of 100 elements, that is the
3 −permutations of a set of 100 elements.
(100)! (100)! 100×99×98×97!
𝑝(100,3) = (100−3)! = = = 100 × 99 × 98 = 970,200
(97)! (97)!

Example 1.17: Find the number of words that can be formed by scrambling the letter
of the word SCRAMBLE (remember, a word is just an arrangement of symbols, it
need not make sense )?
Solution: The word SCRAMBLE contains eight distinct letters. Therefore, the
number of words that can be formed equals. The number of arrangement of the letters
in the word, namely
𝑝(8,8) = 8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320
Combinations without Repetitions
Consider again the case that we want to choose 𝑟 ≤ 𝑛 from 𝑛 objects, but this time
we do not want to retain the order. If we retained the order, there would be 𝑝(𝑛, 𝑟) =
𝑛!
possibilities. But 𝑟! of these ways result in the same set of 𝑟 objects. Since the
(𝑛−𝑟)!

ordering is not important, only their membership is important. We will investigate


such unordered arrangements in this section.
Definition 1.2: An 𝑟 −combination of elements of a set, where 0 ≤ 𝑟 ≤ 𝑛 , is an
unordered selection of 𝑟 elements from the set. Thus, an 𝑟 −combination is simply a
subset of the set with 𝑟 −elements. The number of 𝑟 −combinations of a set with 𝑛
𝑛
elements is denoted by 𝐶(𝑛, 𝑟)𝑜𝑟 ( ). Both notations frequently appear in
𝑟
combinatorics. The number of combination is also called the binomial coefficient.
Example 1.18: Find the number of 𝑟 −combinations of the set {𝑎, 𝑏, 𝑐} when 𝑟 =
0,1,2 𝑜𝑟 3

Mathematics Program: By Werku Debele (MSc.) Page 13


Discrete Mathematics And Combinatorics (Math 393) 2012

Solution:
 Exactly one subset contains zero element, the null set
Number of 0 − 𝑐ombinations: 𝐶(3,0) = 1
 Three subsets contain one elements each: {𝑎}, {𝑏} 𝑎𝑛𝑑 {𝑐}.
Number of 1 −combinations: 𝐶(3,1) = 3
 Three subset contains two elements each: {𝑎, 𝑏}, {𝑏, 𝑐}, 𝑎𝑛𝑑 {𝑐, 𝑎}
Number of 2 −combinations: 𝐶(3,2) = 3
 Finally, exactly one subset contains three elements: the set itself
Number of 3 −compinations: 𝐶(3,3) = 1
Theorem 1.6: The number of 𝑟 −combinatios of a set with n elements, where 𝑛 is a
nonnegative integer and 𝑟 is an integer with 0 ≤ 𝑟 ≤ 𝑛 equals
𝑛!
𝐶(𝑛, 𝑟) = (𝑛−𝑟)!𝑟!

Proof: By definition, there are 𝐶(𝑛, 𝑟), 𝑟 − combinations of a set of 𝑛 −elements,


Each combination contains 𝑟 −elements and contributes 𝑝(𝑟, 𝑟) = 𝑟!;
𝑟 −permutation, so, the total number of 𝑟 −permutation is 𝑟! 𝐶(𝑛, 𝑟). But by
𝑛!
definition, there are 𝑝(𝑛, 𝑟) = (𝑛−𝑟)! 𝑟 −permutations. Therefore,
𝑛!
𝑟! 𝐶(𝑛, 𝑟) = (𝑛−𝑟)!
𝑛!
That is, 𝐶(𝑛, 𝑟) = (𝑛−𝑟)!𝑟!

Note:
𝑛!
1. 𝐶(𝑛, 0) = 0!(𝑛−0)! = 1, that is, the number of 0 −combinations of a set with n

elements is one.
𝑛!
2. 𝐶(𝑛, 𝑛) = 𝑛!(𝑛−𝑛)! = 1, that is, the number of 𝑛 −combinations of a set with 𝑛

elements is also one.


Corollary 1.7 Let 𝑛 and 𝑟 be nonnegative integer with 𝑟 ≤ 𝑛. Then
𝐶(𝑛, 𝑟) = 𝐶(𝑛, 𝑛 − 𝑟)
Proof: From theorem 1.6, it follows that
𝑛
𝐶(𝑛, 𝑟) = 𝑟!(𝑛−𝑟)! And
𝑛 𝑛!
𝐶(𝑛, 𝑛 − 𝑟) = (𝑛−𝑟)!(𝑛−(𝑛−𝑟))! = (𝑛−𝑟)!(𝑛−𝑛+𝑟)!
𝑛! 𝑛!
= (𝑛−𝑟)!𝑟! = 𝑟!(𝑛−𝑟)!

Mathematics Program: By Werku Debele (MSc.) Page 14


Discrete Mathematics And Combinatorics (Math 393) 2012

Hence, 𝐶(𝑛, 𝑟) = 𝐶(𝑛, 𝑛 − 𝑟)


Example 1.19
John wants to go to the pub with 3 of his 5 best friends. How many options does John
have?
Solution: 3-combination of 5 is
5! 5! 5×4×3! 5×4
𝐶(5,3) = 3!(5−3)! = 3!2! = 2×1×3! = = 10
2

Permutations with Repetitions


The permutation and computation examined so far involved unrepeated items. For
instance, a letter or digit may be used more than once on a licenses plate. When a
dozen dounts are selected, each variety can be chosen repeatedly. This contrasts with
the counting problems discussed earlier in the chapter where we only be used at most
once. In this section we will show how to solve counting problems where elements
may use more than one. Counting permutation when repeated is allowed can easily
be done using the product rule.
Example 1.20: How many strings of 𝑛 length can be formed from the English
alphabet?
Solution: By the product rule, since there are 26 letters and since each letter can be
used repeatedly, we see that there are 26𝑛 strings of length n.
Theorem 1.8: The number of 𝑟 −permutation of a set of 𝑛 objects with repetition
allowed is 𝑛𝑟
Proof: There are 𝑛 ways to select an element of the set of each of the 𝑟 position in the
𝑟 −permutation is allowed, since for each choice all 𝑛 objects are available. Hence by
the multiplication principle there are 𝑛𝑟 𝑟 −permutation when a
repetition is allowed.
Theorem 1.9: The number of permutation of 𝑛 items of which 𝑛1 items are of one
type, 𝑛2 are of a second type, and 𝑛𝑘 are of a kth type, is
𝑛!
𝑛1 ! 𝑛2 ! …𝑛𝑘

Mathematics Program: By Werku Debele (MSc.) Page 15


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 1.21 Find the number of bytes contain exactly three 0’s
Solution:
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑦𝑡𝑒𝑠 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑦𝑡𝑒𝑠 𝑐𝑜𝑛𝑡𝑎𝑛𝑖𝑛𝑔 𝑡ℎ𝑟𝑒𝑒 0′ 𝑠
( )=( )
𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑔 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑡ℎ𝑟𝑒𝑒 0′𝑠 𝑎𝑛𝑑 𝑓𝑖𝑣𝑒 1′ 𝑠
=
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑒𝑟𝑚𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑠 𝑜𝑓 𝑒𝑖𝑔ℎ𝑡 𝑠𝑦𝑚𝑏𝑜𝑙𝑠 𝑜𝑓
( )
𝑤ℎ𝑖𝑐ℎ 𝑡ℎ𝑟𝑒𝑒 𝑎𝑟𝑒 𝑙𝑖𝑘𝑒 (0′ 𝑠)𝑎𝑛𝑑 𝑓𝑖𝑣𝑒 𝑎𝑟𝑒 𝑎𝑙𝑖𝑘𝑒 (1′𝑠)
8!
= 3!5!

= 56
Example 1.22. Find the number of different arrangement of the letter of the word
REFERENCE.
Solution: The word REFERENCE contain nine letters; two R’s and four E’s, the
9!
remaining letters are distinct, now by theorem 1.9, the total number of words are2!4! =

7560.
Combinations with Repetitions
Just as permutation can deal with repeated elements, so can combinations (called
selections).
Example 1.23 Find the number of 3 −combination of the set 𝑆 = {𝑎, 𝑏}
Solution: 𝑆 contains 𝑛 = 2 elements. Since each combination must contain three
elements 𝑟 = 3. Since 𝑟 > 𝑛, the elements of each combination must be repeated.
Consequently, a combination may contain three a’s, two a’s and one b’s, one a’s and
two b’s or three b’s. Using the set notation, the 3-combinations are
{𝑎, 𝑎, 𝑎}, {𝑎, 𝑎, 𝑏}, {𝑎, 𝑏, 𝑏}, 𝑎𝑛𝑑 {𝑏, 𝑏, 𝑏}
So, there are four 3-combination of a set of two elements.
Theorem 1.10: The number of 𝑟 −combinations with repetition from a set of 𝑛
elements is
𝐶(𝑛 + 𝑟 − 1, 𝑟).
Proof: Each 𝑟 −combination with repeated elements from a set of 𝑛 elements can be
considered a string of 𝑟 𝑥′𝑠 and (𝑛 − 1) slashes (that means, for instance if 𝑛 =
3 𝑥𝑥 ∕ 𝑥𝑥 ∕ 𝑥𝑥 indicates that two elements select 1st task, two select 2nd and two
select 3rd task) each strings contains 𝑛 + 𝑟 − 1 symboles,of which 𝑟 are alike (𝑥’𝑠)

Mathematics Program: By Werku Debele (MSc.) Page 16


Discrete Mathematics And Combinatorics (Math 393) 2012

and 𝑛 − 1 are alike (slashes).Therefore by theorem 1.9,the number of such strings,


that is r-combination equals
(𝑛+𝑟−1)! 𝑛+𝑟−1
= 𝐶(𝑛 + 𝑟 − 1, 𝑟) = ( )
𝑟!(𝑛−1)! 𝑟
Example 1.24. Suppose that a cookie shop has four different kinds of cooking. How
many different ways can six cookies be chosen? Assume that only the types of cookie
are not the individual cookies or the order in which they are chosen matter
Solution: The number of ways to chose six cookies is the number of 6-combinations
of a set with four elements. From theorem 1.10, this equals
𝐶(4 + 6 − 1,6) = 𝐶(9,6). Since
9! 9! 9×8×7×6!
𝐶(9,6) = 𝐶(9,3) = (9−3)!3! = 6!3! = 3×2×1×6! = 84

There are 84 different ways to chosen the six cookies.


Table 1.1 gives a summary of the different ways how 𝑟 object can be drawn from
𝑛 object

With repetition Without repetition


Retaining order 𝑛! 𝑛𝑟
𝑝(𝑛, 𝑟) =
(𝑛 − 𝑟)!
Not retaining order 𝑛 𝑛+𝑟−1
𝐶(𝑛, 𝑟) = ( ) ( )
𝑟 𝑟
𝑛! (𝑛 + 𝑟 − 1)!
= =
(𝑛 − 𝑟)! 𝑟! 𝑟! (𝑛 − 1)!

Table 1.1 different ways of drawing from n objects.


Exerices1.4
1. Make each sentence as true or false. When 𝑛 is an arbitrary non negative
integer and 0 ≤ 𝑟 ≤ 𝑛
a) 0! = 0 f) p(n, r) = p(n, n − r)
b) 5 × 4! = 5! g) 1! = 1
c) (2 + 5)! = 2! + 5! h) (m + n)! = m! + n!
d) (2 × 3)! = 2! 3! i) (mn)! = m! n!
e) n(n − 1)! = n! j) p(n, 0) = 0
2. Find the number of two-digit numerals that can be formed using the digits
2,3,5,6𝑎𝑛𝑑 9 and that contain no repeated digits.

Mathematics Program: By Werku Debele (MSc.) Page 17


Discrete Mathematics And Combinatorics (Math 393) 2012

3. How many permutation are there of the set {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓}?


4. Let 𝑆 = {1,2,3,4,5}
a) List all the 3 −permutation of S
b) List of the 3 −combination of S
5 . How many bit strings of length ten contain
a) Exactly four 1 s
b) At most four 1 s
c) An equal number of 0 s and 1 s
5. Solve the equation:
a) 𝑝(𝑛, 1) = 6 c) 𝑝(𝑛, 𝑛 − 1) = 5040
b) 𝐶(𝑛, 1) = 10 d) 𝐶(𝑛, 𝑛 − 2) = 55

6. In how many different ways can five elements be selected order from a set with
three elements when repetition is allowed?
7. How many ways are there to select five unordered elements from a set with three
elements when repetition is allowed.
8. How many different ways are there to choose a dozen dounts from the 21 varieties at
a dount shpo?
9. A bagel shop has onion bagels, poppy seed bagels, egg bagels, salty bagels and plain
bagels. How many ways are there to choose.
a. Six bagels
b. A dozen bagels
c. Two dozen bagels
d. A dozen bagels with at least one of each kind
e. A dozen bagels with at least three egg bagels and no more than two slaty
bagels
10. How many different strings can be made from the letters in MISSISSIPPI, using all
the letters.
11. How many different strings can be made from the letter in ORONO, using some or all
of the letters
12. How many strings with five or more characters can be formed from the letters in
SEERESS?

Mathematics Program: By Werku Debele (MSc.) Page 18


Discrete Mathematics And Combinatorics (Math 393) 2012

1.5 The Binomial Theorem


Objective: After completing this section the student should be able to:

 Explain the binomial theorem


 Explain the Pascal’s triangle and Pascal identity
 Understand the binomial theorem.
 Solve same problems using binomial theorem.

The binomial theorem gives the coefficients of the expansion of powers of


binomial expression. A binomial expression is simply the sum of terms, such as
𝑥 + 𝑦.
Theorem 1.11(The Binomial Theorem) If 𝑛 is a nonnegative integer and 𝑥 and 𝑦
be a real variable, then
𝑛
(𝑥 + 𝑦)𝑛 = ∑𝑛𝑟=0 ( ) 𝑥 𝑛−𝑟 𝑦 𝑛
𝑟
The notation ∑ means that the sum extends over all integers.
Proof: Since (𝑥 + 𝑦)𝑛 = (𝑥 + 𝑦)(𝑥 + 𝑦) … (𝑥 + 𝑦) to n factors. (𝑥 + 𝑦)𝑛 is
expanded by multiplying an 𝑥 from some of the factors on the RHS and a 𝑦 from the
remaning factors. That is, every term is obtained by selecting an 𝑥 from any of the
𝑛 − 𝑟 factors and a 𝑦 from the remaining 𝑟 factor. Thus, every term in the expansion
is of the form 𝑐 𝑥 𝑛−𝑟 𝑦 𝑟 , where c denotes the coefficient and 0 ≤ 𝑟 ≤ 𝑛.
Notice that the coefficient of 𝑥 𝑛−𝑟 𝑦 𝑟 is the number of ways of selecting an 𝑥 from
any 𝑛 − 𝑟 of the 𝑛 factors (and hence a 𝑦 from the remaining 𝑟 factors). Therefore
Coefficient of
𝑛 𝑛
𝑥 𝑛−𝑟 𝑦 𝑟 = ( )=( )
𝑛−𝑟 𝑟
𝑛
So, every term in the expansion is of the form ( ) 𝑥 𝑛−𝑟 𝑦 𝑟 where 0 ≤ 𝑟 ≤ 𝑛. Thus,
𝑟
𝑛
(𝑥 + 𝑦)𝑛 = ∑4𝑟=0 ( ) 𝑥 𝑛−𝑟 𝑦 𝑛
𝑟
Example 1.25. Find the binomial expansion of (2𝑎 − 3𝑏)4
Solution: Here 𝑥 = 2𝑎 𝑎𝑛𝑑 𝑦 = 3b and 𝑛 = 4 .using the binomial theorem
4
(2𝑎 − 3𝑏)4 = (2𝑎 + (−3𝑏)) = ∑𝑛𝑟=0 ( ) 𝑥 4−𝑟 𝑦 𝑟
𝑟
4 4 4
= ( ) (2𝑎)4 + ( ) (2𝑎)3 (−3𝑏) + ( ) (2𝑎)2 (−3𝑏)2 +
0 1 2

Mathematics Program: By Werku Debele (MSc.) Page 19


Discrete Mathematics And Combinatorics (Math 393) 2012

4 4
( ) (2𝑎)(−3𝑏)3 + ( ) (−3𝑏)4
3 4
= (2𝑎)4 + 4(2𝑎)3 (−3𝑏) + 6(2𝑎)2 (−3𝑏)2 + 4(2𝑎)(−3𝑏)3 + (−3𝑏)4
= 16𝑎4 − 96 𝑎3 𝑏 + 216 𝑎2 𝑏 2 − 216𝑎𝑏 3 + 81𝑏 4
Example 1.26: What is the coefficient of 𝑥12 𝑦 13 in the expansion of (2𝑥 − 3𝑦)25
Solution : (2𝑥 − 3𝑦)25 = (2𝑥 + (−3𝑦))25. By the binomial theorem, we have
𝑛 𝑛
(2𝑥 − 3𝑦)25 = ∑𝑛𝑟=0 ( ) 𝑥 𝑛−𝑟 𝑦 𝑟 = ∑𝑛𝑟=0 ( ) (2𝑥)𝑛−𝑟 (−3𝑦)𝑟 .
𝑟 𝑟
Consequently, the coefficient of 𝑥12 𝑦 13 in the expansion is obtained when
𝑟 = 13 ,namely,
25 (2𝑥)25−13 25
( ) (−3𝑦)13 = ( ) (2𝑥)12 (−3𝑦)13
12 12
25
= ( ) (2)12 𝑥12 (−3)13 𝑦 13
12
25
= ( ) (2)12 (−3)13 𝑥12 𝑦 13
12
25!
= 13!12! 212 (−13)13

We can prove some useful identities using the Binomial Theorem.


Corollary 1.12 Let 𝑛 be a non negative integer. Then
𝑛
∑𝑛𝑟=0 ( ) = 2𝑛
𝑟
That is, the sum of the binomial coefficients is 2𝑛 , in other words, a set with 𝑛
elements has 2𝑛 subsets.
Proof: By the binomial theorem
𝑛
(𝑥 + 𝑦)𝑛 = ∑𝑛𝑟=0 ( ) 𝑥 𝑛−𝑟 𝑦 𝑛
𝑟
𝑛 𝑛
Let 𝑥 = 𝑦 = 1, then (𝑥 + 𝑦)𝑛 = (1 + 1)𝑛 = ∑𝑛𝑟=0 ( ) 1𝑛−𝑟 1𝑛 = ∑𝑛𝑟=0 ( )
𝑟 𝑟
𝑛
Thus, ∑𝑛𝑟=0 ( ) = 2𝑛
𝑟
Corollary 1.13 Let 𝑛 be a positive integer. Then
𝑛
∑𝑛𝑟=0(−1)𝑟 ( ) = 0
𝑟
Proof: By the binomial theorem it follows that
𝑛
0 = 0𝑛 = (1 + (−1))𝑛 = ∑𝑛𝑟=0 ( ) (1)𝑛−𝑟 (−1)𝑟
𝑟
𝑛
= ∑𝑛𝑟=0 ( ) (−1)𝑟
𝑟
𝑛
= ∑𝑛𝑟=0(−1)𝑛 ( )
𝑟

Mathematics Program: By Werku Debele (MSc.) Page 20


Discrete Mathematics And Combinatorics (Math 393) 2012

Corollary 1.14
𝑛 𝑛 𝑛 𝑛 𝑛 𝑛
( ) + ( ) + ( ) + ⋯ += ( ) + ( ) + ( ) + ⋯
0 2 4 1 3 5
Where 𝑛 ≥ 1,that is, the sum of the “even” binomial coefficient equals that of the
“odd” binomial coefficients.
Proof: By using the corollary 1.13, we have
𝑛
0 = ∑𝑛𝑟=0(−1)𝑟 ( )
𝑟
𝑛 𝑛 𝑛 𝑛
= ( ) (−1)0 + ( ) (−1)1 + ( ) (−1)2 + ⋯ + ( ) (−1)𝑛
0 1 2 𝑛
𝑛 𝑛 𝑛 𝑛 𝑛 𝑛
=( )−( )+( )−( )+( )−( )+⋯
0 1 2 3 4 5
𝑛 𝑛 𝑛 𝑛 𝑛 𝑛
= [( ) + ( ) + ( ) + ⋯ ] − [( ) + ( ) + ( ) + ⋯ ]
0 2 4 1 3 5
𝑛 𝑛 𝑛 𝑛 𝑛 𝑛
( )+( )+( )+⋯=( )+( )+( )+⋯
0 2 4 1 3 5
Corollary 1.15 Let n be a non negative integer. Then
𝑛
∑𝑛𝑟=0 2𝑟 ( ) = 3𝑛
𝑟
Proof: Again by the binomial theorem, put 𝑥 = 1 𝑎𝑛𝑑 𝑦 = 2 , then
𝑛 𝑛
(1 + 2)𝑛 = ∑𝑛𝑟=0 ( ) (1)𝑛−𝑟 (2)𝑟 = ∑𝑛𝑟=0 ( ) 2𝑟
𝑟 𝑟
𝑛
Hence , ∑𝑛𝑟=0 2𝑟 ( ) = 3𝑛
𝑟
Pascal’s identity and triangle
𝑛
Definition 1.3 The various binomial coefficients ( ) ,where 0 ≤ 𝑟 ≤ 𝑛, can be
𝑟
arranged in the form of a triangle, called Pascal’s triangle [Although Pascal’s triangle
is named after pascal, it appeared in 1330 work by the Chinese Mathematician
Chushi-kie], as shown in figure 1.8 and figure 1.9
0
( ) row 0
0
1 1
( ) ( ) row 1
0 1
2 2 2
( ) ( ) ( ) row 2
0 1 1
3 3 3 3
( ) ( ) ( ) ( ) row 3
0 1 2 3
4 4 4 4 4
( ) ( ) ( ) ( ) ( ) row 4
0 1 2 3 4
Figure 1.8

Mathematics Program: By Werku Debele (MSc.) Page 21


Discrete Mathematics And Combinatorics (Math 393) 2012

1 row 0
1 1 row 1
1 2 1 row 2
1 3 3 1 row 3
1 4 6 4 1 row 4
Figure1.9
Theorem 1.16 (Pascal identity) Let 𝑛 and 𝑟 be positive integers with 𝑛 ≥ 𝑟. Then
𝑛+1 𝑛 𝑛
( )=( )+( )
𝑟 𝑟−1 𝑟
Pascal’s triangle has the following property
𝑛 𝑛
 Pascal’s identity, together with the initial condition ( ) = ( ) = 1 for all
0 𝑛
integers 𝑛, can be used to recursive define binomial coefficients.
 Pascal’s triangle is symmetric about a vertical line through the middle. This is
so since 𝐶(𝑛, 𝑟) = 𝐶(𝑛, 𝑛 − 𝑟)

Theorem 1.17 (Vandermonde’s identity)


Let 𝑚, 𝑛 and r be non negative integers with r not exceeding either 𝑚 𝑜𝑟 𝑛. Then
𝑚+𝑛 𝑚 𝑛
( ) = ∑𝑟𝑘=0 ( )( )
𝑟 𝑟 − 𝑘 𝑘
Remark: This identity was discovered by Mathematician Alexander-Theophile Van
demonde in the eighteenth century
Proof: Suppose that there are 𝑚 items in one set and 𝑛 items in a second set. Then the
𝑚+𝑛
total number of ways to pick 𝑟 elements from the union of these sets is ( ).
𝑟
Another way to pick 𝑟 elements from the union is to pick 𝑘 elements from the first set
and then 𝑟 − 𝑘 elements from the second set, where 𝑘 is an integer with 0 ≤ 𝑘 ≤ 𝑟
𝑚 𝑛
,this can be done ( ) ( ) ways, using the r elements from the union also equal.
𝑘 𝑟−𝑘
𝑚+𝑛 𝑚 𝑛
( ) = ∑𝑟𝑘=0 ( ) ( )
𝑟 𝑘 𝑟−𝑘
This proved Vander -monde’s identity.
2𝑛 𝑛 2
Corollary 1.18 If n is a non negative integer then ( ) = ∑𝑛𝑘=0 ( )
𝑛 𝑘
Proof: We use Vander-mode’s identity with 𝑚 = 𝑟 = 𝑛 to obtain:
2𝑛 𝑛 𝑛 𝑛 2
( ) = ∑𝑛𝑘=0 ( ) ( ) = ∑𝑛𝑘=0 ( )
𝑛 𝑛−𝑘 𝑘 𝑘

Mathematics Program: By Werku Debele (MSc.) Page 22


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑛 𝑛
The last equality was obtained using the identity ( ) = ( )
𝑘 𝑛−𝑘
Theorem 1.19: Let 𝑛 and 𝑟 be non negative integers with 𝑟 ≤ 𝑛. Then
𝑛+1 𝑗
( ) = ∑𝑛𝑗=𝑟 ( )
𝑟+1 𝑟
Exercise 1.5

1. Using the binomial theorem expand each.


a) (𝑥 + 𝑦)6 b) (𝑥 + 𝑦)4 c) (2𝑥 − 1)5
2. Find the coefficient of 𝑥 5 𝑦 8 in (𝑥 + 𝑦)13
3. Find the coefficient of 𝑥 4 𝑦 5 in (2𝑥 − 3𝑦)9
4. Find the middle in the binomial expansion of each
1 2 1
a) (𝑥 + 𝑥)4 b) (2𝑥 + 𝑥)6 c) (𝑥 − 𝑥)6
𝑛 𝑛−1
5. Prove that if 𝑛 and 𝑘 are integers with 1 ≤ 𝑘 ≤ 𝑛 . then 𝑘 ( ) = 𝑛 ( )
𝑘 𝑘−1
6. ∑𝑛𝑟=0 (2𝑛) = ∑𝑛𝑟=1 ( 2𝑛 ) (hint use corollary 1.14 )
2𝑟 2𝑟 − 1
7. find a formula for
𝑖
a) ∑𝑛𝑖=2 ( 𝑖 ) b) ∑𝑛𝑖=3 ( )
2 3

Chapter summery
 Addition principle

If 𝐴 and 𝐵 are two mutually exclusive tasks and can be done in 𝑚 and 𝑛 ways,
respectively, then task a 𝐴 or 𝐵 can be done in 𝑚 + 𝑛 ways .
 Inclusion-exclusion principle
Suppose task 𝐴 can be done in 𝑚 ways and task 𝐵 in 𝑛 ways. If both can be done in
𝑘 ways, then task A or 𝐵 can be done in 𝑚 + 𝑛 − 𝑘 ways.
 Multiplication principle

If task 𝑇1 can be done in 𝑚1 ways and task 𝑇2 in 𝑚2 ways corresponding to each


way 𝑇1 can occur, these two tasks can be done in that order in 𝑚1 𝑚2 ways.
 An 𝑟 −permutation of a set of 𝑛 distinct element is an arrangement of r elements
of the set.
 The number of 𝑟 −permutations of a set of size 𝑛 is denoted by 𝑝(𝑛, 𝑟),

Mathematics Program: By Werku Debele (MSc.) Page 23


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑛!
𝑝(𝑛, 𝑟) =
(𝑛 − 𝑟)!
 The permutation of n distinct objects are n!, 𝑝(𝑛, 𝑛) = 𝑛!
 The number of 𝑟 −permutation of a set of 𝑛 objects with repetition allowed is 𝑛𝑟 .
 An 𝑟-combination of a set of 𝑛 elements is a subset with size r, where 0 ≤ 𝑟 ≤ 𝑛.
𝑛
 The number of r-combination is denoted by 𝐶(𝑛, 𝑟) 𝑜𝑟 ( ).
𝑟
𝑛!
 𝐶(𝑛, 𝑟) = 𝑟!(𝑛−𝑟)! , 𝐶(𝑛, 𝑟) = 𝐶(𝑛, 𝑛 − 𝑟

 The number of 𝑟 −combinations with repetition from a set of 𝑛 elements is


𝐶(𝑛 + 𝑟 − 1, 𝑟).
 Let 𝑥 and 𝑦 be a real variable and n is a nonnegative integer, then

𝑛
𝑛
(𝑥 + 𝑦) = ∑ ( ) 𝑥 𝑛−𝑟 𝑦 𝑛
𝑛
𝑟
𝑟=0

 ∑𝑛𝑟=0 𝐶(𝑛, 𝑟) =2 . 𝑛

Self Test Exercise 1


1. Find the number of positive integer ≤ 2076 and divisible by
a) 3 𝑜𝑟 4 c) 3 𝑜𝑟 4 𝑏𝑖𝑡 𝑛𝑜𝑡 12
b) 2,3𝑜𝑟 5 𝑏𝑢𝑡 𝑛𝑜𝑡 30 d) 3, 4 𝑜𝑟 5 𝑏𝑢𝑡 𝑛𝑜𝑡 60
2. Find the number of positive integers ≤ 1976 and divisible by
a) 2 or 3 c) 2,3 0r 5
b) 3 or 5 d) 3,5 or 7
3. In how many ways can the letters of the word AFFECTION be arranged,
keeping the vowels in their natural order and not letting the two F’s come
together?
4. In one version of BASIC a variable name consists of letters or a letter followed
by a digit. Find the total number of possible names.
5. Of 40 people, 28 smoke and 16 chew tobacco. It is also known that 10 both
smoke and chew. How many among the 40 neither smoke nor chew?
6. Consider the set

A = {2,4,6, . . . ,114}.

Mathematics Program: By Werku Debele (MSc.) Page 24


Discrete Mathematics And Combinatorics (Math 393) 2012

a) How many elements are there in A?


b) How many are divisible by 3?
c) How many are divisible by 5?
d) How many are divisible by 15
e) How many are divisible by either 3, 5 or both?
f) How many are neither divisible by 3 nor 5
g) How many are divisible by exactly one of 3 or 5?
7. Solve each of the following, where 𝑛 ≥ 0
a) 𝑐(𝑛, 𝑜) = 1 c) 𝑐(𝑛, 1) = 10
b) 𝑐(𝑛, 2) = 28 d) 𝑐(𝑛, 𝑛 − 2) = 55
8. Evaluate
10!
a) c) 𝑝(6,6)
3!7!
5!
b) 𝑝(5,3) d) 4!

9. Find the number of ways of dividing a set of size 𝑛 into two disjoint subsets of
sizes 𝑟 and 𝑛 − 𝑟
10. Find the number of three digit numerals that can be formed using the digit
2,3,5,6 and 9 if repetitions are not allowed
11. Find the number of ways seven boys and three girls can be seated in a row if
a) A boy sit at each end of the row
b) A girl sits at each end of the row
c) The girl sit together at one end of the row
12. Find the coefficient of each:
a) 𝑥 3 𝑦 5 in the expansion of (𝑥 + 𝑦)8
b) 𝑥 4 𝑦 6 in the expansion of (𝑥 − 𝑦)10
c) 𝑥 2 𝑦 6 in the expansion of (2𝑥 + 𝑦)8
13. Use the binomial theorem, expand each
a) (𝑥 + 𝑦)6 c) (2𝑥 − 1)6
b) (𝑥 − 𝑦)5 d) (𝑥 + 2𝑦)5
14. Find the largest binomial coefficient in the expansion of each
a) (𝑥 + 𝑦)5 c) (𝑥 + 𝑦)6
b) (𝑥 + 𝑦)4 d) (𝑥 + 𝑦)8

Mathematics Program: By Werku Debele (MSc.) Page 25


Discrete Mathematics And Combinatorics (Math 393) 2012

Reference:-
1. A. W.F.Edwards,Pascal’s Arithmeticical Triangle. The Johns Hopkins University
Press, Baltimore,MD, 2002.
2. Branislav Kisacanin, Mathematical problems and proof, combinatorics, number
theory and geometry
3. C.Oliver, “ The Twelve Days of Christmas,” Mathematics Teacher, Vol. 70
4. D .P.Acharjya Sreekumar, Fundamental Approach to Discrete Mathematics, 3rd
eedition.
5. Discrete Mathematics, Handbook of discrete and Compinatorial Mathematics
6. Hewel Hus, Schaum’s outline, probability Random Variable
7. J.M.Harris.Jeffry L.Hirst.Michael J.Mossinghoff, Combinatorics and Graph Theory,
2nd edition
8. Kenneth H.Rosen, Discrete Mathematics and its application, 3rd edition.
9. KOSHY, Discrete Mathematics with application
10. M.Eng and J.Casey, “Pascal’s Arithmetical Triangle-ASerendipitious Source for
programming Activities,’’ Mathematics Teacher, Vol 76
11. Mott, Knadel and Baker, Discreate Mathematics
12. P.Z.Chinn,’’inductive patterns, finite Difference, and a Missing Region,’’
Mathematics Teacher, Vol.81(Sept.1988)
13. R.P.GRIMALDI and B.V.RAMANA pearson, Discreate combinatorial
mathematics
14. Seymour Lipschutz,Schaum’s outline, Discrete Mathematics, 3rd edition
15. Steven G. Krantz, Discrete Mathematics

Mathematics Program: By Werku Debele (MSc.) Page 26


Discrete Mathematics And Combinatorics (Math 393) 2012

CHAPTER 2
ELEMENTARY PROBABILITY THEORY
Objective: At the end of this chapter the student should be able to:

 Explain the elementary property of a probability of an event.


 Calculate the probability of an event.
 Explain the conditional probability
 Calculate the conditional probability of an event
 Identify whether the given two events are dependent or
independent event.
 Calculate the expected value

Introduction
Probability theory is a mathematical modeling of the phenomenon of chance or
randomness. If a coin is tossed in a random manner, it can land heads (𝐻) or tails
(𝑇),with equally likely. Each of them, 𝐻 or 𝑇 is an outcome of the experiment to
tossing the coin. The set {𝐻, 𝑇} of the possible outcomes of the experiment is the
sample space of the experiment. A probabilistic mathematical model of random
phenomena is defined by assigning “probabilities” to all the possible outcomes of an
experiment. The reliability of our mathematical model for a given experiment depends
upon the closeness of the assigned probabilities to the actual limiting relative
frequencies.
In this chapter the basic concepts of probability theory are presented. We see the
definition of important terms that are used to solve the probability of a given
experiments. In section 2.1 we will study experiments with finitely many out comes
that are not necessary equally likely. From section 2.2 to 2.4 we introduce some
probability concepts in probability theory, including conditional probability and
independence of events. Finally we discussed the concept of the random variable and
the expectation and variance of a random variable.

2.1 Sample space and events


Objective: After study this section the student should be able to:
 Define the terms; random experiment, sample space and events

Mathematics Program: By Werku Debele (MSc.) Page 27


Discrete Mathematics And Combinatorics (Math 393) 2012

 Find the sample space of an experiment


 Find the events of an experiment

Definition 2.1:
A) Random experiments:
An experiment is a procedure that yields one of a given set of possible outcomes. An
experiment is called a random experiment if its outcome cannot be predicted.
Typical experiments of a random experiment are the roll of a die, the toss of a coin or
drawing a card from a deck.
B) Sample space
The set 𝑆 of all possible outcomes of a given experiment is called the sample space or
universal set (𝑆 is the notation for a sample space and assumes that 𝑆 is non- empty).
A particular outcome, i.e., an element in S, is called a sample point. Each outcome of
a random experiment corresponding to a sample point.
Example 2.1 Find the sample space for the experiment of tossing a coin (a) one and
(b) twice
Solution: a) There are two possible outcomes, head or tails, thus
𝑆 = {𝐻, 𝑇}
b) There are four possible outcomes. They are pairs of heads and tails.
Thus,
𝑆 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}
Example 2.2: Find the sample space for the experiment of tossing a coin repeatedly
and of counting the number of tosses required until the first head appears.
Solution: Clearly all possible outcomes for this experiment are the terms of the
sequence 1,2,3 …. Thus
𝑆 = {1,2,3, … }
Note that there are infinite number of outcomes (i.e. the sample space is infinite).
Example 2.3: Find the sample space for the experiment of toss a (six sided) die.
The sample consists of the six possible numbers, that is
𝑆 = {1,2,3,4,5,6} .
Note that: Any particular experiment can be often having many different sample
spaces depending on the observation of interest.

Mathematics Program: By Werku Debele (MSc.) Page 28


Discrete Mathematics And Combinatorics (Math 393) 2012

A sample space 𝑆 is said to be discrete if it consists of a finite number of sample point


(as in example 2.1 and 2.3) or countable infinite sample point (as in example 2.2)
C) Event
Since we have identified a sample space 𝑆 as the set of all possible outcomes of
random experiments, we will review some set notation in the following:
 If 𝑎 is an element of 𝑆 (or belongs to 𝑆), then we write 𝑎 ∈ 𝑆.
 If 𝑏 is not an element of 𝑆 (or does not belongs to 𝑆) then we write𝑏 ∉ 𝑆.
 A set 𝐴 is called a subset of 𝐵, denoted by 𝐴 ⊂ 𝐵, if every element of 𝐴 is
also an element of 𝐵.
An event 𝐸 is a set of outcomes or, in other words, a subset of the sample space 𝑆. In
particular, the set {𝑎} consisting of a single sample point 𝑎 ∈ 𝑆 is called an
elementary event. Furthermore, the empty set ∅ and 𝑆 itself are subset of 𝑆 and so ∅
and 𝑆 are also events. Since 𝑆 is the set of all possible outcomes, it is often called
the certain event and ∅ is sometimes called the impossible event or the null event.
An outcome in 𝐸 is favorable outcome (or success), an outcome not in 𝐸 is an
unfavorable outcomes (or failure). Since an event is a set, we can combine events to
form new events using the various set operations:
I. 𝐴 ∪ 𝐵 is the event that occurs if and only if 𝐴 occurs or 𝐵 occurs (or both).
II. 𝐴 ∩ 𝐵 is the event that occurs if and only if 𝐴 occurs and 𝐵 occurs.
III. 𝐴𝑐 , the complement of 𝐴, is the event that occurs if and only if 𝐴 does not
occur.
Two events 𝐴 and 𝐵 are called mutually exclusive if they are disjoint, that is, if 𝐴 ∩
𝐵 = ∅. In other words, 𝐴 and 𝐵 are mutually exclusive if and only if they cannot
occur simultaneously. Three or more events are mutually exclusive if every two of
them are mutually exclusive.
Example 2.4: Consider the experiment of example 2.2. Let 𝐴 be the event that the
number of tosses required until the first head appears is even. Let 𝐵 be the event that
the number of tosses required until the first head appears is odd. Let 𝐶 be the event
that the number of tosses required until the first head appears is less than 5. Express
events 𝐴, 𝐵 𝑎𝑛𝑑 𝐶
A={2,4,6, … } , B={1,3,5, … } , C={1,2,3,4}

Mathematics Program: By Werku Debele (MSc.) Page 29


Discrete Mathematics And Combinatorics (Math 393) 2012

EXAMPLE 2.5: Consider the experiment of toss a coin three times. Let 𝐴 be the
event of obtaining exactly two heads, let 𝐵 be that of obtaining at least two heads and
C that of obtaining four heads. Express events A, B and C
Solution: By the multiplication principle, the sample space S consists of 2 × 2 ×
2 = 8 possible outcome: see figure 2.1
The sample space consists of the following eight elements:
𝑆 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇 𝑇, 𝑇 𝐻𝐻, 𝑇𝐻𝑇 , 𝑇 𝑇𝐻, 𝑇 𝑇 𝑇 }
H 𝐻 𝐻𝐻𝐻
H T HHT
T H HTH
T 𝐻𝑇𝑇
𝑇 T𝐻𝑇
T 𝐻 𝐻 𝑇𝐻𝐻
H TTH
T
Figure 2.1 T 𝑇𝑇𝑇

𝐴 = {𝐻𝐻𝑇, 𝑇𝐻𝐻, 𝐻𝑇𝐻} , 𝐵 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝑇𝐻𝐻 }and C = ∅ an impossible


event.
Then 𝐴 ∩ 𝐵 = {𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝑇𝐻𝐻} = 𝐴
Example 2.6: Tossing a (six-sided) die. The sample space 𝑆 consists of the six
possible numbers, that is, 𝑆 = {1, 2, 3, 4, 5, 6}. Let 𝐴 be the event that an even
number appears, 𝐵 that an odd number appears, and 𝐶 that a prime number appears.
That is, let
𝐴 = {2, 4, 6}, 𝐵 = {1, 3, 5}, 𝐶 = {2, 3, 5}
Then: 𝐴 ∪ 𝐶 = {2, 3, 4, 5, 6} is the event that an even or a prime number occurs.
𝐵 ∩ 𝐶 = {3, 5} is the event that an odd prime number occurs.
Cc = {1, 4, 6} is the event that a prime number does not occur.
Note that 𝐴 and 𝐵 are mutually exclusive: 𝐴 ∩ 𝐵 = ∅. In other words, an even
number and an odd number cannot occur simultaneously.

Mathematics Program: By Werku Debele (MSc.) Page 30


Discrete Mathematics And Combinatorics (Math 393) 2012

EXAMPLE 2.7 Consider the experiment toss a pair of dice. Let 𝐴 be the event that
the sum of two numbers is 6, and let 𝐵 be the event that the largest of the two number
is 4. Express the event 𝐴 and 𝐵
Solution: There are six possible numbers, 1, 2, . . . , 6, on each die. Thus 𝑆 consists of
the pairs of numbers from 1 to 6, and hence 𝑛(𝑆) = 36. Figure 2.2 shows these 36
pairs of numbers arranged in an array where the rows are labeled by the first die and
the columns by the second die.
𝐴 = {(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)},
𝐵 = {(1, 4), (2, 4), (3, 4), (4, 4), (4, 3), (4, 2), (4, 1)} .
Then the event “𝐴 and 𝐵” consists of those pairs of integers whose sum is 6 and
whose largest number is 4 or,in other words, the intersection of 𝐴 and 𝐵.
Thus
𝐴 ∩ 𝐵 = {(2, 4), (4, 2)}
Similarly, “𝐴 or 𝐵,” the sum is 6 or the largest is 4, shaded in Fig. 2.2, is the union A
First die
1 2 3 4 5 6
1 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
2 (2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
3 (3,1) (3,2) (3,3) (3,4) (3,5) (3,6)
Second die
4 (4,1) (4,2) (4,3) (4,4) (4,5) (4,6)
5 (5,1) (5,2) (5,3) (5,4) (5,5) (5,6)
6 (6,1) (6,2) (6,3) (6,4) (6,5) (6,6)

Figure 2.2
Exercise 2.1
1. Consider a random experiment of tossing a coin three times.
a. Find the sample space 𝑆1, if we wish to observe the number of heads
and tails obtained.
b. Find the sample space 𝑆2 , if we wish to observe the number of heads in
the three tosses.

2. Consider an experiment of drawing two cards at random from a bag containing


four cards marked with the integer 1 through 4.

Mathematics Program: By Werku Debele (MSc.) Page 31


Discrete Mathematics And Combinatorics (Math 393) 2012

a) Find the sample space 𝑆1 of the experiment if the first card is replaced before
the second is drawn.
b) Find the sample space 𝑆2 of the experiment if the first card is not replaced.
4. Consider the experiment of selecting items from a group consisting of three
{𝑎, 𝑏, 𝑐}.
a) Find the sample space 𝑆1 of the experiment in which two items are selected
without replacement.
b) Find the sample space 𝑆2 of the experiment in which two items are selected
with replacement.
5. Find the sample space for experiment consisting of measurement of the
voltage 𝑉 from a transducer, the maximum and minimum of which are +5 and −5
volts, respectively.
6. An experiment consists of tossing two dice.
a) Find the sample space 𝑆
b) Find the event 𝐴 that the sum of the dotes on the dice is greater than 10
c) Find the event 𝐵 that the sum of the dotes on the dice is greater than 12
d) Find the event 𝐶 that the sum of the dotes on the dice is greater than 7
2.2 Probability of an event

Objective: After study this section the student should be able to:
 Define the probability of an event
 Explain the property of probability
 Calculate the probability of events
Definition 2.2: Let 𝑆 be a finite sample space, say 𝑆 = {𝑎1 , 𝑎2 , 𝑎3 , … , 𝑎𝑛 }. A finite
probability space, or probability model, is obtained by assigning to each point 𝑎𝑖 in S
a real number 𝒑𝒊 called the probability of 𝒂𝑖 satisfying the following properties:
I. Each 𝑝𝑖 is nonnegative, that is, 𝑝𝑖 ≥ 0.
II. The sum of the 𝑝𝑖 is 1, that is, is 𝑝1 + 𝑝2 +・ ・ ・+𝑝𝑛 = 1
The probability of an event 𝐴 written 𝑃(𝐴), is then defined to be the sum of the
probabilities of the points in 𝐴. The singleton set {𝑎𝑖 } is called an elementary event
and, for notational convenience, we write P(𝑎𝑖 ) for P({𝑎𝑖 }).

Mathematics Program: By Werku Debele (MSc.) Page 32


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 2.3: Let 𝐸 be an event of a finite sample space 𝑆 consisting of equally


likely out comes. Then the probability of the event, defined as
|𝐸| 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑤𝑎𝑦𝑠 𝐸 𝑐𝑎𝑛 𝑜𝑐𝑐𝑢𝑟𝑒
𝑝(𝐸) = |𝑆|
= 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡 𝑐𝑜𝑚𝑒𝑠

EXAMPLE 2.8: Suppose three coins are tossed, and the number of heads is recorded.
Let 𝐴 be the event that at least one head appears, and let B be the event that all heads
or tails appears. Find the probability of event 𝐴 and 𝐵.
Solution: The sample space is 𝑆 = {0, 1, 2, 3}. The probability of the elements of 𝑆.
1 3 3 1
P(0) = 8 , P(1) = 8 , P(2) = 8 , P(3) = 8

That is, each probability is nonnegative, and the sum of the probabilities is 1.
𝐴 = {1, 2, 3} 𝑎𝑛𝑑 𝐵 = {0, 3}.
3 3 1 7
Then, by definition, 𝑃(𝐴) = 𝑃(1) + 𝑃(2) + 𝑃(3) = + + = and
8 8 8 8
1 1 1
𝑃(𝐵) = 𝑃(0) + 𝑃(3) = + =
8 8 4

Example 2.9: Let a card be selected from an ordinary deck of 52 playing cards. Let
A = {the card is a spade} and B = {the card is a face card}.
What is P(A), P(B), and P(A ∩ B).
number of spades 13 1
Solution: Using definition 2.3, P(A) = = 52 = 4
number of card
number of face cards 12 3
P(B) = = 52 = 12
number of card
number of spade face cards 3
P(A ∩ B) = = 52
number of card

Example 2.10 An urn contains four blue ball and five red ball. What is the probability
that a ball chosen from the urn is blue?
Solution: Calculate the probability, note that there are nine possible outcomes, and
four of these possible outcomes produce a blue ball, hence, the probability that a blue
4
is chosen is .
9

Elementary properties of probability:


Let 𝑆 be the sample space and 𝐴 be an event in 𝑆. Then the probability function 𝑃
defined on the class of all events in a finite probability space has the following
properties:
1. For every event 𝐴, 0 ≤ 𝑃(𝐴) ≤ 1.
2. P(S) = 1.
3. 𝑝(𝐴𝑐 ) = 1 − 𝑝(𝐴)

Mathematics Program: By Werku Debele (MSc.) Page 33


Discrete Mathematics And Combinatorics (Math 393) 2012

4. 𝑃(∅) = 0
5. 𝑃(𝐴 ∪ 𝐵) = 𝑃(𝐴) + 𝑃(𝐵) − 𝑃(𝐴 ∩ 𝐵)

Example 2.11: Find the probability of obtaining at least one head when three coins
are tossed.
Solution: Let A be the event of obtaining at least one head. Then Ac denotes the
1
event of obtaining no heads occur, p(Ac ) = 8, therefore ,
1 7
p(A) = 1 − p(Ac ) = 1 − 8 = 8

Let E = {a1 , a2 , a3 , … , an } be an event of a finite sample space consisting of not


necessary equally likely out comes. Let p(ai ) denote the probability that the outcome
ai will occur. Then the probability of E is defined by p(E) = ∑ni=1 p(ai ). Thus p(E) is
the sum of the probabilities of the outcomes in E.
Example 2.12: Suppose the probability of obtaining a prime number is twice that of
obtaining a non- prime number, when a certain loaded die is rolled. Find the
probability of obtaining an odd number when it is rolled.
Solution: There are six possible out comes when a die is rolled, of which there are
primes:2,3 and 5. The probability of obtaining a prime is twice that of a non-prime;
that is 𝑝(𝑝𝑟𝑖𝑚𝑒) = 2𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒). Since the sum of the probabilities of the
various possible outcome is 1. 3𝑝(𝑝𝑟𝑖𝑚𝑒) + 3𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) = 1
6𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) + 3𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) = 1
9𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) = 1
1
𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) = 9
2
Thus, 𝑝(𝑝𝑟𝑖𝑚𝑒) = 2𝑝(𝑛𝑜𝑛 − 𝑝𝑟𝑖𝑚𝑒) = 9.
1 2 2 5
Then, 𝑝(𝑜𝑑𝑑 𝑛𝑢𝑚𝑏𝑒𝑟) = 𝑝(1) + 𝑝(3) + 𝑝(5) = 9 + 9 + 9 = 9.

Definition 2.4: Suppose that 𝑆 is a set with 𝑛 elements. The uniform distribution
1
assigns the probability to each elements of 𝑆. The experiment of selecting an
𝑛

element from a sample space with a uniform distribution is called selecting an


element of 𝑆 at random.
We now define the probability of an event as the sum of the probabilities of the
outcomes in this event.

Mathematics Program: By Werku Debele (MSc.) Page 34


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 2.5: The probability of the event E is the sum of the probabilities of the
outcomes in E. that is, 𝑝(𝐸) = ∑𝑠∈𝐸 𝑃(𝑠)
Example 2.13: Suppose that a die is biased (or loaded) so that 3 appears twice as
often as each other number but that the other five outcomes are equally likely. What is
the probability that an odd number appears when we roll is this die?
Solution: We want to find the probability of the event,{1,2,3,4,5,6} , 𝐴 = {1,3,5}
and given that
𝑝(3) = 2𝑝(1) = 2𝑝(2) = 2𝑝(4) = 2𝑝(5) = 2𝑝(6)
𝑃(𝐸) = ∑6𝐼=1 𝑝(𝑎𝑖 ) = 1
𝑝(𝑎1 ) + 𝑝(𝑎2 ) + 𝑝(𝑎3 ) + 𝑝(𝑎4 ) + 𝑝(𝑎5 ) + 𝑝(𝑎6 ) = 1
𝑝(1) + 𝑝(2) + 𝑝(3) + 𝑝(4) + 𝑝(5) + 𝑝(6) = 1
1 1 1 1 1
𝑝(3) + 2 𝑝(3) + 𝑝(3) + 2 𝑝(3) + 2 𝑝(3) + 2 𝑝(3) = 1
2
7 1
𝑝(3) = 1 => 𝑝(3) = 7
2
1 1
𝑃(1) = 𝑃(2) = 𝑃(4) = 𝑃(5) = 𝑃(6) = 7 , 𝑝(3) = 7.
1 2 1 4
It follows that 𝑝(𝐴) = 𝑝(1) + 𝑝(3) + 𝑝(5) = 7 + 7 + 7 = 7.

Suppose that there are 𝑛 equally likely outcomes; each possible outcome has
1
probability 𝑛, since the sum of their probability is 1. Suppose the event E contains m

out comes. According to definition 2.5


1 𝑚
𝑝(𝐸) = ∑𝑚
𝑖=1 𝑛 = 𝑛 . Since |𝐸| = 𝑚 𝑎𝑛𝑑 |𝑆| = 𝑛, it follows that

𝑚 |𝐸|
𝑝(𝐸) = = |𝑆|
𝑛

Theorem 2.1 (Inclusion- exclusion principle). If A and B are any two events of a
finite sample space, S. The probability that at least one of them will occurs is given by
𝑝(𝐴 ∪ 𝐵) = 𝑝(𝐴) + 𝑝(𝐵) − 𝑝(𝐴 ∩ 𝐵)
Proof: By the inclusion –exclusion principle on a set,
|𝐴 ∪ 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵|
|𝐴∪𝐵| |𝐴| |𝐵| |𝐴∩𝐵|
Then |𝑆|
= |𝑆|
+ |𝑆| − |𝑆|
.

That
𝑝(𝐴 ∪ 𝐵) = 𝑝(𝐴) + 𝑝(𝐵) − 𝑝(𝐴 ∩ 𝐵).
In particular, if 𝐴 and 𝐵 are mutually exclusive 𝐴 ∩ 𝐵 = ∅ and hence
𝑝(𝐴 ∩ 𝐵) = 0.

Mathematics Program: By Werku Debele (MSc.) Page 35


Discrete Mathematics And Combinatorics (Math 393) 2012

Therefore,
𝑝(𝐴 ∪ 𝐵) = 𝑝(𝐴) + 𝑝(𝐵)
Theorem 2.2: (Addition Principle): If 𝐴 and B are mutually exclusive events of a
finite sample space. Then 𝑃(𝐴 ∪ 𝐵) = 𝑃(𝐴) + 𝑃(𝐵).
EXAMPLE 2.14: Suppose a student is selected at random from 100 students where
30 are taking mathematics,20 are taking chemistry, and 10 are taking mathematics and
chemistry. Find the probability p that the student is taking mathematics or chemistry.
Solution: Let M = {students taking mathematics} and C = {students taking
chemistry}.
30 3
𝑃(𝑀) = = ,
100 10
20 1
𝑃(𝐶) = =5
100
10 1
P(Mand C) = P(M ∩ C) = = 10
100

Thus, by the Addition Principle (Theorem 2.2),


𝑝 = 𝑃(𝑀 𝑜𝑟 𝐶) = 𝑃(𝑀 ∪ 𝐶) = 𝑃(𝑀) + 𝑃(𝐶) − 𝑃(𝑀 ∩ 𝐶)
3 1 1 2
= + 5 − 10 = 5
10

Example 2.15 A survey among 50 house wives about the two laundry detergent
Lex(L) and Rex(R), shows that 25 like Lex, 30 like Rex, 10 like both, and 5 like
neither. A house wives is selected at random from the group surveyed. Find the
probability that she likes neither Lex nor Rex.
25 30
Solution: Using the Venn diagram in figure 2.2, we have 𝑝(𝐿) = 50 , 𝑝(𝑅) = 50
10
𝑝(𝐿 ∩ 𝑅) = 50,

1 3 1 9
𝑝(𝐿 ∪ 𝑅) = 𝑃(𝐿) + 𝑃(𝑅) − 𝑃(𝐿 ∩ 𝑅) = 2 + 5 − 5 = 10

So, 𝑝(𝐿𝑐 ∩ 𝑅 𝑐 ) = 𝑝((𝐿 ∪ 𝑅)𝑐 ) = 1 − 𝑝(𝐿 ∪ 𝑅)


9 1
= 1 − 10 = 10

Exercise 2.2
1. A card is drawn at random from a standard deck of cards. Find the
probability of obtaining
a) A king c) A king or a queen
b) A club d) A club or a diamond

Mathematics Program: By Werku Debele (MSc.) Page 36


Discrete Mathematics And Combinatorics (Math 393) 2012

2. What probability should be assigned to the out come of heads when a biased
coin is tossed, if heads is three times as likely to come up as tail. What probability
should be assigned to the outcome of tails?
3. Two dice are rolled. Find the probability of obtaining
a) Two five c) A five and a six
b) A sum of four d) A sum less than five
4. Two cards are drawn at random from a standard deck of card. Find the
probability that:
a) Both are king d) One is a king and the other a
queen
b) Both are club
c) One is a club and the other a diamond.
5. Let 𝑈 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒} be the sample space of an experiment, where the
outcomes are equally likely. Find the probability of each event
a) {𝑎} c ) {𝑎, 𝑐 , 𝑑}
b) {𝑎, 𝑏} d) ∅
6. Let 𝑝(𝐴) = 0.9 and 𝑝(𝐵) = 0.8. show that 𝑝(𝐴 ∩ 𝐵) ≥ 0.7
7. A random experiment has sample space 𝑆 = {𝑎, 𝑏, 𝑐}. Suppose that 𝑝(𝑎, 𝑐) =
0.75 and 𝑝(𝑏, 𝑐) = 0.6.Find the probability of the elementary events.
1
8. Let 𝐴, 𝐵 𝑎𝑛𝑑 𝐶 be three events in 𝑆. If 𝑝(𝐴) = 𝑝(𝐵) = 3 , 𝑝(𝐴 ∩ 𝐵) =
1 1
, 𝑝(𝐴 ∩ 𝐶) = and 𝑝(𝐵 ∩ 𝐶) = 0 find 𝑃(𝐴 ∪ 𝐵 ∪ 𝐶)
8 6

9. Consider a telegraph source generating two symbols, dots and dashes. We


observe that the dots were twice a likely to occur as the dashes. Find the probability
of dot’s occurring and the dash’s occurring.
10. The sample space 𝑆 of a random experiment is given by 𝑆 = {𝑎, 𝑏, 𝑐, 𝑑} with
probability 𝑝(𝑎) = 0.2, 𝑝(𝑏) = 0.3, 𝑝(𝑐) = 0.4, 𝑎𝑛𝑑 𝑝(𝑑) = 0.1. let 𝐴 denote the
event {𝑎, 𝑏}, and 𝐵 = {𝑏, 𝑐, 𝑑}.determine the following probabilities: (a) 𝑝(𝐵);(b)
𝑝(𝐴);(c) 𝑝(𝐴𝑐 );(d) 𝑝(𝐴 ∪ 𝐵) and (e) 𝑝(𝐴 ∩ 𝐵)
2.3. Conditional probability
objective: After study this section the student should be able to:
 Define conditional probability
 Calculate the conditional probability of an event

Mathematics Program: By Werku Debele (MSc.) Page 37


Discrete Mathematics And Combinatorics (Math 393) 2012

6 1
Suppose 𝐸 be the event of rolling a sum of seven with two dice. Then 𝑝(𝐸) = =
36 6

. Suppose a 3 comes up on one of the dice. This reduces the sample space to
{(1,3), (2,3), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (4,3), (5,3), (6,3)}
consequently, a sum of 7 can be obtained in two ways: {(3,4), (4,3)}. Therefore, the
2
probability of getting a sum of seven, knowing that a three has been rolled is 11. Thus

the additional information has indeed affected the probability of 𝐸.


Accordingly, we make the following definition
Definition2.6: The probability that an event 𝐴 will occur, knowing that a certain
other event 𝐵 (≠ ∅) has already occurred, is the conditional probability of 𝐴,
given 𝐵, denoted by 𝑝(𝐴\𝐵). And defined as
𝑝(𝐴∩𝐵)
𝑝(𝐴\𝐵) = 𝑝(𝐵)

Suppose 𝑆 is a sample space, and 𝑛(𝐴) denotes the number of elements in 𝐴. Then
𝑛(𝐴∩𝐵) 𝑛(𝐵) 𝑝(𝐴∩𝐵) 𝑛(𝐴∩𝐵)
𝑃(𝐴 ∩ 𝐵) = , 𝑝(𝐵) = , and so on 𝑝(𝐴\𝐵) = =
𝑛(𝑆) 𝑛(𝑆) 𝑝(𝐵) 𝑛(𝐵)

EXAMPLE 2.16; (a) A pair of fair dice is tossed. The sample space 𝑆 consists of the
36 ordered pairs (𝑎, 𝑏), where 𝑎 and 𝑏 can be any of the integers from 1 to
1
6.(see example 2.6 )Thus the probability of any point is 36 . Find the probability

that one of the dice is 2 if the sum is 6.


Solution: Let 𝐸 = {𝑠𝑢𝑚 𝑖𝑠 6} and 𝐴 = {2 𝑎𝑝𝑝𝑒𝑎𝑟𝑠 𝑜𝑛 𝑎𝑡 𝑙𝑒𝑎𝑠𝑡 𝑜𝑛𝑒 𝑑𝑖𝑒}
Now 𝐸 consists of 5 elements and 𝐴 ∩ 𝐸 consists of two elements; namely
𝐸 = {(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)} and 𝐴 ∩ 𝐸 = {(2, 4), (4, 2)}
2
By definition 2.6 𝑃(𝐴\𝐸) = 5.

On the other hand 𝐴 itself consists of 11 elements, that is,


𝐴 = {(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (1, 2), (3, 2), (4, 2), (5, 2), (6, 2)}
Since 𝑆 consists of 36 elements, 𝑃(𝐴) = 11/36.
(b) A couple has two children; the sample space is 𝑆 = {𝑏𝑏, 𝑏𝑔, 𝑔𝑏, 𝑔𝑔} with
1
probability 4 for each point. Find the probability 𝑝 that both children are boys if it is

known that:
𝑖) 𝐴𝑡 least one of the children is a boy;
(𝑖𝑖) the older child is a boy.

Mathematics Program: By Werku Debele (MSc.) Page 38


Discrete Mathematics And Combinatorics (Math 393) 2012

Solution: Let 𝐸 be the set contain both children are boy, 𝐸 = {𝑏𝑏}
𝑖) Here the reduced space consists of three elements, 𝐴 = {bb, bg, gb}; then
𝑃(𝐴∩𝐸) 1
𝑝 = 𝑝(𝐸\𝐴) = =3
𝑃(𝐴)

𝑖𝑖) Here the reduced space consists of only two elements 𝐵 = {bb, bg};
𝑃(𝐵∩𝐸) 1
Then 𝑝 = 𝑝(𝐸\𝐵) = =2
𝑝(𝐵)

Example 2.17: A bit strength of length four is generated at random, so that each of
the 16 bit strings of length four is equally likely. What is the probability that it
contains at least two consecutive 0’s, given that its bit is a 0? (We assume that 0 bit
and 1 bit are equally likely)
Solution: Let 𝐴 be the event that a bit strings of length four contains at least two
consecutive 0𝑠, and 𝐵 be the event that the first bit of a bit string of length four is a 0.
The probability that a bit string of length four has at least two consecutive 0s, given
𝑝(𝐴∩𝐵)
that its first bit is a 0. Equals 𝑝(𝐴\𝐵) = .
𝑝(𝐵)

Since 𝐴 ∩ 𝐵 = {0000,0010,0011,0100} (See figure 2.3) .We see that


5
𝑝(𝐴 ∩ 𝐵) = 16. Since there are eight bit strings of length four that start with 0, we
8 1
have 𝑝(𝐵) = 16 = 2
𝑃(𝐴∩𝐵) 5⁄16 5
Consequently, 𝑝(𝐴\𝐵) = = =
𝑃(𝐵) 1⁄2 8
0 0 0000
1 0001
0 1 0011
0 1 0 0010
0 0100
0 1 0101
1 1 0111
1 0 1010
0 0 1000
1 1001
0 1 1011
1 1 0 1010
0 1100
0 1 1101
1 0 1110
1 1 1111

FIGURE 2.3

Mathematics Program: By Werku Debele (MSc.) Page 39


Discrete Mathematics And Combinatorics (Math 393) 2012

Theorem 2.3 (Multiplication Theorem for Conditional Probability):


Let 𝐴 and 𝐵 be any two events of a finite sample space. Then the probability that
both 𝐴 and 𝐵 will occure is given by :
P(A ∩ B) = P(A)P (B\A) = 𝑃(𝐵)𝑝(𝐴\𝐵)
From theorem 2.3 we can obtain the following Baye’s rule:
𝑝(𝐵\𝐴)𝑝(𝐴)
𝑝(𝐴\𝐵) = 𝑝(𝐵)

The multiplication theorem gives us a formula for the probability that events 𝐴 and 𝐵
both occur. It can easily be extended to three or more eventsA1 , A2 , . . . Am ; that is,
𝑃(A1 ∩ A2 ∩ . . .∩ Am ) = 𝑃(A1 ) ・ 𝑃(A2 \A1 ) ・ ・ ・ 𝑃(Am \A1 , A2 , . . . Am−1 )
EXAMPLE 2.17 A lot contains 12 items of which 4 are defective. Three items are
drawn at random from the lot one after the other. Find the probability p that all three
are non-defective.
8
Solution: The probability that the first item is non-defective is 12 since 8 of 12 items

are non-defective. If the first item is non-defective, then the probability that the next
7
item is non-defective is since only 7 of the remaining 11 items are non-defective.
11

If the first 2 items are non-defective, then the probability that the last item is non-
6
defective is 10 since only 6 of the remaining 10 items are now non-defective.

Thus by the multiplication theorem,


8 7 6 14
𝑝 = 12 ・ 11 ・ 10 = 55 ≈ 0.25

Example 2.18: Two marbles are drawn successively from a box of three black and
four white marbles. Find the probability that both are black if the first marble is not
replaced before the second drawing.
3
Solution: Let 𝐵1 be the event drawing the first black marble, then 𝑝(𝐵1 ) = 7 and

let 𝐵2 be the event of drawing a second black marble. Since the first marble is not
replaced before the second is drawn, there are only two black balls left in the box at
2
the second drawing. Therefore, 𝑝(𝐵2 \𝐵1 ) = . Consequently, the probability of
6

drawing two black balls successively without replacement is given by


3 2 1
𝑝(𝐵1 ∩ 𝐵2 ) = 𝑝(𝐵1 )・𝑝(𝐵2 \𝐵1 ) = 7 ・ 6 = 7

Mathematics Program: By Werku Debele (MSc.) Page 40


Discrete Mathematics And Combinatorics (Math 393) 2012

Exercise 2.3
1. What is the conditional probability that a family with two children has two
boys, given they have at least one boy.
2. Find 𝑝(𝐴\𝐵) if a) 𝐴 ∩ 𝐵 = ∅, b) 𝐴 ⊂ 𝐵 and c) 𝐵 ⊂ 𝐴
3. Two manufacturing plants produce similar parts. Plant 1 produces 1000
parts, 100 of which are defective. Plant 2 produce 2000 parts, 150 of which are
defective. A part is selected at random and found be defective. What is the probability
that it came from plant 1?
4. Two cards are drawn at random from a deck. Find the probability that both
are aces.

2.4 Independent events


Objective: After study this section the student should be able to:
 Define the independent event
 Differentiate the dependant and independent events
 Identify whether the given events are dependant or not
 Calculate the probability of dependant events.
Definition 2. 6: Two events are dependent if the occurrence of one event affects the
probability of the other event occurring; otherwise, they are independent which means
, events 𝐴 and 𝐵 in a probability space 𝑆 are said to be independent if the occurrence
of one of them does not influence the occurrence of the other. More specifically, 𝐵 is
independent of 𝐴 if 𝑃(𝐵) is the same as 𝑃(𝐵|𝐴).
Now substituting 𝑃(𝐵) for 𝑃(𝐵|𝐴) in the Multiplication Theorem,
𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴)𝑃 (𝐵|𝐴) yields 𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴)𝑃 (𝐵).
We formally use the above equation as our definition of independence.
Definition 2.7: The event A and B are independent if and only if
𝑝(𝐴 ∩ 𝐵) = 𝑃(𝐴)𝑃(𝐵)
Example 2.19: Suppose A is the event that a randomly generated bit string of length
four begins with 1 and B is the event that this bit string contains an even number of
ones. Are A and B independent, if the 16 bit strings of length four are
equally likely?
Solution: There are eight bit strings of length four that begin with a one:
1000,1001,1010,1011,1101,1100,1110 𝑎𝑛𝑑 1111

Mathematics Program: By Werku Debele (MSc.) Page 41


Discrete Mathematics And Combinatorics (Math 393) 2012

There are also eight bit strings of length four that contain an even number of ones:
0000,0011,0101,0110,1001,1010,1100 𝑎𝑛𝑑 1111.
8 1
Since there are 16 bit strings of length four, it follows that 𝑝(𝐴) = 𝑝(𝐵) = 16 = 2.
4 1
Because 𝐴 ∩ 𝐵 = {1111,1100,1010,1001}, we see that 𝑝(𝐴 ∩ 𝐵) = 16 = 4. Since
1 1 1
𝑝(𝐴 ∩ 𝐵) = 4 = 2 × 2 = 𝑝(𝐴)𝑝(𝐵). We conclude that A and 𝐵 are independent.

Example 2.20: A fire coin is tossed three times. Consider the events:
A = {𝑓𝑖𝑟𝑠𝑡 𝑡𝑜𝑠𝑠 𝑖𝑠 ℎ𝑒𝑎𝑑𝑠}
B = {𝑠𝑒𝑐𝑜𝑛𝑑 𝑡𝑜𝑠𝑠 𝑖𝑠 ℎ𝑒𝑎𝑑𝑠}
C = {𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑡𝑤𝑜 ℎ𝑒𝑎𝑑𝑠 𝑖𝑛 𝑟𝑜𝑤}
Show that A and C are independent.
Solution: The sample space is
S = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇} and the events are:
A = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇}, B = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇}𝑎𝑛𝑑 C =
{𝐻𝐻𝑇, 𝑇𝐻𝐻}
And A ∩ B = {𝐻𝐻𝐻, 𝐻𝐻𝑇}, A ∩ C = {𝐻𝐻𝑇} 𝑎𝑛𝑑 B ∩ C = {𝐻𝐻𝑇, 𝑇𝐻𝐻}
We have:
4 1 4 1 2 1
𝑝(𝐴) = 8 = 2 , 𝑝(𝐵) = 8 = 2 , 𝑝(𝐶) = 8 = 4
1 1 1
𝑝(𝐴 ∩ 𝐵) = 4 , 𝑝(𝐴 ∩ 𝐶) = 8 , 𝑝(𝐵 ∩ 𝐶) = 4

Accordingly,
1 1 1
𝑝(𝐴)𝑝(𝐵) = 2 × 2 = 4 = 𝑝(𝐴 ∩ 𝐵), and so 𝐴 and 𝐵 are independent
1 1 1
𝑝(𝐴)𝑝(𝐶) = 2 × 4 = 8 = 𝑝(𝐴 ∩ 𝐶), and so 𝐴 and 𝐶 are independent
1 1 1
𝑝(𝐶)𝑝(𝐵) = 2 × 2 = 4 ≠ 𝑝(𝐶 ∩ 𝐵), and so 𝐶 and 𝐵 are dependent

Example 2.21: Are the event 𝐴, that a family with three children has children of both
sexes, and 𝐵 that a family with three children has at most one boy,
independent? Assume that the eight ways a family can have three children are equally
likely.
Solution: By assumption, each of the eight ways a family can have three children.
𝐵𝐵𝐵, 𝐵𝐵𝐺, 𝐵𝐺𝐵, 𝐵𝐺𝐺, 𝐺𝐵𝐵, 𝐺𝐵𝐺, 𝐺𝐺𝐵, 𝑎𝑛𝑑 𝐺𝐺𝐺 , Where G represents girl and B
1
represents boy, has a probability . Since
8

𝐴 = {𝐵𝐵𝐺, 𝐵𝐺𝐵, 𝐵𝐺𝐺, 𝐺𝐵𝐺, 𝐺𝐺𝐵, 𝐺𝐵𝐵}, 𝐵 = {𝐵𝐺𝐺, 𝐺𝐵𝐺, 𝐺𝐺𝐵, 𝐺𝐺𝐺} and

Mathematics Program: By Werku Debele (MSc.) Page 42


Discrete Mathematics And Combinatorics (Math 393) 2012

𝐴 ∩ 𝐵 = {𝐵𝐺𝐺, 𝐺𝐵𝐺, 𝐺𝐺𝐵}


6 3 4 1 3
It follows that 𝑝(𝐴) = 8 = 4 , 𝑝(𝐵) = 8 = 2 𝑎𝑛𝑑 𝑝(𝐴 ∩ 𝐵) = 8. Since
3 3 1
𝑝(𝐴 ∩ 𝐵) = 8 = 4 × 2 = 𝑝(𝐴)𝑝(𝐵). We conclude that 𝐴 and 𝐵 are independent.

Exercise 2.4
1. Consider the experiment of throwing two fair dice. Let A be the event that the
sum of the dice is 7, let B be the event that the sum of the dice is 6, and C be the event
that the first die is 4. Show that events A and C are independent, but event B and C
are not independent.
2. Suppose we draw a card from a standard deck of 52 cards, replace it, draw
another card, and continue for a total of ten draws. Is this an independent trials
process?
3. Suppose we draw a card from a standard deck of 52 cards, discard it (i.e. we
do not replace it), draw another card and continue for a total of ten draws. Is this an
independent trials process?
4. In three flips of a coin, is the event that we have at most one tail independent
of the event that not all flips are identical?
2.5 Random variable and expectation
Objective: After study this section the student should be able to:
 Define a random variable
 Calculate the expected value

A random variable for an experiment with a sample space 𝑆 is a function that assigns
a number to each element of 𝑆. Typically instead of using 𝑓 to stand for such a
function we use 𝑋 (at first, a random variable was conceived of as a variable related to
an experiment, explaining the use of 𝑋, but it is very helpful in understanding the
mathematics to realize it actually is a function on the sample space).
For example, if we consider the process of tossing a coin 𝑛 times, we have the set of
all sequences of 𝑛 𝐻𝑠 and 𝑇s as our sample space. The “number of heads” random
variable takes a sequence and tells us how many heads are in that sequence.
Somebody might say “Let 𝑋 be the number of heads in tossing a coin 5 times.” In that
case 𝑋(𝐻𝑇𝐻𝐻𝑇) = 3 while X(THTHT) = 2. It may be rather jarring to see 𝑋 used
to stand for a function, but it is the notation most people use.

Mathematics Program: By Werku Debele (MSc.) Page 43


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 2.7
Consider a random experiment with sample space 𝑆. A random variable 𝑋(𝜏) is a
single-valued real function that assigns a real number called the value of 𝑋(𝜏) to each
sample point 𝜏 of 𝑆.
Note: A random variable is not a variable at all in the usual sense, and it is a function.
The sample space 𝑆 is termed the domain of the random variable 𝑋(𝜏) , and the
collection of all numbers (values of 𝑋(𝜏)) is termed the range of the random variable.
Thus the range of 𝑋(𝜏) is a certain subset of the set of all real numbers (figure 2.4)

S
𝜏 * 𝑋(𝜏)
 Type equation here.

𝑋(𝜏)
Figure 2.4 Random variable 𝑋(𝜏) as a function.
Example 2.22 : In the experiment of tossing a coin once, we might define the random
variable 𝑋(𝜏) as (figure 2.5)
S T*
𝑋(𝐻) = 1 𝑋(𝑇) = 0
𝐻*
 Type equation here.

0 1 R
Fig.2.5 One random variable associated with coin tossed
Note that we could also define another random variable, say Y or Z, with
𝑌(𝐻) = 0, 𝑌(𝑇) = 1 𝑜𝑟 𝑍(𝐻) = 0, 𝑍(𝑇) = 1
These events have probabilities that are denoted by
𝑝(𝑋 = 𝑥) = 𝑝(𝜏: 𝑋(𝜏) = 𝑥)
𝑝(𝑋 ≤ 𝑥) = 𝑝(𝜏: 𝑋(𝜏) ≤ 𝑥)
𝑝(𝑋 > 𝑥) = 𝑝(𝜏: 𝑋(𝜏) > 𝑥)
𝑝(𝑥1 < 𝑋 ≤ 𝑥2 ) = 𝑝(𝜏: 𝑥1 < 𝑋 ≤ 𝑥2 )
EXAMPLE 2.23 In the experiment of tossing a fair coin three times, the sample
space 𝑆1 consists of eight equally likely sample points 𝑆1 = (𝐻𝐻𝐻, . . . , 𝑇𝑇𝑇). If 𝑋 is
the random variable giving the number of heads obtained, find

Mathematics Program: By Werku Debele (MSc.) Page 44


Discrete Mathematics And Combinatorics (Math 393) 2012

(a) 𝑃(𝑋 = 2);


(b) 𝑃(𝑋 < 2)

Solution:
(a) Let 𝐴 ⊂ 𝑆1 be the event defined by 𝑋 = 2. Then, we have
A = (X = 2) = {τ: X(τ) = 2) = {HHT, HTH, THH)
Since the sample points are equally likely, we have
3
𝑃(𝑋 = 2) = 𝑃(𝐴) = 8

(b) Let 𝐵 ⊂ 𝑆 1 be the event defined by 𝑋 < 2. Then


𝐵 = (𝑋 < 2) = {𝜏: 𝑋((𝜏) < 2) = (𝐻𝑇𝑇, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇)
4 1
and 𝑃(𝑋 < 2) = 𝑃(𝐵) = =2
8

Probability Distribution of a Random Variable


Let X be a random variable on a finite sample space S with range space 𝑅𝑥 =
{𝑥1 , 𝑥2 , . . . , 𝑥𝑡 } Then 𝑋 induces a function 𝑓 which assigns probabilities 𝑝𝑘 to the
points 𝑥𝑘 in 𝑅𝑥 as follows:
𝑓 (xk ) = pk = P(X = xk
= sum of probabilities of points in S whose image is xk .
The set of ordered pairs (𝑥1 , 𝑓 (𝑥1 )), (𝑥2 , 𝑓 (𝑥2 )), . . . , (𝑥𝑡 , 𝑓 (𝑥𝑡 )) is called the
distribution of the random variable 𝑋; it is usually given by a table as in Fig. 2.6. This
function 𝑓 has the following two properties:
(i) 𝑓 (𝑥𝑘 ) ≥ 0 and (𝑖𝑖) ∑𝑘 𝑓(𝑥𝑘 ) = 1
Thus R𝑋 with the above assignments of probabilities is a probability space.
(Sometimes we will use the pair notation [𝑥𝑘 , 𝑝𝑘 ] to denote the distribution of X
instead of the functional notation [x, f (x)]).
Out come 𝑥 𝑥1 𝑥2 𝑥3 . . . 𝑥𝑡
Probability 𝑓(𝑥) 𝑓(𝑥1 ) 𝑓(𝑥2 ) 𝑓(𝑥3 ) . . . 𝑓(𝑥𝑡 )

Fig. 2.6 Distribution 𝑓 of a random variable 𝑋


In the case that 𝑆 is an a equiprobable (uniform distribution) space, we can easily
obtain the distribution of a random variable from the following result.
Theorem 2.4: Let 𝑆 be an equiprobable space, and let 𝑓 be the distribution of a
random variable 𝑋 on 𝑆 with the range space 𝑅𝑥 = {𝑥1 , 𝑥2 , . . . , 𝑥𝑡 } .

Mathematics Program: By Werku Debele (MSc.) Page 45


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑖𝑛𝑡𝑠 𝑖𝑛 𝑆 𝑤ℎ𝑜𝑠𝑒 𝑖𝑚𝑎𝑔𝑒 𝑖𝑠 𝑥𝑖


Then 𝑝𝐼 = 𝑓 (𝑥𝐼 ) =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑖𝑛𝑡𝑠 𝑖𝑛 𝑆

EXAMPLE 2.24: A pair of dice is tossed. Let 𝑋 be assign to each point in 𝑆 the sum
of the numbers: 𝑋 is a random variable with range space
𝑅𝑥 = {2,3,4, … 12}
Note 𝑛(𝑆) = 36, and 𝑅𝑥 = {2, 3, . . . , 12}. Using Theorem 2.4, we obtain the
distribution 𝑓 of 𝑋 as follows:
𝑓 (2) = 1/36, since there is one outcome, (1, 1) whose sum is 2.
𝑓 (3) = 2/36, Since there are two outcomes, (1, 2) and (2,1), whose sum is 3.
𝑓 (4) = 3/36, since there are three outcomes, (1, 3), (2, 2) and (3, 1),whose sum is 4.
Similarly,𝑓 (5) = 4/36, 𝑓 (6) = 5/36, . . . , 𝑓 (12) = 1/36.Thus the distribution
of 𝑋 as follows.
𝑥 2 3 4 5 6 7 8 9 10 11 12

𝑓(𝑥) 1⁄ 2⁄ 3⁄ 4⁄ 5⁄ 6⁄ 5⁄ 4⁄ 3⁄ 2⁄ 1⁄
36 36 36 36 36 36 36 36 36 36 36

Expected value:
The expected value of a random variable is the sum over all elements in a sample
space of the product of the probability of the element and the value of the random
variable at this element.
Definition 2.8 The expected value (or expectation) of the random variable 𝑋(𝑠) on
the sample space Sis equal to
𝐸(𝑋) = ∑𝑠𝜖𝑆 𝑝(𝑠)𝑋(𝑠).
Note that when the sample space 𝑆 has n elements
𝑆 = {𝑥1 , 𝑥2 , … , 𝑥𝑛 }, 𝐸(𝑋) = ∑𝑛𝑖=1 𝑝(𝑥𝑖 )𝑋(𝑥𝑖 )
Remark: We are concerned only with random variables with finite expected values
here.
Example 2.25 A fair coin is tossed six times. Let 𝑆 be the sample space of the 64
possible outcomes, and let 𝑋 be the random variable that assigns to an outcome the
number of heads in this outcome. What is the expected value of 𝑋?

Solution: The number of heads which can occur with their respective probabilities
follows:

Mathematics Program: By Werku Debele (MSc.) Page 46


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑥𝑖 0 1 2 3 4 5 6
𝑝𝑖 1⁄ 6⁄ 15⁄ 20⁄ 15⁄ 6⁄ 1⁄
64 64 64 64 64 64 64

Then the mean or expectation (or expected number of heads) is:


1 6 15 20 15 6 1
𝐸(𝑋) = 0 (64) + 1 (64) + 2 (64) + 3 (64) + 4 (64) + 5 (64) + 6 (64) = 3

Example 2.26 Three horses 𝑎, 𝑏 and 𝑐 are in a race, suppose their respective
1 1 1
probabilities of winning are , 𝑎𝑛𝑑 6. Let 𝑋 denote the pay of a function for the
2 3

winning horse, and suppose 𝑋 pay $2, $6 𝑜𝑟 $9 according as 𝑎, 𝑏 𝑜𝑟 𝑐 wins the race.
What is the expected value of ?
Solution: Expected value of 𝑋 is
𝐸(𝑋) = 𝑋(𝑎)𝑝(𝑎) + 𝑋(𝑏)𝑝(𝑏) + 𝑋(𝑐)𝑃(𝑐)
𝟏 𝟏 𝟏
= 2 (𝟐) + 6 (𝟑) + 9 (𝟔) = 4.5

Theorem 2.5: If 𝑋 is a random variable and 𝑝(𝑋 = 𝑟) is the probability that


𝑋 = 𝑟, so that 𝑝(𝑋 = 𝑟) = ∑𝑠∈𝑆,𝑋(𝑠)=𝑟 𝑝(𝑠), then 𝐸(𝑋) = ∑𝑟∈𝑋(𝑆) 𝑝(𝑋 = 𝑟)
Proof: suppose that 𝑋 is a random variable with range 𝑋(𝑆) , and let 𝑝(𝑋 = 𝑟) be the
probability that the random variable 𝑋 takes the value r. consequently,
𝑝(𝑋 = 𝑟) is the sum of the probabilities of the outcomes s such that 𝑋(𝑠) = 𝑟. it
follows that
𝐸(𝑋) = ∑𝑟∈𝑋((𝑆) 𝑝(𝑋 = 𝑟)𝑟
Example 2.27 What is the expected value of the sum of the numbers that appear
when a pair of a fair dice?
Solution: Let X be the random variable equal to the sum of the numbers that appear
when a pair of dice is rolled. In example 2.25 we listed the value of X for the 36
possible outcomes. The range of X is {2,3,4,5,6,7,8,9,10,11,12}
Substitute the value in example 2.25 in the formula, we have
𝐸(𝑋) = 2𝑝(𝑋 = 2) + 3𝑝(𝑋 = 3) + 4𝑝(𝑋 = 4) + 5𝑝(𝑋 = 5) + 6𝑝(𝑋 = 6)7𝑝(𝑋 =
7) + 8𝑝(𝑋 = 8) + 9𝑝(𝑋 = 9) + 10𝑝(𝑋 = 10) + 11𝑝(𝑋 = 11) + 12𝑝(𝑋 = 12)
1 1 1 1 5 1 5 1
= 2 (36) + 3 (18) + 4 (12) + 5 (9) + 6 (36) + 7 (6) + 8 (36) + 9 (9) +
1 1 1
10 (12) + 11 (18) + 12 (36) = 7

Mathematics Program: By Werku Debele (MSc.) Page 47


Discrete Mathematics And Combinatorics (Math 393) 2012

Theorem 2.5: The expected number of successes when n Bernoulli trials are
performed, where 𝑝the probability of success on each trial is 𝑛𝑝.
Exercise 2.5
1. A random sample with replacement of size 𝑛 = 2 is drawn from the set
{1,2,3}, yielding the following 9-element equiprobable sample space
𝑆 = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)}
a) Let 𝑋 denote the sum of the two numbers. Find the distribution 𝑓 of 𝑋, and
find the expected value 𝐸(𝑋).
b) Let 𝑌 denote the minimum of the two numbers. Find the distribution 𝑔 of 𝑌
,and find the expected value 𝐸(𝑌)
2. A coin is weighted so that 𝑝(𝐻) = 3/4, and 𝑃(𝑇) = 1/4. The coin is tossed
three times. Let 𝑋 denote the number of heads that appear
a) Find the distribution of 𝑓 of 𝑋
b) Find the expected 𝐸(𝑋)
3. A player tossed three fair coins. He wins $5 if three heads occur, $3 if two
heads occur, and $1 if only one head occurs. On the other hand, he losses $15 if
three tails occur. Find the value of the game to the player.
4. What is the expected sum of the tops of n dice when we roll them?

Chapter summery:
 An experiment is a procedure that yields one of a given set of possible outcome.
 A sample space is the set of all possible outcomes of a given experiment,denoted by 𝑺.
 An event 𝐸 is a set of outcome.
 Two events 𝐴 and 𝐵 are called mutually exclusive if they are disjoint, i.e. 𝐴 ∩ 𝐵 = ∅.
 Let 𝐸 be an event of a finite sample space 𝑆 consisting of equally likely outcomes.
𝑝(𝐸)
Then 𝑝(𝐸) = .
𝑃(𝑆)

 Suppose that 𝑆 is a set with n elements. The uniform distribution assigns the
1
probability 𝑛 to each elements of 𝑆.

 If 𝐴 and 𝐵 are any two events, then 𝑝(𝐴 ∪ 𝐵) = 𝑃(𝐴) + 𝑃(𝐵) − 𝑃(𝐴 ∩ 𝐵)
(Inclusion exclusion principle)
 If A and B are mutually exclusive events, then 𝑝(𝐴 ∪ 𝐵) = 𝑃(𝐴) + 𝑃(𝐵) (addition
principle).

Mathematics Program: By Werku Debele (MSc.) Page 48


Discrete Mathematics And Combinatorics (Math 393) 2012

 The conditional probability of 𝐴 given 𝐵, denoted by 𝑝(𝐴\𝐵), defined as 𝑝(𝐴\


𝑝(𝐴∩𝐵)
𝐵) = .
𝑝(𝐵)

 The conditional probability of B given A, denoted by 𝑝(𝐴\𝐵),defined as


𝑝(𝐴∩𝐵)
𝑝(𝐵\𝐴) = .
𝑝(𝐴)

 Two events are dependent if the occurrence of one event affects the probability of the
event occurring.
 The event 𝐴 and 𝐵 are independent if and only if 𝑝(𝐴 ∩ 𝐵) = 𝑝(𝐴)𝑝(𝐵)
 A random variable for an experiment with a sample space 𝑆 is a function that assigns
a number to each element of 𝑆.
 Consider a random experiment with sample space 𝑆. A random variable 𝑋(𝜏) is a
single-valued real function that assigns a real number called the value of 𝑋(𝜏) to each
sample point 𝜏 of 𝑆.
 The expected value (or expectation) of the random variable 𝑋(𝑠) on the sample space
Sis equal to 𝐸(𝑋) = ∑𝑠𝜖𝑆 𝑝(𝑠)𝑋(𝑠).

Self Test Exercise 2


1. A sample space S consists of four elements: that is 𝑆 = {𝑎1 , 𝑎2 , 𝑎3 , 𝑎4 }. under
which of the following function does S become a probability space
1 1 1 1
a) 𝑝(𝑎1 ) = , 𝑝(𝑎2 ) = − 2 , 𝑝(𝑎3 ) = 4 , 𝑝(𝑎4 ) = 5
3
1 1 1 1
b) 𝑝(𝑎1 ) = , 𝑝(𝑎2 ) = − 3 , 𝑝(𝑎3 ) = 2 , 𝑝(𝑎4 ) = 2
3
1 1 1
c) 𝑝(𝑎1 ) = , 𝑝(𝑎2 ) = 4 , 𝑝(𝑎3 ) = 8 , 𝑝(𝑎4 ) = 0
2
3 3 3 3
d) 𝑝(𝑎1 ) = , 𝑝(𝑎2 ) = 12 , 𝑝(𝑎3 ) = 24 , 𝑝(𝑎4 ) = 24
6

2. A coin is weighted so that head is three times as likely to appear as tails. Find
𝑝(𝐻) and 𝑝(𝑇)
3. Suppose 𝐴 and 𝐵 are events with 𝑝(𝐴) = 3/5, 𝑃(𝐵) = 3/10 and 𝑝(𝐴 𝐵) =
1/5. Find the probability that
a) 𝐴 does not occur
b) 𝐵 does not occur
c) 𝐴 or 𝐵 occur
d) (𝐴 ∩ 𝐵)𝑐

Mathematics Program: By Werku Debele (MSc.) Page 49


Discrete Mathematics And Combinatorics (Math 393) 2012

4. A fair die is tossed. Consider events 𝐴 = {2,4,6} 𝐵 = {1,2} 𝐶 = {1,2,3,4}.


Find
a) 𝑃(𝐴 and 𝐵) and 𝑝(𝐴 or 𝐶)
b) 𝑃(𝐴\𝐵) and 𝑝(𝐵\𝐴)
c) 𝑃(𝐴\𝐶) and 𝑝(𝐶\𝐴)
d) 𝑃(𝐵\𝐶) and 𝑝(𝐶\𝐴)
5. A pair of fair dice is tossed. If the numbers appearing are different. Find the
probability that
a) The sum is even
b) The sum exceeds nine
6. Two dice are rolled. Find the probability of obtaining each event
a) A sum of 11, knowing that a six has occurred on one dies.
b) A sum of 11, knowing that one die shows an odd number.
7. The Sealords have three children. Assuming that the outcomes are equally likely
and independent, find the probability that they have three boys, knowing that:
a) The first child is a boy c) at least one child is a boy
b) The first two children are boys. d) the second child is a boy

Mathematics Program: By Werku Debele (MSc.) Page 50


Discrete Mathematics And Combinatorics (Math 393) 2012

Reference:
1. A. W.F.Edwards,Pascal’s Arithmeticical Triangle. The Johns Hopkins University
Press, Baltimore,MD, 2002.
2. C.Oliver, “ The Twelve Days of Christmas,” Mathematics Teacher, Vol. 70
3. David A.Santos, Discrete Mathematics Note
4. Discrete Mathematics, Handbook of discrete and Compinatorial Mathematics
5. Hewel Hus, Schaum’s outline, probability Random Variable
6. J.M.Harris.Jeffry L.Hirst.Michael J.Mossinghoff, Combinatorics and Graph Theory,
2nd edition
7. J.Varnadore, “ Pascal’s Triangle and Fibonacci Numbers,” Mathematics Teacher,
Vol,81.
8. Ken Bogart and Cliffstein, Discrete math in computer science
9. Kenneth H.Rosen, Discrete Mathematics and its application, 3rd edition.
10. M.Eng and J.Casey, “Pascal’s Arithmetical Triangle-ASerendipitious Source for
programming Activities,’’ Mathematics Teacher, Vol 76
11. Mott, Knadel and Baker, Discreate Mathematics
12. P.Z.Chinn, “ inductive patterns, finite Difference, and a Missing Region,’’
Mathematics Teacher, Vol.81(Sept.1988)
13.R.P.GRIMALDI and B.V.RAMANA pearson, Discreate combinatorial
mathematics
14.Rose, Discrete Mathematics
15. Seymour Lipschutz, Schaum’s outline, Discrete Mathematics, 3rd edition

Mathematics Program: By Werku Debele (MSc.) Page 51


Discrete Mathematics And Combinatorics (Math 393) 2012

CHAPTER 3
RECURRENCE RELATION
Objectives:- On completion of the chapter the students will be able to:
 Define recurrence relation.
 Solve linear homogeneous recurrence relation with constant coefficient.
 Solve linear nonhomogeneous recurrence relation with constant coefficient.

3.1 Introduction
Many counting problems cannot be solved easily using the methods discussed in
chapter 1. One such problem is: how many bit strings of length 𝑛 + 1 do not contain
two consecutive zeros? To solve this problem let 𝑎𝑛 be the number of such strings of
length 𝑛 + 1. An argument can be given that shows 𝑎𝑛+2 = 𝑎𝑛+1 + 𝑎𝑛 . This equation,
called recurrence relation, and the initial conditions 𝑎0 = 2 and 𝑎1 = 3 determine the
sequence {𝑎𝑛 }∞
𝑛=0 . Moreover the explicate formula can be found for 𝑎𝑛 from the

equation relating the terms of the sequence. As we will see, a similar technique can be
found to solve many different types of counting problems.
Definition 3.1: A recurrence relation for a sequence {𝑎𝑛 }∞
𝑛=0 is an equation that

expresses 𝑎𝑛 in terms of one or more preceding terms 𝑎0 , 𝑎1 , … , 𝑎𝑛−2 , 𝑎𝑛−1. Moreover,


the sequence is called the solution to the recurrence relation if it satisfies the recurrence
relation.
The following are examples of recurrence relations :
𝑎𝑛 = 2𝑎𝑛−1 + 1 , 𝑛 ≥ 2 (1)
𝑎𝑛 = 5𝑎𝑛−1 − 6𝑎𝑛−2 , 𝑛 ≥ 3 (2)
For (1) we would need one initial value to find a particular or single 𝑎𝑛 . For example, if
𝑎0 = 1 then 𝑎1 = 3 and 𝑎2 = 7.
For (2) we would need two initial values to find a particular or single 𝑎𝑛 . For example,
if 𝑎0 = 1 and 𝑎1 = 5 then 𝑎2 = 19 and 𝑎3 = 65.
Example 3.1 Verify that the solution of the recurrence relation 𝑎𝑛 = 2𝑎𝑛−1 + 1 , 𝑛 ≥
2 with 𝑎0 = 0 is 𝑎𝑛 = 2𝑛 − 1
Solution: We have to do two things

Mathematics Program: By Werku Debele (MSc.) Page 52


Discrete Mathematics And Combinatorics (Math 393) 2012

(a) Check that the given formula gives the correct initial value
(b) Check that the given formula solves the recurrence relation.
Putting 𝑛=0 in 𝑎𝑛 = 2𝑛 − 1 gives 𝑎0 = 1 − 1 as required.
To do (b) we evaluate 2𝑎𝑛−1 + 1 using the given formula and show that it is equal to
𝑎𝑛 .
Now 𝑎𝑛−1 = 2𝑛−1 – 1 so
2𝑎𝑛−1 + 1 = 2(2𝑛−1 – 1) + 1 = 2𝑛 – 1
Recurrence relations have many applications. Suppose that you put £100 into a savings
account yielding 4% compounded annually. Let 𝑎𝑛 be the amount (in pounds) in the
account after 𝑛 years. Then 𝑎𝑛 is equal to the amount in the account after 𝑛 − 1 years
plus the interest for the 𝑛th year. For example, 𝑎1 is equal to 100 plus the interest which
is 4. Hence 𝑎1 = 104.
In general, 𝑎𝑛 = 𝑎𝑛−1 + (0.04)𝑎𝑛−1 so that
𝑎𝑛 = (1.04)𝑎𝑛−1 , 𝑛 ≥ 1
with 𝑎0 = 100.
Solving this we obtain
𝑎1 = 100(1.04)
𝑎2 = (1.04)𝑎1 = 100(1.04)2
𝑎3 = (1.04)𝑎2 = 100(1.04)3
and in general
𝑎𝑛 = 100(1.04)𝑛 .

Exercises 3.1
1. Let 𝑎𝑛 = 2𝑎𝑛−1 + 𝑎𝑛−2 with 𝑎0 = 1 and 𝑎1 = 1 . Find 𝑎2 , 𝑎3 , 𝑎4 and 𝑎5 .
2. Verify that the solution of the recurrence relation 𝑎𝑛 = 3𝑎𝑛−1 with 𝑎0 = 4 is 𝑎𝑛 =
4(3)𝑛 .
3. Verify that the solution of 𝑎𝑛 = 5𝑎𝑛−1 − 12 with 𝑎0 = 13 is 𝑎𝑛 = 10(5)𝑛 + 3.
3.2 Linear recurrence relation with constant coefficient
Objectives:- On completion of this section the students will be able to:
 Define a linear recurrence relation with constant coefficient of degree 𝑘.

Mathematics Program: By Werku Debele (MSc.) Page 53


Discrete Mathematics And Combinatorics (Math 393) 2012

A wide variety of recurrence relations occur in models. Some of those recurrence


relations can be solved using iteration or some other technique. However, one
important class of recurrence relation can be explicitly solved in a systematic way.
These are recurrence relations that express the terms of the sequence as linear
combination of previous terms.
Definition 3.2: A linear recurrence relation with constant coefficient of degree (order)
𝑘 is a recurrence relation of the form
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛) (1)
where 𝑐1 , 𝑐2 , … , 𝑐𝑘 are constants and 𝑐𝑘 ≠ 0.
If 𝑓(𝑛) is identically zero (𝑓(𝑛) = 0) in the recurrence relation (1) defined above, then
the recurrence relation (1) is called homogeneous, otherwise it is called
nonhomogeneous.
Exercise 3.2:
a. 𝑎𝑛 + 6𝑎𝑛−1 = 0 is linear homogeneous recurrence relation with constant coefficient
of degree (order) 1.
b. 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 0 is linear homogeneous recurrence relation with constant
coefficient of degree (order) 2.
c. 𝑎𝑛 + 4𝑎𝑛−1 + 4𝑎𝑛−2 = −5𝑛2 + 𝑛 is linear non-homogeneous recurrence relation
with constant coefficient of degree (order) 2.
d. 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 − 𝑎𝑛−3 = 4𝑛 is linear non-homogeneous recurrence relation
with constant coefficient of degree (order) 3.

3.3 Solution of linear recurrence relation with constant coefficient

3.3.1 Solving linear homogeneous recurrence relation with constant


coefficient
Objectives:- On completion of this section the students will be able to:
 Solve linear homogeneous recurrence relation with constant coefficient.

The basic approach for solving linear homogeneous recurrence relations is to look for
the solutions of the form 𝑎𝑛 = 𝑟 𝑛 , where 𝑟 is constant. Note that 𝑎𝑛 = 𝑟 𝑛 is the
solution of the recurrence relation
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0 (2)

Mathematics Program: By Werku Debele (MSc.) Page 54


Discrete Mathematics And Combinatorics (Math 393) 2012

if and only if
𝑟 𝑛 + 𝑐1 𝑟 𝑛−1 + 𝑐2 𝑟 𝑛−2 + ⋯ + 𝑐𝑘 𝑟 𝑛−𝑘 = 0.
When both side of the equation is divided by 𝑟 𝑛−𝑘 we obtain the equation
𝑟 𝑘 + 𝑐1 𝑟 𝑘−1 + 𝑐2 𝑟 𝑘−2 + ⋯ + 𝑐𝑘−1 𝑟 + 𝑐𝑘 = 0 . (3)
Consequently the sequence {𝑎𝑛 }∞ 𝑛
𝑛=0 with 𝑎𝑛 = 𝑟 is the solution if and only if 𝑟 is the

solution of the last equation (3), which is called the characteristic equation of the
recurrence relation (2). The solutions of the characteristic equation (3) are called
characteristic roots of the recurrence relation (2). As we will see, these characteristic
roots can be used to give an explicit formula for all the solutions of the recurrence
relation (2).
Let us first see the rule to find all the possible solutions (general solution)
homogeneous recurrence relation with constant coefficients of degree 1.
All the possible solutions or general solution to the linear homogenous recurrence
relation with constant coefficient of degree 1
𝑎𝑛 + 𝑐𝑎𝑛−1 = 0
is 𝑎𝑛 = 𝑝(−𝑐)𝑛 , where 𝑝 is a constant.
Example 3.2. Find the solution of the recurrence relation
𝑎𝑛 − 5𝑎𝑛−1 = 0
with initial condition 𝑎0 = 7
Solution. The general solution is 𝑎𝑛 = 𝑝(5𝑛 ) .
Since 𝑎0 = 7,
⟹ 𝑎0 = 𝑝(50 ) = 7
Thus,
𝑝 = 7 and hence the solution is 𝑎𝑛 = 7(5𝑛 ) .
Now we will develop rules that deal with linear homogeneous recurrence relation with
constant coefficients of degree 2. Then corresponding general rules when the degree
may be greater that two will be stated. Because the proofs needed to establish the
general rules in general case are more complicated. We now turn our attention to linear
recurrence relations of degree two.
Theorem 3.1: Consider a linear homogeneous recurrence relation with constant
coefficient of degree 2
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 = 0 (4)
for 𝑛 ≥ 2, where 𝑐1 and 𝑐2 are constants, and consider its characteristic equation

Mathematics Program: By Werku Debele (MSc.) Page 55


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑟 2 + 𝑐1 𝑟 + 𝑐2 = 0 . (5)
i. If the characteristic equation (5) has two distinct roots 𝑟1 and 𝑟2 , then the sequence
{𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation (4) if and only if

𝑎𝑛 = 𝑑1 𝑟1 𝑛 + 𝑑2 𝑟2 𝑛 (6)
where 𝑑1 and 𝑑1 are constants.
ii. If the characteristic equation (5) has only one root 𝑟0 , then the sequence {𝑎𝑛 }∞
𝑛=0 is

the solution of the recurrence relation (4) if and only if


𝑎𝑛 = 𝑑1 𝑟0 𝑛 + 𝑑2 𝑛 𝑟0 𝑛 (7)
where 𝑑1 and 𝑑1 are constants.
Proof:
i. We must do two things to prove the theorem. First it must be shown that if 𝑟1 and 𝑟2 are
roots of the characteristic equation, and 𝑑1 and 𝑑1 are constants, then the sequence
{𝑎𝑛 }∞ 𝑛
𝑛=0 with 𝑎𝑛 = 𝑑1 𝑟1 + 𝑑2 𝑟2
𝑛
is the solution of the recurrence relation. Second it
must be shown that if the sequence {𝑎𝑛 }∞ 𝑛
𝑛=0 is the solution, then 𝑎𝑛 = 𝑑1 𝑟1 + 𝑑2 𝑟2
𝑛

for some constants 𝑑1 and 𝑑1 .


Now we will show that if 𝑎𝑛 = 𝑑1 𝑟1 𝑛 + 𝑑2 𝑟2 𝑛 , then the sequence {𝑎𝑛 }∞
𝑛=0 is the

solution of the recurrence relation. Since 𝑟1 and 𝑟2 are roots of 𝑟 2 + 𝑐1 𝑟 + 𝑐2 = 0, it


follows that 𝑟12 = −𝑐1 𝑟1 − 𝑐2 and 𝑟22 = −𝑐1 𝑟2 − 𝑐2 .
From these equations , we see that
−𝑐1 𝑎𝑛−1 − 𝑐2 𝑎𝑛−2 = −𝑐1 (𝑑1 (𝑟1𝑛−1 ) + 𝑑2 (𝑟2𝑛−1 )) − 𝑐2 (𝑑1 (𝑟1𝑛−2 ) + 𝑑2 (𝑟2𝑛−2 ))
= −𝑐1 𝑑1 (𝑟1𝑛−1 ) − 𝑐1 𝑑2 (𝑟2𝑛−1 ) − 𝑐2 𝑑1 (𝑟1𝑛−2 ) − 𝑐2 𝑑2 (𝑟2𝑛−2 )
= 𝑑1 (𝑟1𝑛−2 )[−𝑐1 𝑟1 − 𝑐2 ] + 𝑑2 (𝑟1𝑛−2 )[−𝑐1 𝑟2 − 𝑐2 ]
= 𝑑1 (𝑟1𝑛−2 )𝑟12 + 𝑑2 (𝑟1𝑛−2 )𝑟22
= 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛
= 𝑎𝑛
This shows that the sequence {𝑎𝑛 } with 𝑎𝑛 = 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛 is the solution of the
recurrence relation. To show every solution {𝑎𝑛 } of the recurrence relation 𝑎𝑛 +
𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 = 0 has 𝑎𝑛 = 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛 for 𝑛 = 0,1,2, … and 𝑑1 and 𝑑2 are
constants, suppose that {𝑎𝑛 } is the solution of the recurrence relation, and the initial
conditions 𝑎0 = 𝐶0 and 𝑎1 = 𝐶1 hold. It will be shown that there are constants 𝑑1 and
𝑑2 so that the sequence {𝑎𝑛 } with 𝑎𝑛 = 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛 satisfies these the same initial
conditions. This requires that

Mathematics Program: By Werku Debele (MSc.) Page 56


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑎0 = 𝐶0 = 𝑑1 + 𝑑2
𝑎1 = 𝐶1 = 𝑑1 𝑟1 + 𝑑2 𝑟1
We can solve these two equations for 𝑑1 and 𝑑2 . From the first equation it follows that
𝑑2 = 𝐶0 − 𝑑1 . Inserting this equation in to the second equation gives 𝐶1 = 𝑑1 𝑟1 +
(𝐶0 − 𝑑1 )𝑟2.
Hence,
𝐶1 = 𝑑1 (𝑟1 − 𝑟2 ) + 𝐶0 𝑟2
This shows that
(𝐶1 −𝐶0 𝑟2 )
𝑑1 = 𝑟1 −𝑟2

and
(𝐶1 −𝐶0 𝑟2 ) 𝐶0 𝑟1 −𝐶1
𝑑2 = 𝐶0 − 𝑑1 = 𝑑2 = 𝐶0 − =
𝑟1 −𝑟2 𝑟1 −𝑟2

where these expressions for 𝑑1 and 𝑑2 depend on the fact that 𝑟1 ≠ 𝑟2. ( When 𝑟1 = 𝑟2 ,
this theorem is not true.)
Hence, with those values for 𝑑1 and 𝑑2 , the sequence {𝑎𝑛 } with 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛 satisfies
the two initial conditions. Since this recurrence relation and these initial conditions
uniquely determine the sequence, it follows that 𝑎𝑛 = 𝑑1 𝑟1𝑛 + 𝑑2 𝑟2𝑛 .∎
ii. Exercise.

Note that: The solution (6) or (7) are all possible solutions of the recurrence relation
(4). And we call the solution general solution of the recurrence relation (4).
Example 3.3. Find the general solution of
𝑎𝑛 − 𝑎𝑛−1 − 2𝑎𝑛−2 = 0 , for 𝑛 ≥ 2
Solution: The characteristic equation of the given recurrence relation is 𝑟 2 − 𝑟 − 2 = 0.
Then, find the roots of the characteristic equation using quadratic formula
(factorization).
𝑟2 − 𝑟 − 2 = 0
⇒ (𝑟 + 1)(𝑟 − 2) = 0
So 𝑟 = −1 and 𝑟 = 2. Thus, the characteristic equation has two distinct roots 𝑟 = −1
and 𝑟 = 2
Hence, the general solution is
𝑎𝑛 = 𝑑1 (−1)𝑛 + 𝑑2 (2)𝑛
where 𝑑1 and 𝑑2 are constants.

Mathematics Program: By Werku Debele (MSc.) Page 57


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 3.4. Find the solution of


𝑎𝑛 = −7𝑎𝑛−1 − 12𝑎𝑛−2 , for 𝑛 ≥ 2
with initial condition 𝑎1 = 0 and 𝑎1 = 5.
Solution: 𝑎𝑛 = −7𝑎𝑛−1 − 12𝑎𝑛−2
⇒ 𝑎𝑛 + 7𝑎𝑛−1 + 12𝑎𝑛−2 = 0
Thus, the characteristic equation is
𝑟 2 + 7𝑟 + 12 = 0.
And finding the roots of the characteristic equation using quadratic formula or
factorization, we have 𝑟 = 3 and = 4 .
Hence, the general solution is
𝑎𝑛 = 𝑑1 (3)𝑛 + 𝑑2 (4)𝑛
where 𝑑1 and 𝑑2 are constants.
Putting 𝑛 = 0 and 𝑛 = 1 in 𝑎𝑛 = 𝑑1 (3)𝑛 + 𝑑2 (4)𝑛 and using the initial conditions
gives, we have
𝑑1 + 𝑑2 = 0 and
3𝑑1 + 4𝑑2 = 5.
Solving these gives 𝑑1 = −5 and 𝑑2 = 5.
Hence,
𝑎𝑛 = −5(3)𝑛 + 5(4)𝑛
is the solution.
Example 3.5: Find the solution of
9
𝑎𝑛 − 3𝑎𝑛−1 + 4 𝑎𝑛−2 = 0 , for 𝑛 ≥ 2

with 𝑎0 = 1 and 𝑎1 = 10.


Solution: The characteristic equation of the given recurrence relation is
9
𝑟 2 − 3𝑟 + 4 = 0.

Finding the roots of the characteristic equation using quadratic formula


9
3±√32 −4(1)( ) 3±√9−9 3
4
𝑟= = =2.
2(1) 2
3
So the characteristic equation has double root 𝑟 = 2 .

Hence, the general solution is


3 𝑛 3 𝑛
𝑎𝑛 = 𝑑1 (2 ) + 𝑑2 𝑛 (2 )

Mathematics Program: By Werku Debele (MSc.) Page 58


Discrete Mathematics And Combinatorics (Math 393) 2012

where 𝑑1 and 𝑑2 are constants.


3 𝑛 3 𝑛
Putting 𝑛 = 0 and 𝑛 = 1 in 𝑎𝑛 = 𝑑1 (2 ) + 𝑑2 𝑛 (2 ) and using the initial conditions

gives, we have
𝑑1 = 1 and
3 3
𝑑 + 2 𝑑2 = 10.
2 1
17
Solving these gives 𝑑1 = 1 and 𝑑2 = .
3

Hence,
3 𝑛 17 3 𝑛
𝑎𝑛 = (2 ) + 𝑛 (2 )
3

is the solution.
We will now state the general result about the solution of linear homogeneous
recurrence relation with constant coefficients of degree 𝑘, where the degree 𝑘 ≥ 2
under the assumption that the characteristic equation has 𝑘 distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑘 or
the characteristic equation has t distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑡 with multiplicity
𝑚1 , 𝑚2 , … , 𝑚𝑡 respectively, so that 𝑚𝑖 ≥ 1, for 𝑖 = 1,2, … , 𝑡 and 𝑚1 + 𝑚2 + ⋯ +
𝑚𝑡 = 𝑘.
Theorem 3.2: Consider the linear homogeneous recurrence relation with constant
coefficient of degree k k k k k k k k k k k k k k k k k k k k k k k k k k k k k kk k k k k k
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0 (8)
and consider its characteristic equation I I ik ihh hh hbh hh h h n n n n
𝑟 𝑘 + 𝑐1 𝑟 𝑘−1 + 𝑐2 𝑟 𝑘−2 + ⋯ + 𝑐𝑘−1 𝑟 + 𝑐𝑘 = 0. (9)
i. If the characteristic equation (9) has 𝑘 distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑘 , then the sequence
{𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation (8) if and only if

𝑎𝑛 = 𝑑1 𝑟1 𝑛 + 𝑑2 𝑟2 𝑛 + ⋯ + 𝑑𝑘 𝑟𝑘 𝑛 (10)
where 𝑑1 , 𝑑2 , … , 𝑑𝑘 are constants.
ii. If the characteristic equation (9) has t distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑡 with multiplicity
𝑚1 , 𝑚2 , … , 𝑚𝑡 respectively, so that 𝑚𝑖 ≥ 1, for 𝑖 = 1,2, … , 𝑡 and 𝑚1 + 𝑚2 + ⋯ +
𝑚𝑡 = 𝑘, then the sequence {𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation (8) if and

only if

Mathematics Program: By Werku Debele (MSc.) Page 59


Discrete Mathematics And Combinatorics (Math 393) 2012

𝑎𝑛 = (𝛼10 + 𝛼11 𝑛 + ⋯ + 𝛼1(𝑚1 −1) 𝑛𝑚1 −1 )𝑟1 𝑛 + (𝛼20 + 𝛼21 𝑛 + ⋯ +


𝛼2(𝑚2 −1) 𝑛𝑚2 −1 )𝑟2 𝑛 + ⋯ + (𝛼𝑡0 + 𝛼𝑡1 𝑛 + ⋯ + 𝛼𝑡(𝑚𝑡 −1) 𝑛𝑚𝑡 −1 )𝑟𝑡 𝑛
(11) where 𝛼𝑖𝑗 are constants for 0 ≤ 𝑖 ≤ 𝑡 and 0 ≤ 𝑗 ≤ 𝑚𝑖 − 1.
Note that: The solution (10) or (11) are all possible solutions of the recurrence relation
(8). And we call the solution general solution of the recurrence relation (8).
Example 3.6. Find the general solution of the recurrence relation
3 23
𝑎𝑛 + 2 𝑎𝑛−1 − 𝑎𝑛−2 + 28𝑎𝑛−3 − 10𝑎𝑛−4 = 0 , for 𝑛 ≥ 4.
2

Solution: The characteristic equation the given recurrence relation is


3 23 2
𝑟4 + 2 𝑟3 − 𝑟 + 28𝑟 − 10 = 0.
2
1
⟹ (𝑟 − 2)2 (𝑟 − 2) (𝑟 + 5) = 0
1 1
So that 𝑟 = 2 , 𝑟 = 2 and 𝑟 = −5 with the multiplicity of 2 is 2, the multiplicity of 2

is 2 and the multiplicity of −5 is 1.


Hence the general solution of the recurrence relation
3 23
𝑎𝑛 + 2 𝑎𝑛−1 − 𝑎𝑛−2 + 28𝑎𝑛−3 − 10𝑎𝑛−4 = 0 , for 𝑛 ≥ 4
2

is
1 𝑛
𝑎𝑛 = (𝑑1 + 𝑑2 𝑛)(2 )𝑛 + 𝑑3 (2) + 𝑑3 (−5)𝑛

where 𝑑1 , 𝑑2 , 𝑑3 and 𝑑4 are constants.


Exercise 3.3.1
1. Solve the recurrence relations together with the initial conditions given.
a. 𝑎𝑛 − 2𝑎𝑛−1 = 0 , fo𝑟 𝑛 ≥ 1 , 𝑎0 = 3
b. 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 0 , for 𝑛 ≥ 2 , 𝑎0 = 1 , 𝑎1 = 0 .
c. 𝑎𝑛 + 8𝑎𝑛−1 + 16𝑎𝑛−2 = 0 , for 𝑛 ≥ 2 , 𝑎0 = 1 , 𝑎1 = 1 .
2. Find the general solution (all solutions) of the recurrence relation
a. 𝑎𝑛 = 6𝑎𝑛−1 , for 𝑛 ≥ 1 .
b. 𝑎𝑛 + 10𝑎𝑛−1 + 25𝑎𝑛−2 = 0 , for 𝑛 ≥ 2
c. 𝑎𝑛 − 2𝑎𝑛−1 − 𝑎𝑛−2 + 2𝑎𝑛−3 = 0 , for 𝑛 ≥ 3
3.3.2. Solving linear nonhomogeneous recurrence relation with constant
coefficient

Objectives:- On completion of this section the students will be able to:

Mathematics Program: By Werku Debele (MSc.) Page 60


Discrete Mathematics And Combinatorics (Math 393) 2012

 Solve linear nonhomogeneous recurrence relation with constant coefficient.

We have seen how to solve linear homogeneous recurrence relation with constant
coefficients. Is there a relatively simple technique for solving a linear, but not
homogeneous, recurrence relation with constant coefficients, such as 𝑎𝑛 = 3𝑎𝑛−1 +
2𝑛 ? We will see that the answer is yes for a certain families of such recurrence
relations.
The recurrence relation 𝑎𝑛 = 3𝑎𝑛−1 + 2𝑛 is an example of linear nonhomogeneous
recurrence relations with constant coefficients, that is recurrence relation of the
form
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛)
where 𝑐1 , 𝑐2 , … , 𝑐𝑘 are constants and 𝑐𝑘 ≠ 0 and 𝑓(𝑛) is a function not identically zero
depending only on 𝑛. The recurrence relation
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0
is called the associated homogenous recurrence relation. It plays an important role in
the solution of the nonhomogeneous recurrence relation.
Theorem 3.3: Consider the linear nonhomogeneous recurrence relations with constant
coefficients of degree 𝑘
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛) (12)
and its associated homogenous recurrence relation
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0 (13)
𝑔 ∞
Then every solution of the recurrence relation (12) is of the form {𝑎𝑛𝑝 + 𝑎𝑛 }𝑛=0 , where

𝑎𝑛𝑝 is the particular solution of the recurrence relation (12) and 𝑎𝑛ℎ is the solution of the
recurrence relation (13).
Proof: Let 𝑎𝑛𝑝 be the particular solution of the non homogeneous recurrence relation.
Thus,
𝑎𝑛𝑝 + 𝑐1 𝑎𝑛−1
𝑝 𝑝
+ ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛). (14)
Now suppose that 𝑎𝑛𝑠 is any other solution of the nonhomogeneous recurrence relation.
Thus,
𝑠 𝑠
𝑎𝑛𝑠 + 𝑐1 𝑎𝑛−1 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛) . (15)
Subtracting the equation (a) from equation (b)
𝑠
[𝑎𝑛𝑠 + 𝑐1 𝑎𝑛−1 𝑠
+ ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 ] − [𝑎𝑛𝑝 + 𝑐1 𝑎𝑛−1
𝑝 𝑝
+ ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 ] = 0 + 𝑓(𝑛)

Mathematics Program: By Werku Debele (MSc.) Page 61


Discrete Mathematics And Combinatorics (Math 393) 2012

⟹ (𝑎𝑛𝑠 − 𝑎𝑛𝑝 ) + 𝑐1 (𝑎𝑛−1


𝑠 𝑝 𝑠 𝑝
− 𝑎𝑛−1 ) + ⋯ + 𝑐𝑘 (𝑎𝑛−𝑘 − 𝑎𝑛−𝑘 ) = 𝑓(𝑛)
It follows that 𝑎𝑛𝑠 − 𝑎𝑛𝑝 is the solution of the associated homogeneous recurrence
relation.
Let 𝑎𝑛ℎ = 𝑎𝑛𝑠 − 𝑎𝑛𝑝 . Thus, 𝑎𝑛𝑠 = 𝑎𝑛ℎ + 𝑎𝑛𝑝 .

Therefore, every solution of the recurrence relation (12) is of the form {𝑎𝑛ℎ + 𝑎𝑛𝑝 }𝑛=0 ,

where 𝑎𝑛𝑝 is the particular solution of the recurrence relation (12) and 𝑎𝑛ℎ is the solution
of the recurrence relation (13).
Problem: What is the general solution of the linear nonhomogeneous recurrence
relation (12)?
The general solution (all solutions) of the linear nonhomogeneous recurrence
𝑔 ∞
relation (12) is the sequence {𝑎𝑛𝑝 + 𝑎𝑛 }𝑛=0 , where 𝑎𝑛𝑝 is the particular solution of
𝑔
the linear nonhomogeneous recurrence relation (12) and 𝑎𝑛 is the general solution
of the associated homogenous recurrence relation (13).

Problem: How can we find or choose the particular solution 𝑎𝑛𝑝 for the linear
nonhomogeneous recurrence relation (12)?
𝑓(𝑛) Choice of 𝑎𝑛𝑝
𝑞𝑚 𝑛𝑚 + 𝑞𝑚−1 𝑛𝑛−1 + ⋯ + 𝑞1 𝑛 + 𝑞0 𝑝𝑚 𝑛𝑚 + 𝑝𝑚−1 𝑛𝑛−1 + ⋯ + 𝑝1 𝑛 + 𝑝0
𝛼(𝑏 𝑛 ) 𝛽(𝑏 𝑛 )
(𝑞𝑚 𝑛𝑚 + 𝑞𝑚−1 𝑛𝑛−1 + ⋯ + 𝑞1 𝑛 + 𝑞0 )𝑏 𝑛 (𝑝𝑚 𝑛𝑚 + 𝑝𝑚−1 𝑛𝑛−1 + ⋯ + 𝑝1 𝑛 + 𝑝0 )𝑏 𝑛

Rules:
If 𝑓(𝑛) is one of the terms on the left side of the table choose the particular solution
𝑎𝑛𝑝 from the right side of the table and determine the underdetermined coefficients by
using the original equation in (12).
If 𝑏 is the root of the characteristic equation to the recurrence relation (13) with
multiplicity 𝑚, then multiply 𝑎𝑛𝑝 by 𝑛𝑚 .
That is if 𝑏 is the root of the characteristic equation to the recurrence relation (13)
with multiplicity 𝑚, choose the particular solution 𝑎𝑛𝑝 = 𝛽𝑛𝑚 (𝑏 𝑛 ) for the case
𝑓(𝑛) = 𝛼(𝑏 𝑛 ) and choose the particular solution
𝑎𝑛𝑝 = 𝑛𝑚 (𝑝𝑚 𝑛𝑚 + 𝑝𝑚−1 𝑛𝑛−1 + ⋯ + 𝑝1 𝑛 + 𝑝0 )𝑏 𝑛
for the case 𝑓(𝑛) = (𝑞𝑚 𝑛𝑚 + 𝑞𝑚−1 𝑛𝑛−1 + ⋯ + 𝑞1 𝑛 + 𝑞0 )𝑏 𝑛 .

Mathematics Program: By Werku Debele (MSc.) Page 62


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 3.7. Find a particular solution of the recurrence relation


𝑎𝑛 − 4𝑎𝑛−1 = − 15 , for 𝑛 ≥ 1
Solution. The given recurrence relation is of the form 𝑎𝑛 − 4𝑎𝑛−1 = 𝑓(𝑛) , where
𝑓(𝑛) = −15. We choose particular solution 𝑎𝑛𝑝 = 𝑞 , where 𝑞 is a constant.
Then, we have to find 𝑞 by substituting 𝑎𝑛𝑝 in to the given recurrence relation, that is
𝑎𝑛𝑝 − 4𝑎𝑛−1
𝑝
= − 15.
Observe that 𝑎𝑛𝑝 = 𝑞 and 𝑎𝑛−1
𝑝
= 𝑞. Thus, we have −4𝑞 = − 15 .
⟹ −3𝑞 = −15 ⟹𝑞=5
Hence, 𝑎𝑛𝑝 = 5 is the particular solution of the recurrence relation.
Example 3.8 . Find a particular solution of the recurrence relation
𝑎𝑛 = 6𝑎𝑛−1 + 7𝑎𝑛−2 + 7𝑛 , for 𝑛 ≥ 2
Solution.
The given recurrence relation is of the form 𝑎𝑛 − 6𝑎𝑛−1 − 7𝑎𝑛−2 = 𝑓(𝑛) , where
𝑓(𝑛) = 7𝑛 . The associated homogeneous recurrence relation to the given recurrence
relation is
𝑎𝑛 − 6𝑎𝑛−1 − 7𝑎𝑛−2 = 0
and its characteristic equation is 𝑟 2 − 6𝑟 − 7 = 0.
Thus,
6±√(−6)2 −4(1)(−7) 6±√64 6±8
𝑟= = =
2(1) 2 2

So 𝑟 = 7 and 𝑟 = −1.
𝑓(𝑛) = 7𝑛 , and 𝑏 = 7 is the root of the characteristic equation with multiplicity 1.
Thus we choose particular solution 𝑎𝑛𝑝 = 𝑞𝑛(7𝑛 ) , where 𝑞 is a constant.
Then, we have to find 𝑞 by substituting 𝑎𝑛𝑝 in to the given recurrence relation, that is
𝑎𝑛𝑝 − 6𝑎𝑛−1
𝑝 𝑝
− 7𝑎𝑛−2 = 7𝑛 .
Observe that 𝑎𝑛𝑝 = 𝑞𝑛(7𝑛 ) , 𝑎𝑛−1
𝑝 𝑝
= 𝑞(𝑛 − 1)(7𝑛−1 ) and 𝑎𝑛−2 = 𝑞(𝑛 − 2)(7𝑛−2 ) .
Thus,
[𝑞𝑛(7𝑛 )] − 6[𝑞(𝑛 − 1)(7𝑛−1 )] − 7[𝑞(𝑛 − 2)(7𝑛−2 )] = 7𝑛
⟹ 𝑞𝑛(7𝑛 ) − 6𝑞𝑛7𝑛−1 + 6𝑞7𝑛−1 − 7𝑞𝑛7𝑛−2 + 14𝑞7𝑛−2 = 7𝑛
6 6 1 2
⟹ 𝑞𝑛(7𝑛 ) − 7 𝑞𝑛(7𝑛 ) + 7 𝑞(7𝑛 ) − 7 𝑞𝑛(7𝑛 ) + 7 𝑞7𝑛−2 = 7𝑛
8 8 7
⟹ 𝑞(7𝑛 ) = 7𝑛 ⟺ 7𝑞 = 1 ⟺ 𝑞 = 8
7

Mathematics Program: By Werku Debele (MSc.) Page 63


Discrete Mathematics And Combinatorics (Math 393) 2012

7
Hence, 𝑎𝑛𝑝 = 𝑛(7𝑛 ) is the particular solution of the recurrence relation.
8

Example 3.9 . Find the general solution of the recurrence relation


𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 5𝑛 − 6 , for 𝑛 ≥ 2
Solution. 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 5𝑛 − 6
⟹ 𝑎𝑛 − 𝑎𝑛−1 − 𝑎𝑛−2 = 5𝑛 − 6
⟹ 𝑎𝑛 − 𝑎𝑛−1 − 𝑎𝑛−2 = 𝑓(𝑛) , where 𝑓(𝑛) = 5𝑛 − 6
The associated homogeneous recurrence relation to the given recurrence relation is
𝑎𝑛 − 𝑎𝑛−1 − 𝑎𝑛−2 = 0
and its characteristic equation is 𝑟 2 − 𝑟 − 1 = 0.
Thus,
1±√(−1)2 −4(1)(−1) 1±√5
𝑟= =
2(1) 2

1+√5 1−√5
So 𝑟 = and 𝑟 = .
2 2

Hence, the general solution to the associated homogeneous recurrence relation is


𝑛 𝑛
𝑔 1+√5 1−√5
𝑎𝑛 = 𝑑1 ( ) + 𝑑2 ( )
2 2

where 𝑑1 and 𝑑2 are constants.


𝑓(𝑛) = 5𝑛 − 6, so we choose the particular solution to the given nonhomogeneous
recurrence relation to be 𝑎𝑛𝑝 = 𝑞1 𝑛 + 𝑞2 , where 𝑞1 and 𝑞2 are constants to be
determined by substituting 𝑎𝑛𝑝 in to the given recurrence relation.
Thus,
𝑎𝑛𝑝 − 𝑎𝑛−1
𝑝 𝑝
− 𝑎𝑛−2 = 𝑓(𝑛).
And 𝑎𝑛𝑝 = 𝑞1 𝑛 + 𝑞2 , 𝑎𝑛−1
𝑝 𝑝
= 𝑞1 (𝑛 − 1) + 𝑞2 and 𝑎𝑛−2 = 𝑞1 (𝑛 − 2) + 𝑞2 .
Thus,
𝑎𝑛𝑝 − 𝑎𝑛−1
𝑝 𝑝
− 𝑎𝑛−2 = 𝑓(𝑛)
⟹ (𝑞1 𝑛 + 𝑞2 ) − (𝑞1 (𝑛 − 1) + 𝑞2 ) − (𝑞1 (𝑛 − 2) + 𝑞2 ) = 𝑓(𝑛)
⟹ 𝑞1 𝑛 + 𝑞2 − 𝑞1 𝑛 + 𝑞1 − 𝑞2 − 𝑞1 𝑛 + 2𝑞1 − 𝑞2 = 5𝑛 − 6
⟹ −𝑞1 𝑛 + (𝑞2 + 3𝑞1 ) = 5𝑛 − 6
⟺ −𝑞1 = 5 and 𝑞2 + 3𝑞1 = −6
Thus, 𝑞1 = −5 and 𝑞2 = 9.
Hence, the particular solution to the given nonhomogeneous recurrence relation is
𝑎𝑛𝑝 = −5𝑛 + 9.

Mathematics Program: By Werku Debele (MSc.) Page 64


Discrete Mathematics And Combinatorics (Math 393) 2012

Therefore, the general solution to the nonhomogeneous recurrence relation 𝑎𝑛 =


𝑔
𝑎𝑛−1 + 𝑎𝑛−2 + 5𝑛 − 6 is 𝑎𝑛 = 𝑎𝑛 + 𝑎𝑛𝑝 .
That is the general solution to the nonhomogeneous recurrence relation
𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 5𝑛 − 6
is
𝑛 𝑛
1+√5 1−√5
𝑎𝑛 = 𝑑1 ( ) + 𝑑2 ( ) − 5𝑛 + 9
2 2

where 𝑑1 and 𝑑2 are constants.


Example 3.10. Find the solution of the recurrence relation
𝑎𝑛 − 6𝑎𝑛−1 + 9𝑎𝑛−2 = 2(3𝑛 ) , for 𝑛 ≥ 2
with initial condition 𝑎0 = −1 and 𝑎1 = 5.
Solution. We are given a recurrence relation
𝑎𝑛 − 6𝑎𝑛−1 + 9𝑎𝑛−2 = 𝑓(𝑛), where 𝑓(𝑛) = 2(3𝑛 ).
The associated homogeneous recurrence relation to the given recurrence relation is
𝑎𝑛 − 6𝑎𝑛−1 + 9𝑎𝑛−2 = 0
and its characteristic equation is 𝑟 2 − 6𝑟 + 9 = 0.
Thus, 𝑟 2 − 6𝑟 + 9 = 0
⟹ (𝑟 − 3)2 = 0
So the characteristic equation has double root and is 𝑟 = 3.
Hence, the general solution to the associated homogeneous recurrence relation is
𝑔
𝑎𝑛 = 𝑑1 (3 )𝑛 + 𝑑2 𝑛(3)𝑛
where 𝑑1 and 𝑑2 are constants.
𝑓(𝑛) = 2(3𝑛 ), and 𝑏 = 3 is the root of the characteristic equation and the multiplicity
of 3 is 2, so we choose the particular solution to the given nonhomogeneous recurrence
relation to be 𝑎𝑛𝑝 = 𝑞𝑛2 (3𝑛 ) , where 𝑞 is constant to be determined by substituting 𝑎𝑛𝑝
in to the given recurrence relation.
𝑎𝑛𝑝 − 6𝑎𝑛−1
𝑝 𝑝
= 2(3𝑛 ) . But, 𝑎𝑛𝑝 = 𝑞𝑛2 (3𝑛 ), 𝑎𝑛−1
𝑝
That is + 9𝑎𝑛−2 = 𝑞(𝑛 −
𝑝
1)2 (3𝑛−1 ) and 𝑎𝑛−2 = 𝑞(𝑛 − 2)2 (3𝑛−2 ).
Thus,
𝑎𝑛𝑝 − 6𝑎𝑛−1
𝑝 𝑝
+ 9𝑎𝑛−2 = 2(3𝑛 )
⟹ [𝑞𝑛2 (3𝑛 )] − 6[𝑞(𝑛 − 1)2 (3𝑛−1 )] + 9[𝑞(𝑛 − 2)2 (3𝑛−2 )] = 2(3𝑛 )
⟹ 𝑞𝑛2 (3𝑛 ) − 6[𝑞(𝑛2 − 2𝑛 + 1)(3𝑛−1 )] +9[𝑞(𝑛2 − 4𝑛 + 4)(3𝑛−2 )] = 2(3𝑛 )

Mathematics Program: By Werku Debele (MSc.) Page 65


Discrete Mathematics And Combinatorics (Math 393) 2012

⟹ 𝑞𝑛2 (3𝑛 ) − 6𝑞𝑛2 (3𝑛−1 ) + 12𝑞𝑛(3𝑛−1 ) − 6𝑞(3𝑛−1 ) + 9𝑞𝑛2 (3𝑛−2 ) −


36𝑞𝑛(3𝑛−2 ) + 36𝑞(3𝑛−2 ) = 2(3𝑛 )
⟹ 𝑞𝑛2 (3𝑛 ) − 2𝑞𝑛2 (3𝑛 ) + 4𝑞𝑛(3𝑛 ) − 2𝑞(3𝑛 ) + 𝑞𝑛2 (3𝑛 ) − 4𝑞𝑛(3𝑛 ) + 4𝑞(3𝑛 ) =
2(3𝑛 )
⟹ 2𝑞3𝑛 = 2(3𝑛 ) ⟺ 𝑞 = 1
Hence, the particular solution to the given nonhomogeneous recurrence relation is
𝑎𝑛𝑝 = 𝑛2 (3𝑛 ).
Therefore, the general solution to the nonhomogeneous recurrence relation 𝑎𝑛 −
𝑔
6𝑎𝑛−1 + 9𝑎𝑛−2 = 2(3𝑛 ) is 𝑎𝑛 = 𝑎𝑛 + 𝑎𝑛𝑝 .
That is the general solution to the nonhomogeneous recurrence relation
𝑎𝑛 − 6𝑎𝑛−1 + 9𝑎𝑛−2 = 2(3𝑛 )
is
𝑎𝑛 = 𝑑1 (3𝑛 ) + 𝑑2 𝑛(3𝑛 ) + 𝑛2 (3𝑛 )
where 𝑑1 and 𝑑2 are constants.
Then, putting 𝑛 = 0 and 𝑛 = 1 in 𝑎𝑛 = 𝑑1 (3𝑛 ) + 𝑑2 𝑛(3𝑛 ) + 𝑛2 (3𝑛 ) and using the
initial conditions gives, we have
𝑑1 = −1 and
3𝑑1 + 3𝑑2 + 3 = 5.
That is 𝑑1 = −1 and 3𝑑1 + 3𝑑2 = 2.
5
Solving these gives 𝑑1 = −1 and 𝑑2 = 3.

Hence,
5
𝑎𝑛 = −(3𝑛 ) + 3 𝑛(3𝑛 ) + 𝑛2 (3𝑛 )

is the solution.
Example 3.11. Find the general solution of the recurrence relation
𝑎𝑛 + 9𝑎𝑛−1 + 20𝑎𝑛−2 = (𝑛2 + 𝑛 − 1 )5𝑛 , for 𝑛 ≥ 2
Solution. We are given a recurrence relation
𝑎𝑛 − 10𝑎𝑛−1 + 25𝑎𝑛−2 = 𝑓(𝑛), where 𝑓(𝑛) = (𝑛2 + 𝑛 − 1 )5𝑛 .
The associated homogeneous recurrence relation to the given recurrence relation is
𝑎𝑛 − 10𝑎𝑛−1 + 25𝑎𝑛−2 = 0
and its characteristic equation is 𝑟 2 − 10𝑟 + 25 = 0.
Thus, 𝑟 2 − 10𝑟 + 25 = 0
⟹ (𝑟 − 5)2 = 0

Mathematics Program: By Werku Debele (MSc.) Page 66


Discrete Mathematics And Combinatorics (Math 393) 2012

So the characteristic equation has double roots and is 𝑟 = 5.


Hence, the general solution to the associated homogeneous recurrence relation is
𝑔
𝑎𝑛 = 𝑑1 (5 )𝑛 + 𝑑2 𝑛(5)𝑛
where 𝑑1 and 𝑑2 are constants.
𝑓(𝑛) = (𝑛2 + 𝑛 − 1 )5𝑛 , and 𝑏 = 5 is the root of the characteristic equation and the
multiplicity of 5 is 2, so we choose the particular solution to the given
nonhomogeneous recurrence relation to be 𝑎𝑛𝑝 = 𝑛2 (𝑞2 𝑛2 + 𝑞1 𝑛 + 𝑞0 )5𝑛 , where
𝑞2 , 𝑞1 and 𝑞0 are constants to be determined by substituting 𝑎𝑛𝑝 in to the given
recurrence relation.
𝑝 𝑝 𝑝
That is 𝑎𝑛 − 10𝑎𝑛−1 + 25𝑎𝑛−2 = (𝑛2 + 𝑛 − 1 )5𝑛 .
But, 𝑎𝑛𝑝 = 𝑛2 (𝑞2 𝑛2 + 𝑞1 𝑛 + 𝑞0 )5𝑛 , 𝑎𝑛−1
𝑝
= (𝑛 − 1)2 (𝑞2 (𝑛 − 1)2 + 𝑞1 (𝑛 − 1) +
𝑝
𝑞0 )5𝑛−1 and 𝑎𝑛−2 = (𝑛 − 2)2 (𝑞2 (𝑛 − 2)2 + 𝑞1 (𝑛 − 2) + 𝑞0 )5𝑛−2.
Thus,
𝑎𝑛𝑝 − 10𝑎𝑛−1
𝑝 𝑝
+ 25𝑎𝑛−2 = (𝑛2 + 𝑛 − 1 )5𝑛
⟹ [𝑛2 (𝑞2 𝑛2 + 𝑞1 𝑛 + 𝑞0 )5𝑛 ] − 10[(𝑛 − 1)2 (𝑞2 (𝑛 − 1)2 + 𝑞1 (𝑛 − 1) + 𝑞0 )5𝑛−1 ] +
25[(𝑛 − 2)2 (𝑞2 (𝑛 − 2)2 + 𝑞1 (𝑛 − 2) + 𝑞0 )5𝑛−2 ] = (𝑛2 + 𝑛 − 1 )5𝑛
The rest of the steps of the solution are left as an exercise.
Example 3.12. Find the general solution of the recurrence relation
𝑎𝑛 − 𝑎𝑛−1 − 10𝑎𝑛−2 + 8𝑎𝑛−3 = 𝑓(𝑛) , for 𝑛 ≥ 3
where a. 𝑓(𝑛) = 6𝑛 b. 𝑓(𝑛) = (−1)𝑛 (4)𝑛
Solution. The associated homogeneous recurrence relation to the given recurrence
relation is 𝑎𝑛 − 𝑎𝑛−1 − 10𝑎𝑛−2 + 8𝑎𝑛−3 = 0 , for 𝑛 ≥ 3
and its characteristic equation is 𝑟 3 − 𝑟 2 − 10𝑟 + 8 = 0.
Thus
𝑟 3 − 𝑟 2 − 10𝑟 + 8 = 0
⟹ (𝑟 − 1)(𝑟 − 2)(𝑟 + 4) = 0
⟺ 𝑟 = 1 , 𝑟 = 2 , 𝑟 = −4
So the characteristic equation three distinct root 𝑟 = 1 , 𝑟 = 2 and 𝑟 = −4.
Hence, the general solution to the associated homogeneous recurrence relation is
𝑔
𝑎𝑛 = 𝑑1 (1 )𝑛 + 𝑑2 (2)𝑛 + 𝑑3 (−4)𝑛
where 𝑑1 , 𝑑2 and 𝑑3 are constants.

Mathematics Program: By Werku Debele (MSc.) Page 67


Discrete Mathematics And Combinatorics (Math 393) 2012

a. 𝑓(𝑛) = 6𝑛, so we choose the particular solution to the given nonhomogeneous


recurrence relation to be 𝑎𝑛𝑝 = 𝑞1 𝑛 + 𝑞0 , where 𝑞1 and 𝑞0 are constants to be
determined by substituting 𝑎𝑛𝑝 in to the given recurrence relation.

Thus,
𝑎𝑛𝑝 − 𝑎𝑛−1
𝑝 𝑝 𝑝
− 10𝑎𝑛−2 + 8𝑎𝑛−3 = 𝑓(𝑛) , where 𝑓(𝑛) = 6𝑛
⟹ [𝑞1 (𝑛 − 1) + 𝑞0 ] − [𝑞1 𝑛 + 𝑞0 ] − 10[𝑞1 (𝑛 − 2) + 𝑞0 ] + 8[𝑞1 (𝑛 − 3) + 𝑞0 ] = 6𝑛
⟹ −2𝑞1 𝑛 − 3𝑞1 − 𝑞0 = 6𝑛
⟺ −2𝑞1 = 6 and −3𝑞1 − 𝑞0 = 0
⟺ 𝑞1 = −3 and 𝑞0 = 9
Thus, 𝑎𝑛𝑝 = −3𝑛 + 9 is the particular solution of the given recurrence relation.
Hence, the general solution is
𝑎𝑛 = 𝑑1 (1𝑛 ) + 𝑑2 (2𝑛 ) + 𝑑3 (−4)𝑛 − 3𝑛 + 9
where 𝑑1 , 𝑑2 and 𝑑3 are constants.
b. 𝑓(𝑛) = (−1)𝑛 (4)𝑛 = (−4)𝑛 , and 𝑏 = −4 is the root of the characteristic equation and
the multiplicity of −4 is 1, so we choose the particular solution to the given
nonhomogeneous recurrence relation to be 𝑎𝑛𝑝 = 𝑞𝑛(−4)𝑛 , where 𝑞 is constant to be
determined by substituting 𝑎𝑛𝑝 in to the given recurrence relation.

Thus,
𝑎𝑛𝑝 − 𝑎𝑛−1
𝑝 𝑝 𝑝
− 10𝑎𝑛−2 + 8𝑎𝑛−3 = 𝑓(𝑛) , where 𝑓(𝑛) = (−4)𝑛 .
The rest of the steps are left as an exercise.
Exercise 3.3.2
1. Find the general solution (all the solutions) of the recurrence relation
a. 𝑎𝑛 = 3𝑎𝑛−1 + 2𝑛 , for 𝑛 ≥ 1
b. 𝑎𝑛 = −4𝑎𝑛−1 − 3𝑎𝑛−2 + 10𝑛2 − 2𝑛 + 3 , for 𝑛 ≥ 2
2. Solve the recurrence relation together with the initial conditions given.
a. 𝑎𝑛 − 2𝑎𝑛−1 = −2𝑛 , for 𝑛 ≥ 1 , 𝑎0 = 3
b. 𝑎𝑛 + 5𝑎𝑛−1 + 6𝑎𝑛−2 = 42(4𝑛 ) , for 𝑛 ≥ 2 , 𝑎0 = 4 , 𝑎1 = 1 .
3. Find the general solution (all the solutions) of the recurrence relation
a. 𝑎𝑛 − 6𝑎𝑛−1 + 12𝑎𝑛−2 − 8𝑎𝑛−3 = 𝑛2 , for 𝑛 ≥ 3

Mathematics Program: By Werku Debele (MSc.) Page 68


Discrete Mathematics And Combinatorics (Math 393) 2012

Summary
A recurrence relation for a sequence {𝑎𝑛 }∞
𝑛=0 is an equation that expresses 𝑎𝑛 in terms

of one or more preceding terms 𝑎0 , 𝑎1 , … , 𝑎𝑛−2 , 𝑎𝑛−1 .


A linear recurrence relation with constant coefficient of degree (order) 𝑘 is a recurrence
relation of the form

𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛) (i)


where 𝑐1 , 𝑐2 , … , 𝑐𝑘 are constants and 𝑐𝑘 ≠ 0. If 𝑓(𝑛) is identically zero (𝑓(𝑛) = 0),
then the recurrence relation (i) is called homogeneous, otherwise it is called
nonhomogeneous.
Consider the linear homogeneous recurrence relation with constant coefficient of
degree k
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0 (ii)
and consider its characteristic equation I I ik ihh hh hbh hh h h n n n n n n n nn
𝑟 𝑘 + 𝑐1 𝑟 𝑘−1 + 𝑐2 𝑟 𝑘−2 + ⋯ + 𝑐𝑘−1 𝑟 + 𝑐𝑘 = 0 . (iii)k
iii. If the characteristic equation (iii) has 𝑘 distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑘 , then the
sequence {𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation (ii) if and only if

𝑎𝑛 = 𝑑1 𝑟1 𝑛 + 𝑑2 𝑟2 𝑛 + ⋯ + 𝑑𝑘 𝑟𝑘 𝑛
where 𝑑1 , 𝑑2 , … , 𝑑𝑘 are constants.
iv. If the characteristic equation (iii) has t distinct roots 𝑟1 , 𝑟2 , … , 𝑟𝑡 with multiplicity
𝑚1 , 𝑚2 , … , 𝑚𝑡 respectively, so that 𝑚𝑖 ≥ 1, for 𝑖 = 1,2, … , 𝑡 and 𝑚1 + 𝑚2 +
⋯ + 𝑚𝑡 = 𝑘, then the sequence {𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation

(ii) if and only if


𝑎𝑛 = (𝛼10 + 𝛼11 𝑛 + ⋯ + 𝛼1(𝑚1 −1) 𝑛𝑚1 −1 )𝑟1 𝑛 + (𝛼20 + 𝛼21 𝑛 + ⋯ +
𝛼2(𝑚2 −1) 𝑛𝑚2 −1 )𝑟2 𝑛 + ⋯ + (𝛼𝑡0 + 𝛼𝑡1 𝑛 + ⋯ + 𝛼𝑡(𝑚𝑡 −1) 𝑛𝑚𝑡 −1 )𝑟𝑡 𝑛
where 𝛼𝑖𝑗 are constants for 0 ≤ 𝑖 ≤ 𝑡 and 0 ≤ 𝑗 ≤ 𝑚𝑖 − 1.
Consider the linear nonhomogeneous recurrence relations with constant coefficients of
degree 𝑘
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛) (iv)
and its associated homogenous recurrence relation
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0 (v)

Mathematics Program: By Werku Debele (MSc.) Page 69


Discrete Mathematics And Combinatorics (Math 393) 2012

The general solution (all solutions) of the linear nonhomogeneous recurrence relation
𝑔 ∞
(iv) is the sequence {𝑎𝑛𝑝 + 𝑎𝑛 }𝑛=0 , where 𝑎𝑛𝑝 is the particular solution of the linear
𝑔
nonhomogeneous recurrence relation (iv) and 𝑎𝑛 is the general solution (all possible
solutions) of the associated homogenous recurrence relation (v).

Self Test Exercise 3


1. Solve the recurrence relations together with the initial conditions given.
a. 𝑎𝑛 + 6𝑎𝑛−1 = 0 , fo𝑟 𝑛 ≥ 1 , 𝑎0 = −4
b. 𝑎𝑛 − 7𝑎𝑛−1 + 12𝑎𝑛−2 = 0 , for 𝑛 ≥ 2 , 𝑎0 = 1 , 𝑎1 = 0 .
5 25
c. 𝑎𝑛 − 2 𝑎𝑛−1 + 16 𝑎𝑛−2 = 0 , for 𝑛 ≥ 2 , 𝑎0 = 2 , 𝑎1 = 1 .

d. 𝑎𝑛 = 7𝑎𝑛−1 − 10𝑎𝑛−2 , for 𝑛 ≥ 2 , 𝑎0 = 2 , 𝑎1 = 1 .


e. 𝑎𝑛 = 2𝑎𝑛−1 − 𝑎𝑛−2 , for 𝑛 ≥ 2 , 𝑎0 = 4 , 𝑎1 = 1 .
f. 𝑎𝑛 + 6𝑎𝑛−1 + 9𝑎𝑛−2 = 0 , for 𝑛 ≥ 2 , 𝑎0 = 3 , 𝑎1 = −3
g. 𝑎𝑛+2 = −4𝑎𝑛−1 + 5𝑎𝑛 , for 𝑛 ≥ 0 , 𝑎0 = 2 , 𝑎1 = 8 .
2. Find the general solution (all solutions) of the recurrence relation
a. 𝑎𝑛 + 6𝑎𝑛−1 = 0 , for 𝑛 ≥ 1 .
1 2
b. 𝑎𝑛 + 3 𝑎𝑛−1 − 9 𝑎𝑛−2 = 0 , for 𝑛 ≥ 2

c. 𝑎𝑛 − 2𝑎𝑛−1 − 𝑎𝑛−2 + 2𝑎𝑛−3 = 0 , for 𝑛 ≥ 3


3. Find the solution to the recurrence relation
𝑎𝑛 = 5𝑎𝑛−2 − 4𝑎𝑛−4 = 0 for 𝑛 ≥ 4
with 𝑎0 = 3 , 𝑎1 = 2 , 𝑎2 = 6 and 𝑎3 = 8.
4. Find the general solution (all the solutions) of the recurrence relation
c. 𝑎𝑛 = 6𝑎𝑛−1 + 2𝑛 , for 𝑛 ≥ 1
d. 𝑎𝑛 = −2𝑎𝑛−1 − 𝑎𝑛−2 + 10𝑛2 − 2𝑛 + 3 , for 𝑛 ≥ 2
e. 𝑎𝑛 − 5𝑎𝑛−1 − 6𝑎𝑛−2 = 5𝑛 + 3𝑛 , for 𝑛 ≥ 2
5. Solve the recurrence relation together with the initial conditions given.
c. 𝑎𝑛 − 4𝑎𝑛−1 = −𝑛2 , for 𝑛 ≥ 1 , 𝑎0 = 1
d. 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 42(4𝑛 ) , for 𝑛 ≥ 2 , 𝑎0 = 4 , 𝑎1 = 1 .
e. 𝑎𝑛 + 6𝑎𝑛−1 + 9𝑎𝑛−2 = 𝑛2𝑛 , for 𝑛 ≥ 2 , 𝑎0 = 3 , 𝑎1 = −3 .
f. 𝑎𝑛 − 2𝑎𝑛−1 + 𝑎𝑛−2 = (𝑛2 + 3)(5𝑛 ) , for 𝑛 ≥ 2 , 𝑎0 = 3 , 𝑎1 = −3 .

Mathematics Program: By Werku Debele (MSc.) Page 70


Discrete Mathematics And Combinatorics (Math 393) 2012

6. Find the general solution (all the solutions) of the recurrence relation
a. 𝑎𝑛 − 6𝑎𝑛−1 + 12𝑎𝑛−2 − 8𝑎𝑛−3 = 𝑛2 , for 𝑛 ≥ 3
b. 𝑎𝑛 − 6𝑎𝑛−1 + 12𝑎𝑛−2 − 8𝑎𝑛−3 = 𝑛2 2𝑛 , for 𝑛 ≥ 3
7. Solve the recurrence relation
𝑎𝑛 = 8𝑎𝑛−2 − 16𝑎𝑛−4 + 2 , for 𝑛 ≥ 3
with initial condition 𝑎0 = 1 , 𝑎1 = 2 , 𝑎2 = 3 and 𝑎3 = 0.

Reference:
1. A. W.F.Edwards,Pascal’s Arithmeticical Triangle. The Johns Hopkins University
Press, Baltimore,MD, 2002.
2. C.Oliver, “ The Twelve Days of Christmas,” Mathematics Teacher, Vol. 70
3. Hewel Hus, Schaum’s outline, probability Random Variable.
4. J.M.Harris.Jeffry L.Hirst.Michael J.Mossinghoff, Combinatorics and Graph Theory,
2nd edition
5. J.Varnadore, “ Pascal’s Triangle and Fibonacci Numbers,” Mathematics Teacher,
Vol,81.
6. Kenneth H.Rosen, Discrete Mathematics and its application, 3rd edition.
7. M.Eng and J.Casey, “Pascal’s Arithmetical Triangle-ASerendipitious Source for
programming Activities,’’ Mathematics Teacher, Vol 76
mathematics
8. Mott, Knadel and Baker, Discreate Mathematics
9. P.Z.Chinn, “ inductive patterns, finite Difference, and a Missing Region,’’
Mathematics Teacher, Vol.81(Sept.1988)
10. R.P.GRIMALDI and B.V.RAMANA pearson,Discreate combinatorial
11. Rosen , Discrete Mathematics
12. Seymour Lipschutz,Schaum’s outline, Discrete Mathematics, 3rd edition
13. Berman G.Fryer K.D, introduction to combinatorics
14. Andweson I, A first course in Discrete Mathematics
15. D.P.Acharjya Sreekumar, Fundamental Approach to Discrete Mathematics.

Mathematics Program: By Werku Debele (MSc.) Page 71


Discrete Mathematics And Combinatorics (Math 393) 2012

PART-II GRAPH THEORY

CHAPTER 4

ELEMENTS OF GRAPH THEORY

Objectives: After studying this chapter, you should be able to:


 Introduce some basic definitions and concepts of graph theory
 Present useful result on the degree sequence of a graph.
 Know the terms graph, labelled graph, unlabelled graph, vertex, edge, adjacent,
incident, multiple edges, loop, simple graph and subgraph;
 Appreciate the idea of graph theory;
 Determine whether two given graphs are isomorphic;
 Know the terms degree, degree sequence and regular graph;
 State and use the handshaking lemma;
 Realize the terms walk, trail, path, closed walk, closed trail, cycle, connected
graph, disconnected graph and component;
 Understand what are meant by complete graphs, null graphs, cycle graphs, the
Platonic graphs, cubes and the Petersen graph;
 Distinguish between physical and conceptual tree structures.
 Understand what are meant by bipartite graphs, complete bipartite graphs, trees,
path graphs and cubes;
 Apply the concept of graph theory to the real world.

Introduction

You learn even in high school about graphs of functions. The graph of a function is
usually a curve drawn in the 𝒙𝒚 − plane. See Fig. (𝒂). But the word “graph” has other
meanings. Infinite or discrete mathematics, a graph is a collection of points and edges
or arcs in the plane. Fig. (𝒃) illustrates a graph as we are now discussing the concept.

Mathematics Program: By Werku Debele (MSc.) Page 72


Discrete Mathematics And Combinatorics (Math 393) 2012

Leonhard Euler (1707–1783) is considered to have been the father of graph theory. His
paper in 1736 on the seven bridges of Königsberg is considered to have been the
foundational paper in the subject. It is worthwhile now to review that topic.

Königsberg is a town, founded in 1256, that was originally in Prussia. Aftera stormy
history, the town became part of the Soviet Union and was renamed Kaliningrad in
1946. In any event, during Euler’s time the town had seven bridges (named Krämer,
Schmiede, Holz, Hohe, Honig, Köttel, and Grünespanning) spanning the Pregel River.
Fig. (𝒄) gives a simplified picture of how the bridges were originally configured (two
of the bridges were later destroyed during World War II, and two others demolished by
the Russians). The question that fascinated people in the eighteenth century was
whether it was possible to walk a route that never repeats any part of the path and that
crosses each bridge exactly once.

Euler in effect invented graph theory and used his ideas to show that it is impossible to
devise such a route. We shall, in the subsequent sections, devise a broader version of
Euler’s ideas and explain his solution of the Königsberg bridge problem.

(𝒂)A graph of a function in the plane. (𝒃) A graph as a combinatorial object.

(𝒄) The seven bridges at Königsberg.

Mathematics Program: By Werku Debele (MSc.) Page 73


Discrete Mathematics And Combinatorics (Math 393) 2012

4.1. Basic Terminologies

Objectives: After studying this chapter, you should be able to:


 Introduce some basic definitions and concepts of graph theory
 Present useful result on the degree sequence of a graph.
 Explain the terms degree, degree sequence and regular graph;
 Explain the terms graph, labelled graph, unlabelled graph, vertex, edge,
adjacent, incident, multiple edges, loop, simple graph and subgraph.
 State and use the handshaking lemma;

Definition 4.1: A graph G consists of a finite non-empty set V(G) of elements called
vertices together with a finite set E(G) of unordered pairs of (not necessarily distinct)
vertices called edges.

Example 4.1: The following are examples of graphs with vertices 𝑉(𝐺) and edges
𝐸(𝐺).
v1 v4 v5
(i) V(G) = {v1 , v 2 , v3 , v 4 , v5 }
E(G) = {v1v 2 , v1v3 , v 2 v3 , v 2 v 4 , v3 v 4 , v3 v5 }
v2 v3

(ii) V(G) = {v1 , v 2 , v3 , v 4 , v5 } v1 v4


E(G) = {v1v 2 , v 2 v 2 , v 2 v3 , v 2 v 4 , v3 v 4 ( twice) , v 4 v5 }
v5
v2 v3

v1 v4 v6
(iii) V(G) = {v1 , v 2 , v3 , v 4 , v5 , v6 , v7 }
E(G) = {v1v 2 , v 2 v3 , v 2 v 4 , v3 v 4 , v5 v6 }  v7
v7 is an isolated vertex.
v2 v3 v5

Definition 4.2: In a graph, two or more edges joining the same pair of vertices are
multiple edges. An edge joining a vertex to itself is a loop. A graph with no multiple
edges or loops is a simple graph.

Mathematics Program: By Werku Debele (MSc.) Page 74


Discrete Mathematics And Combinatorics (Math 393) 2012

Thus, the graphs in example4.1 (i) and (iii) are simple, that in (ii) is not, it is a non-
simple graph.

Graphs (such as those in examples (i) and (ii) ) which ‘come in one piece’ are said to be
connected. The graph in (iii) is not connected: it is the union of three connected
subgraphs, called the components of the graph.

Definition 4.3: Two vertices u and v of a graph G are adjacent if there is an edge uv
joining them and we then say that u and v are incident with the edge (or that the edge is
incident with u and v). Similarly, two edges are adjacent if they have a vertex in
common.

Example 4.2: v1 and v2 are adjacent in the following graph, each being incident with
edge e1. We call v1 and v2 the end-vertices of e1. Also edges e1 and e2 are adjacent.

v1 v4

e1 e2 e4

v2 e3 v3

The degree (size) of a vertex v, denoted by deg(v), is the number of edges incident with
v. Thus, in the graph above,
deg(v1) = 2 , deg (v2) = 2 , deg (v3) = 3 , deg (v4) = 1 .

In example 4.1 (ii), deg (v2) = 5 (count the loop twice), deg (v3) = 3.
In example4.1 (iii), deg (v7) = 0. (An isolated vertex has degree 0.)
The order of a graph G is the number of vertices, |𝑉|, where V is the set of vertices.
If there is more than one edge between the same pair of vertices, then the edges are
termed as parallel edges. Consider the graph G as

Mathematics Program: By Werku Debele (MSc.) Page 75


Discrete Mathematics And Combinatorics (Math 393) 2012

Here the edges 𝑒1 and 𝑒5 are parallel edges.

A vertex of degree 1 is called a leaf.

By the degree sequence of a graph, we mean the vertex degrees written in ascending
order with repeats where necessary. Thus the degree sequence in example 4.1 (i) is
1,2,2,3,4, that in (iii) is 0,1,1,1,2,2,3.

Theorem 4.1: Handshaking Lemma (Degree Sum Theorem): For a graph with vertex
set {v1 , v2 ,, vn } and m edges,
n

 deg(v
k 1
k )  2m .

Proof. Each edge contributes 2 to the sum of vertex degrees.

Note: As a consequence, in any graph the number of vertices of odd degree must be
even. And if a sequence d1 , d 2 , , d n with d1  d 2    d n is the degree sequence of
n
a graph, then d
j 1
j must be even. Also, for a simple graph, d n  n  1 . However, these

two conditions are not sufficient for d1 , d 2 , , d n to be the degree sequence of a simple
graph. For example, the sequence 1, 1, 3, 3 is not graphic.

Useful result (Havel-Hakimi)

The sequence d1 , d 2 ,, d n 1 , j ,


where d1  d 2    d n 1  j  n  1 ,
is the degree sequence of a simple graph if and only if
d1 , d 2 ,, d n j 1 , d n j  1, d n j 1  1, , d n1  1
is (when rearranged in ascending order if necessary) the degree sequence of a simple
graph.

Example 4.3: From the sequence 2, 2, 3, 3, 4, 4 we derive 1, 2, 2, 2, 3 and 1, 1, 1, 1.

The last sequence is the degree sequence of

Mathematics Program: By Werku Debele (MSc.) Page 76


Discrete Mathematics And Combinatorics (Math 393) 2012

Working backwards, we obtain a graph for the original sequence: (non-isomorphic


answers are possible).

Subgraphs
In mathematics we often study complicated objects by looking at simpler objects of the
same type contained in them - subsets of sets, subgroups of groups, and so on. In graph
theory we make the following definition.

Definition 4.4: A subgraph of a graph G is a graph all of whose vertices are vertices of
G and all of whose edges are edges of G.

Remark 4.2: Note that G is a sub graph of itself.

Example 4.4: The following graphs are all subgraphs of the graph G on the left, with
vertices {𝑢, 𝑣, 𝑤, 𝑥} and edges {1, 2, 3, 4, 5}.

The idea of a subgraph can be extended to unlabelled graphs.

Example 4.5: The following graphs are all subgraphs of the unlabelled graph H on the
left; the configuration in graph (c) occurs at each corner of H.

Mathematics Program: By Werku Debele (MSc.) Page 77


Discrete Mathematics And Combinatorics (Math 393) 2012

Union of graphs

If 𝐺1 and 𝐺2 be two graphs, then their union 𝐺1 ∪ 𝐺2 is the graph with


𝑉(𝐺1 ∪ 𝐺2 ) = 𝑉(𝐺1 ) ∪ 𝑉(𝐺2 ) and 𝐸(𝐺1 ∪ 𝐺2 ) = 𝐸(𝐺1 ) ∪ 𝐸(𝐺2 ).

Intersection of graphs

If 𝐺1 and 𝐺2 be two graphs with at least one vertex in common, then their intersection
𝐺1 ∩ 𝐺2 is the graph with
𝑉(𝐺1 ∩ 𝐺2 ) = 𝑉(𝐺1 ) ∩ 𝑉(𝐺2 ) and 𝐸(𝐺1 ∩ 𝐺2 ) = 𝐸(𝐺1 ) ∩ 𝐸(𝐺2 ).

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you
can’t in the box against the following questions.
1. Can you define simple graph? .........................................................
2. Can you identify the difference between adjacent and incident? ..
3. Can a given graph is simple? ...........................................................
Exercise 4.1
1. Write down the vertices and edges of each of the following graphs. are these graphs
simple graphs?

2. Draw the graphs whose vertices and edges are as follows. Are these graphs simple
graphs?
a. vertices: {𝑢, 𝑣, 𝑤, 𝑥} edges: {𝑢𝑣, 𝑣𝑤, 𝑣𝑥, 𝑤𝑥}
b. vertices: {1, 2, 3, 4, 5,6, 7, 8} edges: {12, 22, 23, 34, 35, 67, 68, 78}
3. Draw, if possible, simple graphs with the following degree sequences:
(i) 2,3,3,4,5,5 (ii) 3,3,5,5,5,5 (iii) 2,2,3,3,4,5,5.

Mathematics Program: By Werku Debele (MSc.) Page 78


Discrete Mathematics And Combinatorics (Math 393) 2012

4. Which of the following statements hold for the graph on the right?
a. vertices 𝑣 and ware adjacent;
b. vertices 𝑣 and 𝑥 are adjacent;
c. vertex 𝑢 is incident with edge 2;
d. edge 5 is incident with vertex 𝑥.

5. Which of the following graphs are subgraphs of the graph G below?

6. Which of the following graphs are subgraphs of the graph H below?

7. Write down the degree sequence of each of the following graphs:

8. For each of the graphs in Problem 6, write down:the number of edges; the sum of the

degrees of all the vertices. What is the connection between your answers? Can you

explain why this connection arises?

9. (a) Use the handshaking lemma to prove that, in any graph, the number of
vertices of odd degree is even.
(b) Verify that the result of part (𝑎) holds for each of the graphs in Pro. 6.

Mathematics Program: By Werku Debele (MSc.) Page 79


Discrete Mathematics And Combinatorics (Math 393) 2012

4.2 Isomorphism

Objectives: After studying this topic, you should be able to:

 Introduce some basic concepts of isomorphism


 Determine whether two given graphs are isomorphic

It follows from the definition that a graph is completely determined when we know its
vertices and edges, and that two graphs are the same if they have the same vertices and
edges. Once we know the vertices and edges, we can draw the graph and, in principle,
any picture we draw is as good as any other; the actual way in which the vertices and
edges are drawn is irrelevant - although some pictures are easier to use than others!

For example, recall the utilities graph, in which three houses A, Band Care joined to the
three utilities gas (g), water (w) and electricity (e). This graph is specified completely
by the following sets:

vertices: {A, B, C, g, w, e}

edges: {Ag, Aw, Ae, Bg, Bw, Be, Cg, Cw, Ce},

and can be drawn in many ways, such as the following:

Each of these diagrams has six vertices and nine edges, and conveys the same
information - each house is joined to each utility, but no two houses are joined, and no
two utilities are joined. It follows that these two dissimilar diagrams represent the same
graph.

On the other hand, two diagrams may look similar, but represent different graphs. For
exan1ple, the diagrams below look similar, but they are not the same graph: for
example, AB is an edge of the second graph, but not the first.

Mathematics Program: By Werku Debele (MSc.) Page 80


Discrete Mathematics And Combinatorics (Math 393) 2012

We express this similarity by saying that the graphs represented by these two diagrams
are isomorphic. This means that the two graphs have essentially the same structure: we
can relabel the vertices in the first graph to get the second graph - in this case, we
simply interchange the labels wand B.

This leads to the following definition.

Definition 4.5: Two graphs G1 and G2 are isomorphic if there is a one-one


correspondence between their vertex sets V(G1) and V(G2) such that for every pair of
distinct vertices in G1 the number of edges joining them is equal to the number of
edges joining their corresponding vertices in G2. Such a one-one correspondence is an
isomorphism.

Example 4.6: The following two graphs are isomorphic with the following one-one
correspondence: v1  u1 , v2  u 4 , v3  u 2 , v 4  u 3 .
v3 u1

v1 v4 u4

v2 u2 u3
Likewise the following graphs are isomorphic:

v1 v2 v3 u4 u5

u2
u3

v4 v5 v6 u1 u6

Sometimes it is unnecessary to have labels on the graphs. In such cases, we omit the
labels and refer to the resulting object as an unlabelled graph.

Mathematics Program: By Werku Debele (MSc.) Page 81


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 4.7: The unlabelled graphcorresponds to either of the following isomorphic


graphs:

Indeed, it also corresponds to either of the following graphs, which are isomorphic to
the above two:

We say that two unlabelled graphs such as

are isomorphic if labels can be attached to their vertices so that they become the same
graph.

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define isomorphic graphs?...................................................
2. Can you determine whether two graphs are isomorphic or not?..........

Mathematics Program: By Werku Debele (MSc.) Page 82


Discrete Mathematics And Combinatorics (Math 393) 2012

Exercise 4.2

1. By suitably relabelling the vertices, show that the following pairs of graphs are
isomorphic:

2. Are the following two graphs isomorphic? If so, find a suitable one-one
correspondence between the vertices of the first and those of the second; if not, explain
why no such one-one correspondence exists.

3. By suitably labelling the vertices, show that the following unlabelled graphs are
isomorphic:

Mathematics Program: By Werku Debele (MSc.) Page 83


Discrete Mathematics And Combinatorics (Math 393) 2012

4.3 Path and Connectivity

Objectives: After studying this topic, you should be able to:

 Explain the terms walk, trail, path, closed walk, closed trail, cycle, connected
graph, disconnected graph and component;
 Explain the terms edge connectivity, vertex connectivity, cutset and vertex
cutset;
 Introduce concepts relating to how a connected graph can be disconnected.
 Apply the concept of path and connectivity to the real world.

Many applications of graphs involve getting from one vertex to another. For example,
you may wish to find the shortest route between one town and another. Other examples
include the routeing of a telephone call between one subscriber and another, the flow of
current between two terminals of an electrical network, and the tracing of a maze. We
now make this idea precise by defining a walk in a graph.

Definition 4.6: A walk of length 𝑘 in a graph is a succession of 𝑘 edges of the form

𝑢𝑣, 𝑣𝑤, 𝑤𝑥, … , 𝑦𝑧.

This walk is denoted by 𝑢𝑣𝑤𝑥. . . 𝑦𝑧, and is referred to as a walk between 𝑢 and 𝑧.

We can think of such a walk as going from 𝑢 to 𝑣, then from 𝑣 to 𝑤, then from 𝑤 to 𝑥,
and so on, until we arrive eventually at the vertex 𝑧. Since the edges are undirected, we
can also think of it as a walk from 𝑧 to 𝑦 and on, eventually, to 𝑥, 𝑤, 𝑣 and 𝑢. So we
can equally well denote this walk by 𝑧𝑦. . . 𝑥𝑤𝑣𝑢, and refer to it as a walk between 𝑧
and 𝑢.

Mathematics Program: By Werku Debele (MSc.) Page 84


Discrete Mathematics And Combinatorics (Math 393) 2012

Note that we do not require all the edges or vertices in a walk to be different.

Example 4.8: In the following graph, 𝑢𝑣𝑤𝑥𝑦𝑤𝑣𝑧𝑧𝑦 is a walk of length 9 between the
vertices 𝑢 and 𝑦, which includes the edge 𝑣𝑤 twice and the vertices 𝑣, 𝑤, 𝑦 and 𝑧 twice.

It is sometimes useful to be able to refer to a walk under more restrictive conditions in


which we require all the edges, or all the vertices, to be different.

Definition 4.7: A trail is a walk in which no edge has been traversed more than once
(in either direction) but repeated vertices are allowed. It is closed if the last vertex is the
same as the first, and open otherwise. A path is a walk in which all the edges and all
the vertices are different.

Example 4.9: In the following graph above, the walk 𝑣𝑧𝑧𝑦𝑤𝑥𝑦 is a trail which is not a
path, since the vertices 𝑦 and 𝑧 both occur twice, whereas the walk 𝑣𝑤𝑥𝑦𝑧 has no
repeated vertices, and is therefore a path.

Example 4.10: In the graph below,


- acbdce is an open trail
- acbdcea is a closed trail
- acbdcbe is not a trail, since edge cb has been traversed twice, it is a walk.
a

e b

d c

Mathematics Program: By Werku Debele (MSc.) Page 85


Discrete Mathematics And Combinatorics (Math 393) 2012

We can use the concept of a path to define a connected graph. Intuitively, a graph is
connected if it is 'in one piece';

Example 4.11: The following graph is not connected, but can be split into four
connected subgraphs.

The observation that there is a path between x and y (which lie in the same subgraph),
but not between II and y (which lie in different subgraphs), leads to the following
definitions.

Definition 4.8: A graph is connected if there is a path between each pair of vertices,
and is disconnected otherwise. An edge in a connected graph is a bridge if its removal
leaves a disconnected graph. Every disconnected graph can be split up into a number of
connected subgraphs, called components.

Example 4.12: In the graph in exercise 4.3 (2), the edge 𝑡𝑧 is a bridge; and the
following disconnected graph has three components:

It is also useful to have a special term for those walks or trails that start and finish at the
same vertex. We say that they are closed.

Definition 4.9: A closed walk in a graph is a succession of edges of the form


𝑢𝑣, 𝑣𝑤, 𝑤𝑥, . . . , 𝑦𝑧, 𝑧𝑢, that starts and ends at the same vertex. A closed trail is a closed
walk in which all the edges are different. A cycle is a closed walk in which all the edges
are different and all the intermediate vertices are different. A walk or trail is open if it
starts and finishes at different vertices.

Mathematics Program: By Werku Debele (MSc.) Page 86


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 4.13: Consider the following graph:

The closed walk 𝑣𝑦𝑤𝑥𝑦𝑧𝑣 is a closed trail which is not a cycle, whereas the closed
trails 𝑧𝑧, 𝑣𝑤𝑥𝑦𝑣 and 𝑣𝑤𝑥𝑦𝑧𝑣 are all cycles. A cycle of length 3, such as 𝑣𝑤𝑦𝑣 or
𝑤𝑥𝑦𝑤, is called a mangle. In describing closed walks, we can allow any vertex to be
the starting vertex. For example, the triangle 𝑣𝑤𝑦𝑣 can equally well be written as
𝑤𝑦𝑣𝑤 or 𝑦𝑣𝑤𝑦 or (since the direction is immaterial) by 𝑣𝑦𝑤𝑣, 𝑤𝑣𝑦𝑤 or 𝑦𝑤𝑣𝑦.

Disconnecting Sets (this involves edges)

Recall that a graph is connected if there is a path joining each pair of vertices. Let G be
a connected graph. By a disconnecting set we mean a set of edges whose deletion
results in a disconnected graph. A cutset is a disconnecting set, no proper subset of
which is a disconnecting set.

Example 4.14: In graph G1, e2 , e3 , e4  and e1 ,e2  are disconnecting sets but e3 , e5 
is not.
e2 e7

G1 e1 e3 e5 e6

e4

If a disconnecting set has only one edge e (as in G2 below), then e is called a bridge (or
cut-edge).
e
G2

Mathematics Program: By Werku Debele (MSc.) Page 87


Discrete Mathematics And Combinatorics (Math 393) 2012

The edge connectivity of G is the size of the smallest disconnecting set of G, in other
words, it is the smallest number of edges whose deletion disconnects G. It is denoted by
 G  .
In the graph G1 above since e1 ,e2  is a disconnecting set of size 2, then  G1   2.

Result
Let  G  denote the minimum degree of G. Then  G    (G) .

Separating Sets (this involves vertices)

A separating set is a set of vertices whose removal disconnects G. When removing


vertices, we must also remove any incident edges.

Example 4.15: In graph G3, u, v is a separating set, but u is not.
u

G3

If a separating set contains only one vertex w, then w is called a cut-vertex. The vertex
connectivity of a connected graph G is the size of the smallest separating set. In other
words, it is the smallest number of vertices whose removal disconnects G. It is denoted
by  G  .

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you
can’t in the box against the following questions.
1. Can you define walk? ..........................................................................
2. Do you know the difference between trail and path?...........................
3. Do you know the difference between closed trail and cycle?...............
4. Can a simple graph is connected graph? ...............................................

Mathematics Program: By Werku Debele (MSc.) Page 88


Discrete Mathematics And Combinatorics (Math 393) 2012

Exercise 4.3

1. Write down all the paths between 𝑠 and 𝑦 in the following graph:

2. Draw:
a. a connected graph with eight vertices;
b. a disconnected graph with eight vertices and two components;
c. a disconnected graph with eight vertices and three components.
3. For the graph on the right, write down:
a. a closed walk that is not a closed trail;
b. a closed trail that is not a cycle;
c. all the cycles of lengths 1,2,3 and 4.
4. Find the vertex connectivity and the edge connectivity for each of the following
graphs, giving reasons for your answers.

(i) (ii)

(iii) (iv)

Mathematics Program: By Werku Debele (MSc.) Page 89


Discrete Mathematics And Combinatorics (Math 393) 2012

4.4. Complete, regular and bipartite graphs

Objectives: After studying this topic, you should be able to:


 Explain what are meant by complete graphs, null graphs, cycle graphs, the
Platonic graphs, cubes and the Petersen graph;
 Explain what are meant by bipartite graphs, complete bipartite graphs and path
graphs .

Null graphs

These are graphs with no edges and are denoted by Nn.

Example 4.16: the null graph on 4 vertices

 

 
N4

Complete graphs

Definition 4.10: The complete graph on n vertices, denoted by Kn, is the simple graph
in which every pair of vertices is joined by an edge.

Example 4.17: The following graphs are complete graphs

K3 K4

K5 K6

Regular graphs

These are graphs in which every vertex has the same degree. For example, Kn is regular
of degree n-1. Regular graphs of degree 3 are called cubic graphs. The number of edges

Mathematics Program: By Werku Debele (MSc.) Page 90


Discrete Mathematics And Combinatorics (Math 393) 2012

of a regular graph with n vertices is given by n(n - 1)/2. The following regular graph,
called the Petersen graph is an interesting example.

Bipartite graphs

Definition 4.11: A graph G is bipartite if every vertex can be labelled with either a or
b, so that every edge is an ab edge. In these graphs, the vertex set is the union of two
non-empty disjoint sets A and B with each edge of the graph joining a vertex in A to a
vertex in B.

a b A a a a
b b a 

a b B b b b b

Complete bipartite graphs

Kr,s denotes the simple bipartite graph in which the sets A and B (as above) contain r
and s vertices and every vertex in A is adjacent to every vertex in B.

K3,4 or

The Platonic graphs

These are formed from the vertices and edges of the 5 regular (Platonic) solids:

Mathematics Program: By Werku Debele (MSc.) Page 91


Discrete Mathematics And Combinatorics (Math 393) 2012

Tetrahedron Octahedron Cube Icosahedron Dodecahedron

The complement of a simple graph

Definition 4.12: The complement of a simple graph G is the simple graph with the
same vertex set as G with two vertices adjacent if and only if they are not adjacent in G.
It is denoted by G .

Example 4.18: if G is then is G


Theorem 4.3: In a connected graph G, we have  G    (G)   (G) , for G  K n .

Example 4.19:   2,   1.

K 4 :   3,  does not exist for K n . K 3,3 :   3,   3 .

Mathematics Program: By Werku Debele (MSc.) Page 92


Discrete Mathematics And Combinatorics (Math 393) 2012

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define complete graph? ........................................................
2. Can you define regular and bipartite graph? .......................................
3. Can you explain the relation between a simple graph and its complement?..
4. Can you define platonic graph? ...............................................................

Exercises 4.4

1. Give (if it exists) an example of each of the following:


i. A Platonic graph that is a complete graph.
ii. A bipartite Platonic graph.
iii. A bipartite graph that is regular of degree 4.
iv. A cubic graph with 7 vertices.
2. Determine the number of edges of the following graphs:
(i) K 8 (ii) K 5,7 (iii) the Peterson graph.

3. Draw the complements of the following graphs:


(i) (ii)

4. Which of the following graphs are bipartite?


(i) Petersen
(ii) C 6 (6 – cycle): (iii) C 7 (7 – cycle):

(iv) (v)

5. In the Petersen graph find cutsets with 3, 4 and 5 edges.

Mathematics Program: By Werku Debele (MSc.) Page 93


Discrete Mathematics And Combinatorics (Math 393) 2012

4.5. Eulerian and Hamiltonian Graphs

Objectives: After studying this topic, you should be able to:

 Define Eulerian and Hamiltonian graphs;


 Discuss Semi-Eulerian graphs;
 introduce the idea of a Semi-Hamiltonian graph;
 Present some simple criteria for determining whether a graph is Hamiltonian.

Eulerian and Semi-Eulerian Graphs

Definition 4.13: A connected graph G is Eulerian if there is a closed trail containing


every edge of G. We call such a trail an Eulerian trail.

Example 4.20: the following graphs are Eulerian

(i) (ii)

Theorem 4.4: (Euler 1736). A connected graph is Eulerian if and only if every vertex
has even degree.

To find an Eulerian trail in a given graph, start in an arbitrary vertex and traverse along
the edges, ensuring all the edges are traversed before returning to the starting vertex.

If G is not Eulerian, but there is an open trail containing every edge of G, then G is
semi-Eulerian.

Example 4.21:

Theorem 4.5: A connected graph is semi-Eulerian if and only if precisely two of its
vertices have odd degree.

To obtain a semi-Eulerian trail in a given graph, you must start at one of the odd degree
vertices and end in the other odd degree vertex.

Mathematics Program: By Werku Debele (MSc.) Page 94


Discrete Mathematics And Combinatorics (Math 393) 2012

The following is an example of a graph that is neither Eulerian nor semi-Eulerian.

Hamiltonian and semi-Hamiltonian Graphs

Definition 4.14: A graph G is Hamiltonian if there is a cycle that passes through every
vertex of G. Such a cycle is a Hamiltonian cycle.

If G is not Hamiltonian, but there is an open path which includes every vertex of G,
then G is semi- Hamiltonian, and such a path is a Hamiltonian path.

Example 4.22:

Hamiltonian semi- Hamiltonian neither Hamiltonian


nor semi- Hamiltonian

Theorem 4.6: (Ore 1960): Let G be a simple graph with n  3 vertices. If


deg(u )  deg(v)  n for each pair of non-adjacent vertices u and v, then G is
Hamiltonian.

Corollary 4.7: (Dirac 1952). Let G be a simple graph with n  3 vertices. If


deg(v)  n / 2 for every vertex v, then G is Hamiltonian.

Note that this is a necessary condition, but not sufficient.

Example 4.23: The Petersen graph is non-Hamiltonian but K n , (n  3) graphs are


Hamiltonian.

Bipartite graphs can only be Hamiltonian if sets A and B of vertices (as previously
defined) have the same number of vertices. It follows that if the total number of
vertices in a bipartite graph is odd then it cannot be Hamiltonian. There is no known
general criterion for testing whether a graph is semi-Hamiltonian.

Mathematics Program: By Werku Debele (MSc.) Page 95


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 4.24: Consider the following four graphs:

graph (a) is both Eulerian and Hamiltonian, as we saw above;


graph (b) is Eulerian - an Eulerian trail is 𝑏𝑐𝑔𝑓𝑒𝑔𝑏; it is not Hamiltonian;
graph (c) is Hamiltonian -a Hamiltonian cycle is 𝑏𝑐𝑔𝑒𝑓𝑏; it is not Eulerian;
graph (d) is neither Eulerian nor Hamiltonian.

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.

1. Can you define Eulerian graphs? ...............................................................


2. Can you define Hamiltonian graph? .........................................................
3. Can you explain the relation between a Eulerian and Hamiltonian graph? ......
4. Can you define semi-Eulerian and semi-Hamiltonian graph? ........................

Exercises 4.5
1. Determine whether the following graphs are Eulerian, semi-Eulerian or neither. For those
that are Eulerian or semi-Eulerian, find a suitable trail.
(i) ii) v1 v2 v3
v1 v5 v6 v2

v7
v8

v3 v7 v9 v8 v4 v4 v5 v6

Mathematics Program: By Werku Debele (MSc.) Page 96


Discrete Mathematics And Combinatorics (Math 393) 2012

(iii) (iv) (v)


v1 v6 v2 v1 v6 v2 v1 v6 v2

v9 v9 v9 v7
v5 v7 v5 v7 v5

v4 v8 v3 v4 v8 v3 v4 v8 v3

2. In the Petersen graph,


a. Find walks of lengths 5, 6 and 8.
b. Find cycles of lengths 5, 6, 8 and 9.
c. Can you find a cycle of length 10?
d. What is the size of the smallest cycle?
3. Bridges of Konigsberg. Euler lived in the town of Konigsberg that had rivers passing
through it (as shown below) and with bridges connecting four parts of the town. He
considered the following problem: Is it possible to cross each of the seven bridges exactly
once and return to your starting point? Hint: Let the four parts A, B, C and D be vertices of
a suitable non-simple graph.
C

A D

4. Determine whether the following graphs are Hamiltonian, semi- Hamiltonian or neither.
Find a Hamiltonian cycle or path if one exists.

(i) (ii)

(iii) (iv)

Mathematics Program: By Werku Debele (MSc.) Page 97


Discrete Mathematics And Combinatorics (Math 393) 2012

(v) (vi)

5. Decide which of the following graphs are Eulerian and/or Hamiltonian, and write down an
Eulerian trail or Hamiltonian cycle where possible.

6. Determine which of the following graphs are Eulerian:


a. the complete graph K8;
b. the complete bipartite graph K8,8;
c. the cycle graph C8;
d. the dodecahedron graph;
e. the cube graph Q8.

Mathematics Program: By Werku Debele (MSc.) Page 98


Discrete Mathematics And Combinatorics (Math 393) 2012

4.6. Tree Graphs

Objectives: After working through this topic, you should be able to:

 state several properties of a tree, and give several equivalent definitions of a


tree;
 distinguish between physical and conceptual tree structures, and give examples
of each type;
 appreciate the uss of rooted trees in different areas;
 construct the bipartite graph representation of a given braced rectangular
frame- work and use it to determine whether the system is rigid; if so,
determine whether the system is minimally braced. define tree.
In this topic we focus our attention on one particularly important and useful type of
graph - a tree. Although trees are relatively simple structures, they form the basis of
many of the practical techniques used to model and to design large-scale systems.

The concept of a tree is one of the most important and commonly used ideas in graph
theory, especially in the applications of the subject. It arose in connection with the
work of Gustav Kirchhoff on electrical networks in the 1840s, and later with Arthur
Cayley's work on the enumeration of molecules in the 1870s. More recently, trees have
proved to be of value in such areas as computer science, decision making, linguistics,
and the design of gas pipeline systems.

Trees are often used to model situations involving various physical or conceptual tree-
like structures. These structures are also commonly referred to as 'trees'. In the
following examples, we classify such 'trees' in terms of the type of application in which
they occur.

Mathematics Program: By Werku Debele (MSc.) Page 99


Discrete Mathematics And Combinatorics (Math 393) 2012

Many trees have a physical structure which may be either natural or artificial and either
static or time-dependent. Two examples of natural trees are the biological variety with
trunk, branches and leaves, and the drainage system of tributaries forming a river basin.
Less obvious examples of tree structures are provided by the chemical structure of
certain organic molecules.

One of the most important classes of bipartite graphs is the class of trees. If G is a tree
then G is bipartite, i.e. all of its vertices can be labelled with either a or b so that every
edge is an ab edge (no aa or bb edges).

Definition 4.15: A tree is a connected graph without cycles.

Examples 4.25:

Starting with the tree with just one vertex, we can build up any tree we wish by
successively adding a new edge and a new vertex. At each stage, the number of vertices
exceeds the number of edges by 1, so every tree with n vertices has exactly n - 1 edges.
At no stage is a cycle created, since each added edge joins an old vertex to a new
vertex.

Mathematics Program: By Werku Debele (MSc.) Page 100


Discrete Mathematics And Combinatorics (Math 393) 2012

At each stage, the tree remains connected, so any two vertices must be connected by at
least one path. However, they cannot be connected by more than one path, since any
two such paths would contain a cycle (and possibly other edges as well).

We therefore deduce that any two vertices in a tree are connected by exactly one path.

In particular, any two adjacent vertices are connected by exactly one path - the edge
joining them. If this edge is removed, then there is no path between the two vertices.

It follows that the removal of any edge of a tree disconnects the tree. Moreover, any
two vertices v and w are connected by a path, and the addition of the edge vw produces
a cycle - the cycle consisting of the path and the added edge vw.

So joining any two vertices of a tree by an edge creates a cycle.

Several of the above properties can be used as definitions of a tree. In the following
theorem, we state six possible definitions. They are all equivalent: anyone of them can
be taken as the definition of a tree, and the other five can then be deduced.

Theorem 4.8: Let G be a graph with n vertices. Then the following statements are
equivalent.

Mathematics Program: By Werku Debele (MSc.) Page 101


Discrete Mathematics And Combinatorics (Math 393) 2012

i. G is connected and has no cycles;


ii. G has n-1 edges and has no cycles;
iii. Any two vertices in G are connected by exactly one path;
iv. G is connected and the removal of any edge disconnects G;
v. G contains no cycle but the addition of any new edge to G creates
exactly one cycle;

Definition 4.16: Let G be a connected graph. Then a spanning tree in G is a subgraph


of G that includes every vertex and is also a tree.

Example 4.26: The following diagram shows a graph and three of its spanning trees.

Given a connected graph, we can construct a spanning tree by using either of the
following two methods. We illustrate these by applying them to the graph G above.

Building-up method: Select edges of the graph one at a time, in such a way that no
cycles are created; repeat this procedure until all vertices are included.

Example 4.27: In the above graph G, we select the edges 𝑣𝑧, 𝑤𝑥, 𝑥𝑦, 𝑦𝑧; then no
cycles are created. We obtain the following spanning tree.

Cutting-down method : Choose any cycle and remove any one of its edges; repeat this
procedure until no cycles remain.

Mathematics Program: By Werku Debele (MSc.) Page 102


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 4.28: From the above graph G, we remove the edges 𝑣𝑦 (destroying the
cycle 𝑣𝑤𝑦𝑣), 𝑦𝑧 (destroying the cycle 𝑣𝑤𝑦𝑧𝑣), 𝑥𝑦 (destroying the cycle 𝑤𝑥𝑦𝑤). We
obtain the following spanning tree.

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.

1. Can you define a tree? ...............................................................


2. Can you construct the spanning tree of a given graph by using both methods?

Exercise 4.6
1. Draw the branching tree representing the outcomes of two throws of a six-sided die.
2. Give an example of a tree with seven vertices and
a. exactly two vertices of degree 1;
b. exactly four vertices of degree 1;
c. exactly six vertices of degree 1.
3. Use the handshaking lemma to prove that every tree with n vertices, where 𝑛 ≥ 2, has
at least two vertices of degree 1.
4. Use a proof by contradiction to show that the removal of an edge cannot disconnect a
tree into more than two components.
5. Use a proof by contradiction to show that the addition of a new edge to a tree cannot
create more than one cycle.
6. Use each method to construct a spanning tree in the complete graph K5.

7. The graph G below has twenty-one spanning trees. Find as many of them as you can.

Mathematics Program: By Werku Debele (MSc.) Page 103


Discrete Mathematics And Combinatorics (Math 393) 2012

8. Find three spanning trees in the Petersen graph.

Mathematics Program: By Werku Debele (MSc.) Page 104


Discrete Mathematics And Combinatorics (Math 393) 2012

4.7. Planar Graphs

Objectives: After studying this topic, you should be able to:


 Introduce the topic of planar graphs, and to present some simple properties of
such graphs.
 Explain the terms planar graph, non-planar graph, plane drawing, face, infinite
face, degree of a face, subdivision of a graph and contraction of a graph;
 Use the handshaking lemma for planar graphs;
 State and use Euler's formula;
 Explain the term dual graph and describe its properties;
 Present the Kuratowski theorem and discuss its use in determining whether a
graph is planar.
In this chapter we investigate the properties of graphs that can be drawn in the plane
without any of their edges crossing; such graphs are called planar graphs. In particular,
we determine whether the complete bipartite graph K3,3 is planar, thereby solving the
utilities problem. We discuss Euler's formula and Kuratowski's theorem; the latter is an
important theoretical result which gives a necessary and sufficient condition for a graph
to be planar.

Definition 4.17: A graph G is planar if it can be drawn in the plane without its edges
crossing. Such a drawing is called a plane drawing or a plane graph. A graph G is
non-planar if no plane drawing of G exists.

Example 4.29:

(i) The graph K 4 is planar.

Here are two plane drawings:

Mathematics Program: By Werku Debele (MSc.) Page 105


Discrete Mathematics And Combinatorics (Math 393) 2012

(ii) The graph K 2,3 is planar.

Here is a plane drawing:

For some graphs, such as K3,3, it is impossible to find a drawing that involves no
crossings, therefore, K3,3 is an example of non planar graph.

Definition 4.18: A plane graph divides the plane into regions called faces. If we denote
the i-th face by f i , then f i represents the number of edges bordering f i .

Example 4.30:

(i) (ii)
f3
f1 f2 f3 f1 f2 f3 f4 f5

f4

Graph (i) has 4 faces and graph (ii) has 5.

Theorem 4.9: Let G be a connected plane graph, and let n, m and f be the respective
number of vertices, edges and faces of G. Then
f
 fi  2m .
i 1

Informal proof. Take a walk around every face of the graph. You will traverse every
edge exactly twice, because an edge either borders exactly two faces (hence is counted
twice as you walk) or borders the same face twice.

Mathematics Program: By Werku Debele (MSc.) Page 106


Discrete Mathematics And Combinatorics (Math 393) 2012

4
In Example 4.30 (i) above, n = 6, m = 8, f = 4 and f
i 1
i  16 .

5
In (ii), n = 9, m = 12, f = 5 and f
i 1
i  24 .

Theorem 4.10( Euler’s Formula) (Euler 1750): Let G be a connected plane graph, and
let n, m and f be the respective number of vertices, edges and faces of G as before.
Then
n – m + f = 2.

Theorem 4.11: Let G be a simple planar graph with n  3 vertices and m edges. Then
m  3n  6 .
Proof. Assume that we have a plane drawing of G with f faces. Since each face is
bounded by at least 3 edges, we have f i  3 for every i = 1, 2, …, f. Hence,
f
 fi  2m  3 f . So 3 f  2m , and by using Euler’s formula we have
i 1

3(m  n  2)  2m or m  3n  6 .

By converse of the above theorem, if m  3n  6 , then we can conclude that a simple


graph G is non-planar. Note, however, that if this condition is not satisfied it does not
necessarily mean that the graph is planar.

Example 4.31: The graph K 5 has 5 vertices and 10 edges, so we have

10 > 3  5 − 6 = 9, and therefore K 5 is non-planar. But in case of the non-planar

graph K 3,3 , which has 6 vertices and 9 edges, we have 9 > 3  6 – 6 =12. As 9 is not

greater than 12 then the condition is not satisfied, but this does not mean K 3,3 is planar.

The graphs K 5 and K 3,3 are in fact two important examples of non-planar graphs as we

shall see later. These graphs are known as Kuratowski graphs. It is also useful to note
that the complete graph K n has exactly n(n  1) / 2 edges.

Definition 4.19: A minor of G is a graph obtained from G by repeatedly deleting


and/or contracting edges.

Mathematics Program: By Werku Debele (MSc.) Page 107


Discrete Mathematics And Combinatorics (Math 393) 2012

Given an edge e in a graph G, by contracting the edge e, we mean combining its end
vertices by bringing them closer and closer together until they become one and
replacing multi-edges by a single edge. We denote the graph obtained in this by G\e.
Deletion of an edge is denoted by G-e.

Example 4.32:
e

 

G G–e G\e
e

 

G G–e G\e

Given a non-planar graph (such as K 5 or K 3,3 ) if we ‘reverse’ a contraction or deletion

(i.e. add an edge) then it still remains non-planar. This is the basis for the Kuratowski
theorem.
Theorem 4.12 (Kuratowski theorem): A graph G is non-planar then it MUST contain
either a K 5 or K 3,3 minor.

G is non-planar  G has a K 5 or K 3,3 minor.


This is a useful result for determining whether a graph is planar or not. (For graphs with
not many vertices and edges it may be easier to try finding a plane drawing to show
planarity.)
Example 4.33:
1. The Petersen graph is non-planar as it has a K 5 minor. (It also has a K 3,3

minor.)

e Contract e, f, g, h, i.
-->

i f

h g
Petersen K5

2. The following graph is non-planar as it has a K 3,3 minor.

Mathematics Program: By Werku Debele (MSc.) Page 108


Discrete Mathematics And Combinatorics (Math 393) 2012

b a
h f i Delete e, f, g and
e g contract h, i.
--> b a
K 3,3 a b

Dual Graphs

Given a plane drawing of a planar graph G, its dual G * is constructed as follows:

(i) Choose a point v * inside each face of G and make v * vertices of G * .


(ii) For each edge e of G draw a line e * joining the v * inside the faces on each
side of e and make e * the edges of G * .
Example 4.34:
G  dual  G*

Tetrahedron Tetrahedron (self dual)

Cube Octahedron
The following hold for a connected planar graph G.
(i) If G has n vertices, m edges and k faces, then G * has k vertices, m edges and
n faces.
(ii) G ** is isomorphic to G.

Mathematics Program: By Werku Debele (MSc.) Page 109


Discrete Mathematics And Combinatorics (Math 393) 2012

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.

1. Can you define a planar graph? ...............................................................


2. Can you state Euler formula and Kuratowski theorem? ............................
3. Can you define minor? ............................................................................
4. Can you find the minors of a given graph? .................................................

Exercise 4.7
1. Show that if G is a simple planar graph with no cycles of length 3 or 4 then
5
m  (n  2) , where n is the number of vertices and m the number of edges of G.
3
2.Deduce that the Petersen graph is non-planar.
3.Show that the Petersen graph has a K 3,3 minor.

4.Use Kuratowski’s theorem to show that the following graphs are non-planar.

(i) (ii)

(iii) (iv)

Mathematics Program: By Werku Debele (MSc.) Page 110


Discrete Mathematics And Combinatorics (Math 393) 2012

5. Draw the duals of the following graphs.

6. Draw G * and G ** for the following disconnected graph G.

Mathematics Program: By Werku Debele (MSc.) Page 111


Discrete Mathematics And Combinatorics (Math 393) 2012

4.8 Graph Colouring

Objectives: After studying this section, you should be able to:


 Introduce the topic of vertex colouring and an application of it to a storage
problem.
 Define the term, chromatic number, and present methods of determining it.
 Explain the terms vertex colouring, k-colouring and chromatic number;
 State 4-colour Theorem;
 Apply Brooks' theorem;
 Explain what are meant by colouring problems, the map colouring problem and
domination problems, and how they can be represented as vertex decomposition
problems.

Introduction

A chemical company wants to ship 6 chemicals, C1 ,, C 6 , in such a way that those
which react violently together are stored in separate containers. The problem is how to
store the chemicals using minimum number of containers. Pairs of chemical that react
violently together are:

C1C 2 , C1C 6 , C1C 5 , C 2 C 3 , C 2 C 6 , and C 5 C 6 .

The problem can be solved by drawing a ‘react violently’ graph, F, whose vertices are
C i and its edges are Ci C j (i, j  1,  ,6) , where C i and C j react together violently. If

we now assign colours to the vertices of F so that no two adjacent vertices have the
same colour, we see that we require at least three colours. This minimum number of
colours is called the chromatic number and is denoted by the Greek letter  , (chi). For
this problem, therefore,  ( F )  3 , as two colours would not be sufficient to colour the
adjacent vertices differently. So three containers are required to transport the chemicals
safely.

Mathematics Program: By Werku Debele (MSc.) Page 112


Discrete Mathematics And Combinatorics (Math 393) 2012

C1 (red) Red Blue Green

C6 C2 (blue)
(green) OR: C1 C2 C6

C5 (blue) C3 (red) C3 C5

C4 (red) C4 

Definition 4.20: For a simple graph G, we say that G is k-colourable if we can colour
each vertex from a set of k colours in such a way that for every edge its two end
vertices have a different colour. The smallest k for which this is possible is called the
chromatic number of G, denoted by  (G ) .

Note that the graph F above is tripartite. Its vertices can be split into three sets (red,
blue and green) and the edges connect vertices in different sets.

Example 4.35:

 (G )  1 iff G has no edges, that is, G is a null graph.

 (G )  2 iff G is bipartite and non-null.

 ( K n )  n , where K n is a complete graph with n vertices.

 (C even )  2 and  (Codd )  3 , where C is a cycle graph with even or odd


number of vertices.

Remark 4.13: The above definitions are given only for simple graphs. Loops must be
excluded since, in any 𝑘-colouring, the vertices at the ends of each edge must be
assigned different colours, so the vertex at both ends of a loop would have to be
assigned a different colour from itself. We also exclude multiple edges, since the
presence of one edge between two vertices forces them to be coloured differently, and
the addition of further edges between them is then irrelevant to the colouring. We
therefore restrict our attention to simple graphs.

Mathematics Program: By Werku Debele (MSc.) Page 113


Discrete Mathematics And Combinatorics (Math 393) 2012

We usually show a k-colouring by writing the numbers 1,2, ..., 𝑘 next to the appropriate
vertices. For example, diagrams (a) and (b) below illustrate a 4-colouring and a 3-
colouring of a graph G with five vertices; note that diagram (c) is 1lot a 3-colouring of
G, since the two vertices coloured 2 are adjacent.

Since G has a 3-colouring,  (G) < 3; thus 3 is an upper bound for  (G). Also, G
contains three mutually adjacent vertices (forming a triangle) that must be assigned
different colours, so  (G) > 3; thus 3 is a lower bound for  (G). Combining these
inequalities, we obtain  (G) = 3.

If H is a subgraph of G, then  (G )   ( H ) . For example, the odd cycle C 5 is a

subgraph of Petersen graph, P, so  ( P)   (C5 )  3 . In fact  ( P )  3 .

This is denoted by  (G ) and is the maximum degree of any vertex in graph G.

The question that we are now interested in is how many k-colourings does a graph
have. Let  G (k ) be the number of k-colourings of G. Then  (G ) is the smallest k for

which  G (k )  1 , since this means that there is at least one  (G ) -colouring of G, (and

no k-colourings of G for k   (G ) because  G (k )  0 for these k). So this gives


another method of computing the chromatic number of a graph.

Example 4.36: Let H be the path on 3 vertices. Then,  H (1)  0 ,  H (2)  2 , (so
 ( H )  2 ),  H (3)  12 ,  H (4)  36 , and so on.

k k -1 k -1 k -1 k k -1
OR

So we have  H (k )  k (k  1) 2 .

Mathematics Program: By Werku Debele (MSc.) Page 114


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 4.37:

1. Null graphs.

If G  N n is the null graph with n vertices, then  G (k )  k n .

2. Trees.

If G  Tn is any tree with n vertices, then  G (k )  k (k  1) n1 .

For example, the graph H above is a T3 .

3. Complete graphs.

If G  K n is the complete graph with n vertices, then

 G (k )  k (k  1)(k  2) (k  n  1).

For example, for the graph K 4 we have

k k -1

 K (k )  k (k  1)(k  2)(k  3).


4

k -3 k -2

Theorem 4.14 (Brooks 1941): If G is a simple connected graph which is not an odd
cycle or a K n , then  (G )   (G ) . (That is, G is  (G ) -colourable.)

Remark 4.15:We have  (Codd )  3  2  (Codd ) and we have

 ( K n )  n  ( K n )  n  1 , hence these two classes of graphs are excluded from the


statement of Brook’s theorem above.
Theorem 4.16: (4-Colour theorem) (Appel and Haken 1976).Every simple planar
graph is 4-colourable. (i.e.  (G )  4 for any planar graph G.)

Mathematics Program: By Werku Debele (MSc.) Page 115


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 4.21: An independent set in a graph G is a set of vertices of G, no two of


which are adjacent. The independence number of a graph G, denoted by i (G ) , is the
size of the largest independent set. It is useful to know i (G ) as it can be used to find the
lower bound for  (G ) as

 n 
 i(G)    (G)  (G) ,
 
where n is the number of vertices of G and the symbol a  means the smallest integer
greater than or equal to the real number a.

Definition 4.22: If G is an undirected graph, any subgraph of G that is a complete


graph is called a clique in G. A clique-partition of G is a partition of all vertices of G
into cliques. A graph can have many clique-partitions.

Example 4.38: for graph L below

i i

3 parts clique-partition K5, K3, K3 5 parts clique-partition K4, K3, K2, K1, K1

Given a clique-partition of a graph G with k parts, an independent set of G can have at


most one vertex from each part, since vertices from the same part are adjacent. So
i (G )  k . For L above, we have found a clique-partition with 3 parts, and one with 5
parts; so i ( L)  3 . Now try to use the clique-partition with 3 parts to find an
independent set of size 3. This is possible for L as the 3 vertices labelled i form an
independent set of size 3, so i( L)  3 .

Mathematics Program: By Werku Debele (MSc.) Page 116


Discrete Mathematics And Combinatorics (Math 393) 2012

In the above example, we had equality between i (L) and some k. This need not always

be the case. For example the Petersen graph, P, has no K 3 ' s, K 4 ' s,  as subgraphs;

only K 2 ' s (edges) and K1 ' s (vertices). It has 10 vertices, so every clique-partition with
k parts must have k  5 . But i ( P)  4  k . So clique-partitions cannot always be used
to find the independence number M.

Labelling Procedure

Labelling K 4 as above illustrates the general procedure. As you label vertices with
𝑘, 𝑘 − 1, … you can label a new vertex with k – i provided its labelled neighbours form
an i-clique (a complete subgraph K i ).

Example 4.39 Consider the graph J blow.

k -1 k -2 k -2 k

OR
k k -2 k -2 k -1

 J (k )  k (k  1)(k  2) 2 .

Sometimes, when labelling, you might reach a conflict, i.e. the labelled neighbours of a
vertex you want to label do not form a clique. A different labelling may avoid this.

For example, the labelling on the left below reaches a conflict but the one on the right
works.

k k –1 k k -3

k –2 k -1

k -2 or k -3 ? k -1 k –2 k –2

 J (k )  k (k  1)(k  2) 2 (k  3)

Mathematics Program: By Werku Debele (MSc.) Page 117


Discrete Mathematics And Combinatorics (Math 393) 2012

However, there are some graphs that CANNOT be labelled in a conflict free manner.
We need the deletion-contraction theorem to break such graphs into two or more
graphs, each of which having a conflict free labelling.

The graph F below, for example, cannot be labelled in a conflict free manner.

? k -1

k –2 k -1

Deletion-Contraction Theorem

Recall that G – e denotes the graph obtained from G by deleting edge e, and G \ e
denotes the graph obtained by contracting e.

Theorem 4.17: Let e be an edge in a graph G, then  G (k )   G e (k )   G \ e (k ) .

This is a useful result as the two graphs on the right-hand side of the above equation
have fewer edges than G, so we can use the Deletion-Contraction theorem repeatedly
until we reach graphs for which we can compute the chromatic polynomial by a
conflict free labelling, e.g. for null graphs, complete graphs or trees.

We can now find the chromatic polynomial of F by applying the above result.

k -1
e

k-2 k -2

k k -1
F  F–e  F \ e (this is K4)

Mathematics Program: By Werku Debele (MSc.) Page 118


Discrete Mathematics And Combinatorics (Math 393) 2012

 F (k ) =  F e (k ) −  F \ e (k )

= k (k  1) 2 (k  2) 2 − k (k  1)(k  2)(k  3)

= k (k  1)(k  2)(k  1)(k  2)  (k  3)

= k (k  1)(k  2)(k 2  4k  5) .

Hence,  F (1)   F (2)  0 , but  F (3)  12 . So  F (k )  3 and F has 12 three-

colourings. Note that the quadratic expression in  F (k ) cannot be factorised (unless


complex numbers are used), and that is why F could not be labelled in a conflict free
manner.

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define a k-colourable? .................................................................
2. Can you state Brooks theorem? ............................
3. Can you 4-colouring theorem? ............................................................................
4. Can you find the chromatic number of a given graph? ................................

Exercises 4.8
1. Determine the chromatic number of each of the following graphs.

(e)
(f)

Mathematics Program: By Werku Debele (MSc.) Page 119


Discrete Mathematics And Combinatorics (Math 393) 2012

Petersen graph
(g) (h)

2. For the graphs in 1 above, find the independence number and the Max degree in each
case and check that  (G ) obeys the bounds

 n 
 i(G)    (G)  (G) .
 

3. Write down the chromatic number of each of the following graphs:

a. the complete graph Kn;


b. the complete bipartite graph K r,s ;
c. the cycle graph C n (n > 3);
d. a tree.

4. Find the chromatic polynomials of the following graphs.


(i) (ii) (iii)

5. In how many ways can the graph in part (iii) above be coloured
(a) with 3 colours? (b) with 4 colours?
6. Find the chromatic polynomial of the disconnected graph.

(a) (b)

Mathematics Program: By Werku Debele (MSc.) Page 120


Discrete Mathematics And Combinatorics (Math 393) 2012

Chapter Summary
 A graph is a diagram consisting of points, called vertices, joined by lines, called
edges; each edge joins exactly two vertices.
 In a graph, two or more edges joining the same pair of vertices are multiple edges.
 An edge joining a vertex to itself is a loop.
 A graph with no multiple edges or loops is a simple graph.
 Two vertices adjacent if they have an edge in common.
 Two edges are adjacent if they have a vertex in common.
 A subgraph of a graph G is a graph all of whose vertices are vertices of G and all of
whose edges are edges of G.
 Handshaking Lemma states that in any graph, the sum of all the vertex degrees is
equal to twice the number of edges.
 Two graphs are isomorphic if there is a one-one correspondence between their
vertex sets.
 A walk in a graph G is a finite sequence of edges of the form
v0 v1 , v1v 2 , v 2 v3 ,, v m 1v m (also written v0 v1v 2 v3  v m ).

 The number of edges in the walk is called its length.


 A trail is a walk in which no edge has been traversed more than once (in either
direction) but repeated vertices are allowed.
 A path is a walk in which all the edges and all the vertices are different.
 A graph is connected if there is a path between each pair of vertices, and is
disconnected otherwise
 A complete graph, denoted by Kn, is the simple graph in which every pair of
vertices is joined by an edge.
 A graph G is bipartite if every vertex can be labelled with either a or b, so that
every edge is an ab edge.
 A connected graph G is Eulerian if there is a closed trail containing every edge of
G. We call such a trail an Eulerian trail.
 A graph G is Hamiltonian if there is a cycle that passes through every vertex of G.
Such a cycle is a Hamiltonian cycle.
 A tree is a connected graph without cycles.

Mathematics Program: By Werku Debele (MSc.) Page 121


Discrete Mathematics And Combinatorics (Math 393) 2012

 A spanning tree in a connected graph G is a subgraph of G that includes every


vertex and is also a tree.
 A graph G is planar if it can be drawn in the plane without its edges crossing.
 A minor of G is a graph obtained from G by repeatedly deleting and/or contracting
edges.
 G is k-colourable if we can colour each vertex from a set of k colours in such a way
that for every edge its two end vertices have a different colour.The smallest k for
which this is possible is called the chromatic number of G, denoted by  (G ) .

Self Test Exercise 4


1. Consider the graph G shown on the right. Which of the following statements hold
for G?
a. vertices v and x are adjacent;
b. edge 6 is incident with vertex w;
c. vertex x is incident with edge 4;

d. vertex wand edges 5 and 6 form a subgraph of G.


2. Draw an example of each of the following, each with 5 vertices and 8 edges:
i. a simple graph,
ii. a non-simple graph with no loops,
iii. a non-simple graph with no multiple edges.
3. Which of the following are possible degree sequences of simple graphs. Draw graphs for
those that are.
(i) 1,2,2,3 (ii) 1,2,3,4 (iii) 0,0,1,1,2,2
(iv)1,2,3,3,4 (v) 2,2,3,3,4,4 (vi) 2,3,3,4,5,5.
4. (a) Show that the following two graphs are isomorphic:
u4 u3 v1

u5 u2 v2 v5

u1 v3 v4

(b) Give a reason why the following two graphs cannot be isomorphic:

Mathematics Program: By Werku Debele (MSc.) Page 122


Discrete Mathematics And Combinatorics (Math 393) 2012

v1 v4 u1 u4
v5 v8 u5 u8

v6 v7 u6 u7

v2 v3 u2 u3

5. By suitably labelling the vertices, show that the following graphs are isomorphic:

6. Draw the eleven unlabelled simple graphs with four vertices.


7. (a) If two graphs have the same degree sequence, must they be isomorphic?
(b) If two graphs are isomorphic, must they have the same degree sequence?
8. Let G be a graph with degree sequence (1, 2, 3, 4). Write down the number of
vertices and number of edges of G, and construct such a graph. Are there any
simple graphs with degree sequence (1, 2, 3, 4)?
9. Prove that, if G is a simple graph with at least two vertices, then G has two or more
vertices of the same degree.
10. For the graph shown on the right, write down:
a. a walk of length 7 between 𝑢 and 𝑤;
b. all the cycles of lengths 1,2,3 and 4;
c. a path of maximum length.

11. Draw:
a. two non-isomorphic regular graphs with 8 vertices and 12 edges;
b. two non-isomorphic regular graphs with 10 vertices and 20 edges.
12. For which values of n, rand s are the following graphs Eulerian? For which values
are they semi-Eulerian?
a. the complete graph 𝐾𝑛 ;
b. the complete bipartite graph 𝐾𝑟,𝑠 ;
c. the 𝑛-cube 𝑄𝑛 .

Mathematics Program: By Werku Debele (MSc.) Page 123


Discrete Mathematics And Combinatorics (Math 393) 2012

13. For which values of 𝑛, 𝑟and 𝑠 are the graphs in Exercise 9 Hamiltonian? For which
values are they semi-Hamiltonian?
14. Draw two graphs each with 10 vertices and 13 edges: one that is Eulerian but not
Hamiltonian and one that is Hamiltonian but not Eulerian.
15. Decide which of the following graphs are planar.

For each planar graph, give a plane drawing.


16. By finding a plane drawing, show that the following graph is planar.

17. Let G be a planar graph with k components, and let 𝑛, 𝑚 and 𝑓 denote,
respectively, the numbers of vertices, edges and faces in a plane drawing of G.
a. Show that if each component has at least three vertices, then Euler's
formula has the form
𝑛 − 𝑚 + 𝑓 = 𝑘 + 1.
b. Deduce that if G is simple and each vertex has degree at least 2, then
𝑚 < 311 − 3(𝑘 + 1).
18. Give an example of a connected planar graph G with 7 vertices such that its
complement is also planar.

Mathematics Program: By Werku Debele (MSc.) Page 124


Discrete Mathematics And Combinatorics (Math 393) 2012

REFERENCE

[1]. I. Anderson, A First Course in Discrete Mathematics,2002.


[2]. C. Berge, Graphs and Hypergraphs, North-Hoi Land Publishing Company-
Amsterdam, 1976.
[3]. A. Bezdek, Discrete Geometry, Marcel Dekker, 2003.
[4]. N. L. Biggs, Discrete mathematics, Oxford University Press, 2002.
[5]. Eric W., "Discrete mathematics" from MathWorld.
[6]. S. Finch, Bipartite, k-Colorable and k-Colored Graphs, 2003.
[7]. Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied
Introduction 5th ed. Addison Wesley.
[8]. T. R. Hodkinson and John A. N. Parnell, Reconstructing the Tree of Life:
Taxonomy and systematics of species rich taxa, CRC Press, 2007.
[9]. B. Hopkins, Resources for Teaching Discrete Mathematics, Mathematical
Association of America, 2008.
[10]. R. Johnsonbaugh, Discrete Mathematics, New Jersey, 2005.
[11]. R. Johnsonbaugh, Discrete Mathematics, Prentice Hall, 2008.
[12]. S. G. Krantz, Discrete Mathematics Demystified, McGraw-Hill, 2009.
[13]. B. Mohar and C. Thomassen, Graphs on Surfaces, Johns Hopkins University
press, 2001.
[14]. K.H. Rosen &J.G. Michaels, Handbook of Discrete and Combinatorial
Mathematics, CRC Press, 2000.
[15]. K. H. Rosen, Discrete Mathematics and Its Applications 6th ed. McGraw Hill.
[16]. R. J. Wilson, Introduction to Graph Theory, Longman, 1996.
[17]. D. B. West, Introduction to Graph Theory, 2005.

Mathematics Program: By Werku Debele (MSc.) Page 125


Discrete Mathematics And Combinatorics (Math 393) 2012

CHAPTER 5
DIRECTED GRAPHS

Objectives: After studying this chapter, you should be able to:

 Understand the terms digraph, labelled digraph, unlabelled digraph, vertex, arc,
adjacent, incident, multiple arcs, loop, simple digraph, underlying graph and
subdigraph;
 Appreciate the uses of rooted trees in different areas;
 determine whether two given digraphs are isomorphic;
 Understand the terms in-degree, out-degree, in-degree sequence and out-degree
sequence.
 state and use the handshaking dilemma;
 realize walk, trail, path, closed walk, closed trail, cycle, connected, disconn-
ected and strongly connected in the context of digraphs;
 Know the terms Eulerian digraph and Eulerian trail;
 State a necessary and sufficient condition for a connected digraph to be
Eulerian;
 Know the terms Hamiltonian digraph and Hamiltonian Cycle;
 describe the use of digraphs in ecology, social networks, the rotating drum
problem, and ranking in tournaments.

Introduction

In this chapter we discuss digraphs and their properties. Our treatment of the subject is
similar to that of Chapters 4 for graphs, except that we need to take account of the
directions of the arcs.

Mathematics Program: By Werku Debele (MSc.) Page 126


Discrete Mathematics And Combinatorics (Math 393) 2012

5.1. Basic Terminologies

Objectives: After studying this section, you should be able to:

 define the terms digraph, labelled digraph, unlabelled digraph, vertex, arc,
adjacent, incident, multiple arcs, loop, simple digraph, underlying graph and
subdigraph;
 determine whether two given digraphs are isomorphic;
 explain the terms in-degree, out-degree, in-degree sequence and out-degree
sequence
 state and use the handshaking dilemma;

Definition 5.1: A directed graph (digraph) consists of a set of elements called vertices
and a set of elements called arcs. Each arc joins two vertices in a specified direction.

Example 5.1: the digraph shown below has four vertices {𝑢, 𝑣, 𝑤, 𝑥} and six arcs
{1, 2, 3, 4, 5, 6}. Arc 1 joins 𝑥 to 𝑢, arc 2 joins 𝑢 to 𝑤, arcs 3 and 4 join 𝑤 to 𝑣,

arc 5 joins 𝑥 to 𝑤, and arc 6 joins the vertex 𝑥 to itself.

We often denote an arc by specifying its two vertices in order; for example, arc 1 is
denoted by 𝑥𝑢, arcs 3 and 4 are denoted by 𝑤𝑣, and arc 6 is denoted by 𝑥𝑥. Note that
𝑥𝑢 is not the same as ux.

The above digraph contains more than one arc joining 𝑤 to 𝑣, and an arc joining the
vertex 𝑥 to itself. The following terminology is useful when discussing such digraphs.

Definition 5.2: In a digraph, two or more arcs joining the same pair of vertices in the
same direction are multiple arcs. An arc joining a vertex to itself is a loop. A digraph
with no multiple arcs or loops is a simple digraph.

Mathematics Program: By Werku Debele (MSc.) Page 127


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 5.2: digraph (a) below has multiple arcs and digraph (b) has a loop, so neither
is a simple digraph. Digraph (c) has no multiple arcs or loops, and is therefore a simple
digraph.

Adjacency and Incidence

The digraph analogues of adjacency and incidence are similar to the corresponding
definitions for graphs, except that we take account of the directions of the arcs.

Definition 5.3: The vertices 𝑣 and 𝑤 of a digraph are adjacent vertices if they are
joined (in either direction) by an arc 𝑒. An arc e that joins 𝑣 to 𝑤 is incident from v and
incident to 𝑤; 𝑣 is incident to 𝒆, and 𝑤 is incident from 𝑒.

Example 5.3: in the digraph below, the vertices 𝑢 and 𝑥 are adjacent, vertex 𝑤 is
incident from arcs 2 and 5 and incident to arcs 3 and 4, and arc 6 is incident to (and
from) the vertex 𝑥.

Isomorphism

It follows from the definition that a digraph is completely determined when we know
its vertices and arcs, and that two digraphs are the same if they have the same vertices

Mathematics Program: By Werku Debele (MSc.) Page 128


Discrete Mathematics And Combinatorics (Math 393) 2012

and arcs. Once we know the vertices and arcs, we can draw the digraph and, in
principle, any picture we draw is as good as any other; the actual way in which the
vertices and arcs are drawn is irrelevant - although some pictures are easier to use than
others!

We extend the concept of isomorphism to digraphs, as follows.

Definition 5.4: Two digraphs C and D are isomorphic if D can be obtained by


relabeling the vertices of C - that is, if there is a one-one correspondence between the
vertices of C and those of D, such that the arcs joining each pair of vertices in C agree
in both number and direction with the arcs joining the corresponding pair of vertices in
D.

Example 5.4: the digraphs C and D represented by the diagrams

are not the same, but they are isomorphic, since we can relabel the vertices in the
digraph C to get the digraph D, using the following one-one correspondence:

Note that arcs in C correspond to arcs in D - for example:


the two arcs from 𝑢 to 𝑣 in C correspond to the two arcs from 2 to 3 in D; the arcs
𝑤𝑥and 𝑥𝑤 in C correspond to the arcs 41 and 14 in D; the loop 𝑤𝑤 in C corresponds to
the loop 44 in D.

Sometimes it is unnecessary to have labels on the digraphs. In such cases, we omit the
labels, and refer to the resulting object as an ll1l1abelled digraph.

Mathematics Program: By Werku Debele (MSc.) Page 129


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 5.5: The unlabelled digraph

corresponds to any of the following isomorphic digraphs:

We say that two unlabelled digraphs are isomorphic if labels can be attached to their
vertices so that they become the same digraph.

It is convenient to define a concept analogous to that of a subgraph of a graph.

Definition 5.5: A subdigraph of a digraph D is a digraph all of whose vertices are


vertices of D and all of whose arcs are arcs of D.

Remark 5.1: Note that D is a subdigraph of itself.

Example 5.6: The following digraphs are all subdigraphs of the digraph D on the left,
with vertices {𝑢, 𝑣, 𝑤, 𝑥} and arcs {1, 2, 3, 4, 5, 6}.

The idea of a subdigraph can be extended to unlabelled digraphs.

Mathematics Program: By Werku Debele (MSc.) Page 130


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 5.7: The following digraphs are all subdigraphs of the unlabelled digraph C
on the left:

It is also convenient to introduce the idea of the underlying graph of a digraph.

Definition 5.6: The underlying graph of a digraph D is the graph obtained by replacing
each arc of D by the corresponding undirected edge.

To obtain the underlying graph, we simply remove the arrows from the arcs.

Example 5.8:

We now give analogues of the degree of a vertex in a graph.

Definition 5.7: In a digraph, the out-degree of a vertex 𝑣 is the number of arcs incident
from 𝑣, and is denoted by outdeg 𝒗; the in-degree of 𝑣 is the number of arcs incident to
v, and is denoted by indeg 𝑣.

Remark 5.2: Each loop contributes 1 to both the in-degree and the out-degree of the
corresponding vertex.

Example 5.9: The digraph below has the following out-degrees and in-degrees:

Mathematics Program: By Werku Debele (MSc.) Page 131


Discrete Mathematics And Combinatorics (Math 393) 2012

outdeg 𝑢 = 1 outdeg 𝑣 = 3 outdeg 𝑤 = 2


indeg 𝑢 = 0 indeg 𝑣 = 1 indeg 𝑤 = 1
outdeg 𝑥 = 0 outdeg 𝑦 = 2 outdeg 𝑧 = 2
indeg 𝑥 = 0 indeg 𝑦 = 6 indeg 𝑧 = 2

There are also analogues of the degree sequence of a graph, corresponding to the out-
degree and in-degree of a vertex.

Definition 5.8: The out-degree sequence of a digraph D is the sequence obtained by


listing the out-degrees of D in increasing order, with repeats as necessary. The in-
degree sequence of D is defined analogously.

Example 5.10: The above digraph has out-degree sequence (0, 1,2,2,2,3) and in-degree
sequence (0, 0, 1, 1, 2, 6).

Handshaking Dilemma

In the solution to Problem 4.10, you should have noticed that the sum of the out-
degrees and the SUI11 of the in-degrees of each digraph are both equal to the number
of arcs. A corresponding result holds for any digraph; we call it the handshaking
dilemma!

Theorem 5.3( Handshaking Dilemma): In any digraph, the sum of all the out-degrees
and the sum of all the in-degrees are both equal to the number of arcs.

Proof: In any digraph, each arc has two ends, so it contributes exactly 1 to the sum of
the out-degrees and exactly 1 to the sum of the in-degrees. The result follows
immediately.

Mathematics Program: By Werku Debele (MSc.) Page 132


Discrete Mathematics And Combinatorics (Math 393) 2012

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define a digraph? .........................................................................
2. Can you state Handshaking dilemma? .......................................................
3. Can you define isomorphic digraphs? ...............................................................
4. Can you distinguish the difference between in-degree and out-degree? .............

Exercise 5.1

1. Write down the vertices and arcs of each of the following digraphs. Are these digraphs
simple digraphs?

2. Which of the following statements hold for the digraph on the right?
a. vertices 𝑣 and 𝑤 are adjacent;
b. vertices 𝑣 and 𝑥 are adjacent;
c. vertex 𝑢 is incident to arc 2;
d. arc 5 is incident from vertex 𝑣.

3. Draw the digraphs whose vertices and arcs are as follows. Are these digraphs simple
digraphs?
a. vertices: {𝑢, 𝑣, 𝑤, 𝑥} arcs: {𝑣𝑤, 𝑤𝑢, 𝑤𝑣, 𝑤𝑥, 𝑥𝑢}
b. vertices: {𝑙, 2, 3, 4, 5,6,7, 8} arcs: {𝑙2, 22,23,34,35,67,68, 78}
4. By suitably labelling the vertices, show that the following unlabelled digraphs are
isomorphic:

Mathematics Program: By Werku Debele (MSc.) Page 133


Discrete Mathematics And Combinatorics (Math 393) 2012

5. By suitably relabelling the vertices, show that the following digraphs are isomorphic:

6. Are the following two digraphs isomorphic? If so, find a suitable one-one correspondence
between the vertices of the first and those of the second; if not, explain why no such one-
one correspondence exists.

7. Which of the following digraphs are subdigraphs of the digraph D below?

8. Which of the following digraphs are subdigraphs of the digraph C below?

9. Write down the out-degree and in-degree sequences of each of the following digraphs:

Mathematics Program: By Werku Debele (MSc.) Page 134


Discrete Mathematics And Combinatorics (Math 393) 2012

10. For each of the digraphs in Problem 9, write down:


a. the number of arcs;
b. the sum of the out-degrees of all the vertices;
c. the sum of the in-degrees of all the vertices.
d. What is the connection between your answers? Can you explain why this connection
arises?
11. Use the handshaking dilemma to prove that, in any digraph, if the number of vertices with
odd out-degree is odd, then the number of vertices with odd in-degree is odd.

Mathematics Program: By Werku Debele (MSc.) Page 135


Discrete Mathematics And Combinatorics (Math 393) 2012

5.2. Paths and Connectivity

Objectives: After studying this section, you should be able to:

 Explain the terms walk, trail, path, closed walk, closed trail, cycle, connected,
disconnected and strongly connected in the context of digraphs;
 explain the terms Eulerian digraph and Eulerian trail;
 state a necessary and sufficient condition for a connected digraph to be
Eulerian;
 explain the terms Hamiltonian digraph and Hamiltonian Cycle;

Just as you may be able to get from one vertex of a graph to another by tracing the
edges of a walk, trail or path, so you may be able to get from one vertex of a digraph to
another by tracing the arcs of a 'directed' walk, trail or path. This means that you have
to follow the directions of the arcs as you go, just as if you were driving around a one-
way street system in a town. We make this idea precise, as follows.

Definition 5.9: A walk of length 𝑘 in a digraph is a succession of 𝑘 arcs of the form


𝑢𝑣, 𝑣𝑤, 𝑤𝑥, ..., 𝑦𝑧. This walk is denoted by 𝑢𝑣𝑤𝑥 . . . 𝑦𝑧, and is referred to as a walk
from 𝑢 to 𝑧. A trail is a walk in which all the arcs, but not necessarily all the vertices,
are different. A path is a walk in which all the arcs and all the vertices are different.

Example 5.11: In the following diagram, the walk 𝑣𝑤𝑥𝑦𝑣𝑤𝑦𝑧𝑧𝑢 is a walk of length 9
from 𝑣 to 𝑢, which includes the arc 𝑣𝑤 twice and the vertices 𝑣, 𝑤, 𝑦 and 𝑧 twice. The
walk 𝑢𝑣𝑤𝑦𝑣𝑧 is a trail which is not a path, since the vertex 𝑣 occurs twice, whereas the
walk 𝑣𝑤𝑥𝑦𝑧 has no repeated vertices and is therefore a path.

The terms closed walk, closed trail and cycle also apply to digraphs.

Mathematics Program: By Werku Debele (MSc.) Page 136


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 5.10: A closed walk in a digraph is a succession of arcs of the form


𝑢𝑣, 𝑣𝑤, 𝑤𝑥, . . . , 𝑦𝑧, 𝑧𝑢.
A closed trail is a closed walk in which all the arcs are different. A cycle is a closed
trail in which all the intermediate vertices are different.

In the digraph above, the closed walk 𝑢𝑣𝑤𝑦𝑣𝑧𝑢 is a closed trail which is not a cycle
(since the vertex 𝑣 occurs twice), whereas the closed trails 𝑧𝑧, 𝑤𝑥𝑤, 𝑣𝑤𝑥𝑦𝑣 and
𝑢𝑣𝑤𝑥𝑦𝑧𝑢 are all cycles. In describing closed walks, we can allow any vertex to be the
starting vertex. For example, the triangle 𝑣𝑤𝑦𝑣 can also be written as 𝑤𝑦𝑣𝑤 or 𝑦𝑣𝑤𝑦.

As with graphs, we can use the concept of a path tell us whether or not a digraph is
connected. Recall that a graph is connected if it is 'in one piece', and this means that
there is a path between each pair of vertices. For digraphs these two ideas are not the
same, and this leads to two different definitions of the word connected for digraphs.

Definition 5.11: A digraph is connected if its underlying graph is a connected graph,


and is disconnected otherwise. A digraph is strongly connected if there is a path
between each pair of vertices.

Example 5.12: These three types of digraph are illustrated below:

Digraph (a) is disconnected, since its underlying graph is a disconnected graph.


Digraph (b) is connected but is not strongly connected since, for example, there is no

Mathematics Program: By Werku Debele (MSc.) Page 137


Discrete Mathematics And Combinatorics (Math 393) 2012

path from 𝑧 to 𝑦. Digraph (c) is strongly connected, since there are paths joining all
pairs of vertices.

Alternatively, you can think of driving around a one-way street system in a town. If the
town is strongly connected, then you can drive from any part of the town to any other,
following the directions of the one-way streets as you go; if the town is merely
connected, then you can still drive from any part of the town to any other, but you may
have to ignore the directions of the one-way streets!

Eulerian and Hamiltonian Digraphs

In Chapter 4, we discussed the problem of finding a route that includes every edge or
every vertex of a graph exactly once, and it is natural to consider the corresponding
problem for digraphs. This leads to the following definitions.

Definition 5.12: A connected digraph is Eulerian if it contains a closed trail that


includes every arc; such a trail is an Eulerian trail. A connected digraph is
Hamiltonian if it contains a cycle that includes every vertex; such a cycle is a
Hamiltonian cycle.

Example 5.13: Consider the following four digraphs:

Mathematics Program: By Werku Debele (MSc.) Page 138


Discrete Mathematics And Combinatorics (Math 393) 2012

digraph (a) is Eulerian - an Eulerian trail is 𝑎𝑏𝑐𝑑𝑒𝑓𝑔𝑐𝑒𝑔𝑓𝑎 and Hamiltonian - a


Hamiltonian cycle is 𝑎𝑏𝑐𝑑𝑒𝑔𝑓𝑎;
digraph (b) is Eulerian - an Eulerian trail is 𝑏𝑐𝑔𝑓𝑒𝑔𝑏 it is not Han1iltonian;
digraph (c) is Hamiltonian - a Hamiltonian cycle is 𝑏𝑐𝑑 𝑒 𝑔 𝑓 𝑏 it is not Eulerian;
digraph (d) is neither Eulerian nor Hamiltonian.

Much of the earlier discussion of Eulerian and Hamiltonian graphs can be adapted to
Eulerian and Hamiltonian digraphs. In particular, there is an analogue of Theorem 3.2.
We ask you to discover this analogue in the following problem.

Activity 5.1:

a. Guess a necessary and sufficient condition for a digraph to be Eulerian, involving the
in-degree and out-degree of each vertex.
b.Use the condition obtained in part (a) to check which of the digraphs in are Eulerian.

Theorem 5.4: A connected digraph is Eulerian if and only if, for each vertex, the out-
degree equals the in-degree.

Theorem 5.5: An Eulerian digraph can be split into cycles, no two of which have an
arc in common.

The proofs of these theoren1s are similar to those of Theorems 4.4 and 4.5. In the
sufficiency part of the proof of Theorem 5.4, the basic idea is to show that the digraph
contains a (directed) cycle, and then to build up the required Eulerian trail from cycles
step by step, as in the proof of Theorem 4.4. We omit the details. There is an analogue
of Ore's theoren1 for Hamiltonian graphs, but it is harder to state and prove than the
theorem for graphs, so we omit it.

√ Check-List
Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define a walk in a digraph? .................................................................
2. Can you define Eulerian digraph and Eulerian trial? ...................................
3. Can you define Hamiltonian and Hamiltonian cycle? ....................................

Mathematics Program: By Werku Debele (MSc.) Page 139


Discrete Mathematics And Combinatorics (Math 393) 2012

Exercise 5.2

19. For the digraph on the right, write down:


a. all the paths from t to w;
b. all the paths from w to t;
c. a closed trail of length 8 containing t and z.
d. all the cycles containing both t and w.
20. Classify each of the following digraphs as disconnected, connected but not strongly
connected, or strongly connected:

21. Decide which of the following digraphs are Eulerian and/or Hamiltonian, and write down
an Eulerian trail or Hamiltonian cycle where possible.

Mathematics Program: By Werku Debele (MSc.) Page 140


Discrete Mathematics And Combinatorics (Math 393) 2012

5.3. Rooted Trees

Objectives: After studying this section, you should be able to:

 distinguish between physical and conceptual tree structures, and give examples
of each type;
 appreciate the uses of rooted trees in different areas;
 construct the bipartite graph representation of a given braced rectangular frame-
work and use it to determine whether the system is rigid; if so, determine
whether the system is minimally braced.

Among the examples of tree structures, one particular type of tree occurs repeatedly.
This is the hierarchical structure in which one vertex is singled out as the starting point,
and the branches fan out from this vertex. We call such trees rooted trees, and refer to
the starting vertex as the root. For example, the tree representing the lines of
responsibility of a company is a rooted tree, with the managing director as the root.

A rooted tree is often drawn as follows, with the root indicated by a small square at the
top, and the various branches descending from it. When a path from the top reaches a
vertex, it may split into several new branches. Although a top-to-bottom direction is
often implied, we usually draw a rooted tree as a graph with undirected edges, rather
than as a digraph with arcs directed downwards. A rooted tree in which there are at
most two descending branches at any vertex is a binary tree.

Mathematics Program: By Werku Debele (MSc.) Page 141


Discrete Mathematics And Combinatorics (Math 393) 2012

Such trees are often called branching trees. We have already seen two instances of
branching trees - the family tree and the hierarchical tree. There are many further
examples, as we now show.

Outcomes of Experiments

If we toss a coin or throw a die several times, then the possible outcomes can be
represented by a branching tree. In the case of tossing a coin, each possible outcome
has two edges leading from it, since the next toss may be a head (H) or a tail (T), and
we obtain a binary tree.

Example 5.13: if we toss a coin three times, then there are eight possible outcomes,
and we obtain the following branching tree.

Grammatical Trees
Branching trees occur in the parsing of a sentence in a natural language, such as
English. The tree represents the interrelationships between the words and phrases of the
sentence, and hence the underlying syntactic structure. Such a branching tree is

Mathematics Program: By Werku Debele (MSc.) Page 142


Discrete Mathematics And Combinatorics (Math 393) 2012

obtained by splitting the sentence into noun phrases and verb phrases, then splitting
these phrases into nouns, verbs, adjectives, and so on.
Example 5.14: The structure of the sentence Good students read books can be
represented by the following tree.

If a sentence is ambiguous, we can use branching trees to distinguish between the


different sentences constructions. For example, the newspaper headline Council rents
rocket can be interpreted in two ways, as illustrated by the following trees.

Computer Science

Rooted tree structures arise in computer science, where they are used to model and
describe branching procedures in programming languages (the languages used to write
algorithms to be interpreted by computers). In particular, they are used to store data in a
computer's memory in many different ways.

Mathematics Program: By Werku Debele (MSc.) Page 143


Discrete Mathematics And Combinatorics (Math 393) 2012

Example 5.15: Consider the list of seven numbers 7, 5, 4, 2, I, 6, 8. The following trees
represent ways of storing this list in the memory - as a stack and as a binary tree. Each
representation has its advantages, depending on how the data is to be manipulated, but
in both representations it is important to distinguish where the data starts, so the trees
are rooted trees.

We obtain the tree by writing the numbers in a string 7542168, 'promoting' every
second number (5, 2, 6) and then 'promoting' the new second number (2).
√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define a rooted tree? .................................................................

Exercise 5.3

1. Draw the branching tree representing the outcomes of two throws of a six-sided die.
2. The ambiguous sentence Help rape victims appeared as a newspaper headline l and can be
interpreted in two ways. Draw two tree structures that correspond to this sentence.

Chapter Summary

 A digraph consists of a set of elements called vertices and a set of elements


called arcs.
 In a digraph, two or more arcs joining the same pair of vertices in the same
direction are multiple arcs.

Mathematics Program: By Werku Debele (MSc.) Page 144


Discrete Mathematics And Combinatorics (Math 393) 2012

 An arc joining a vertex to itself is a loop.


 A digraph with no multiple arcs or loops is a simple digraph.
 The vertices 𝑣 and 𝑤 of a digraph are adjacent vertices if they are joined (in
either direction) by an arc 𝑒.
 An arc e that joins 𝑣 to 𝑤 is incident from v and incident to 𝑤; 𝑣 is incident to
𝑒, and 𝑤 is incident from 𝑒.
 Two digraphs C and D are isomorphic if D can be obtained by relabeling the
vertices of C - that is, if there is a one-one correspondence between the vertices
of C and those of D.
 A subdigraph of a digraph D is a digraph all of whose vertices are vertices of D
and all of whose arcs are arcs of D.
 In a digraph, the out-degree of a vertex 𝑣 is the number of arcs incident from 𝑣,
and is denoted by outdeg 𝑣;
 The in-degree of 𝑣 is the number of arcs incident to v, and is denoted by indeg
𝑣.
 Handshaking Dilemma states that in any digraph, the sum of all the out-degrees
and the sum of all the in-degrees are both equal to the number of arcs.
 A walk of length 𝑘 in a digraph is a succession of 𝑘 arcs of the form 𝑢𝑣, 𝑣𝑤,
𝑤𝑥, ..., 𝑦𝑧. This walk is denoted by 𝑢𝑣𝑤𝑥 . . . 𝑦𝑧, and is referred to as a walk
from 𝑢 to 𝑧.
 A trail is a walk in which all the arcs, but not necessarily all the vertices, are
different.
 A path is a walk in which all the arcs and all the vertices are different.
 A closed trail is a closed walk in which all the arcs are different.
 A cycle is a closed trail in which all the intermediate vertices are different.
 A connected digraph is Eulerian if it contains a closed trail that includes every
arc; such a trail is an Eulerian trail.
 A connected digraph is Hamiltonian if it contains a cycle that includes every
vertex; such a cycle is a Hamiltonian cycle.
 The hierarchical structure in which one vertex is singled out as the starting
point, and the branches fan out from this vertex is called rooted trees.

Mathematics Program: By Werku Debele (MSc.) Page 145


Discrete Mathematics And Combinatorics (Math 393) 2012

Self Test Exercise 5


1. Consider the digraph D shown on the right. Which of the following statements hold for D?
a. vertices u and 𝑥 are adjacent;
b. arc 2 is incident to vertex w;
c. vertex x is incident from arc 3;
d. vertex x and arc 7 form a subdigraph of D.

2. Of the following four digraphs, which two are the same, which one is isomorphic to these
two, and which is not isomorphic to any of the others?

3. Draw two non-isomorphic non-simple digraphs, each with 4 vertices and 7 arcs. Explain
why your digraphs are not isomorphic.
4. Write down the out-degree sequence and the in-degree sequence for each of the digraphs in
Exercise 2.
5. (a) If two digraphs have the same out-degree sequence and the same in- degree sequence,
must they be isomorphic?
(b) If two digraphs are isomorphic, must they have the same out-degree
sequence and the same in-degree sequence?
6. Draw a digraph with 4 vertices and 7 arcs such that the number of vertices with odd out-
degree is odd and the number of vertices with odd in-degree is odd.
7. For the digraph shown on the right, write down (if possible):
a. a walk of length 7 from 𝑢 to 𝑤;
b. cycles of lengths 1, 2, 3 and 4;
c. a path of maximum length.

Mathematics Program: By Werku Debele (MSc.) Page 146


Discrete Mathematics And Combinatorics (Math 393) 2012

8. Draw four connected digraphs, D1, D2, D3 and D4, each with 5 vertices and 8 arcs,
satisfying the following conditions:
Dl is a simple digraph;
D2 is a non-simple digraph with no loops;
D3 is a digraph with both loops and multiple arcs;
D4 is strongly connected.
9. Classify each of the following digraphs as disconnected, connected but not strongly
connected, or strongly connected:

10. A graph is orientable if a direction can be assigned to each edge in such a way that the
resulting digraph is strongly connected. Show that K5 and the Petersen graph are
orientable, and find a graph that is not.

11. Are the following digraphs Eulerian? Hamiltonian?

12. In the digraph on the right, find:


a. all cycles of lengths 3, 4 and 5;
b. an Eulerian trail;
c. a Hamiltonian cycle.

Mathematics Program: By Werku Debele (MSc.) Page 147


Discrete Mathematics And Combinatorics (Math 393) 2012

REFERENCE

[1]. Anderson, A First Course in Discrete Mathematics,2002.


[2]. C. Berge, Graphs and Hypergraphs, North-Hoi Land Publishing Company-
Amsterdam, 1976.
[3]. A. Bezdek, Discrete Geometry, Marcel Dekker, 2003.
[4]. N. L. Biggs, Discrete mathematics, Oxford University Press, 2002.
[5]. Eric W., "Discrete mathematics" from MathWorld.
[6]. Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied
Introduction 5th ed. Addison Wesley.
[7]. T. R. Hodkinson and J. A. N. Parnell, Reconstructing the Tree of Life: Taxonomy
and systematics of species rich taxa, CRC Press, 2007.
[8]. B. Hopkins, Resources for Teaching Discrete Mathematics, Mathematical
Association of America, 2008.
[9]. R. Johnsonbaugh, Discrete Mathematics, New Jersey, 2005.
[10]. R. Johnsonbaugh, Discrete Mathematics, Prentice Hall, 2008.
[11]. S. G. Krantz, Discrete Mathematics Demystified, McGraw-Hill, 2009.
[12]. B. Mohar and C. Thomassen, Graphs on Surfaces, Johns Hopkins University
press, 2001.
[13]. K.H. Rosen &J.G. Michaels, Handbook of Discrete and Combinatorial
Mathematics, CRC Press, 2000.
[14]. K. H. Rosen, Discrete Mathematics and Its Applications 6th ed. McGraw Hill.
[15]. R. J. Wilson, Introduction to Graph Theory, Longman, 1996.
[16]. D. B. West, Introduction to Graph Theory, 2005.

Mathematics Program: By Werku Debele (MSc.) Page 148


Discrete Mathematics And Combinatorics (Math 393) 2012

CHAPTER 6
MATRICES AND GRAPHS

Objectives: After studying this chapter, you should be able to:


 write down the adjacency matrix and incidence matrix of a given labelled graph
or digraph;
 draw the graph or digraph with a given adjacency or incidence matrix;
 use an adjacency matrix to determine the number of walks between two given
vertices in a graph or digraph;
 Utilize an adjacency matrix to determine whether a given graph/digraph is
connected/strongly connected;
 Illustrate the connections between adjacency matrices and problems in
archaeology and genetics;
 Illustrate the connections between adjacency matrices and Markov chains.
Introduction

Up to now, you have seen two ways of representing a graph or digraph - as a diagram
of points joined by lines, and as a set of vertices and a set of edges or arcs. The pictorial
representation is useful in many situations, especially when we wish to examine the
structure of the graph or digraph as a whole, but its value diminishes as soon as we
need to describe large or complicated graphs and digraphs. For example, if we need to
store a large graph in a computer, then a pictorial representation is unsuitable and some
other representation is necessary.

One possibility is to store the set of vertices and the set of edges or arcs. This method is
often used, especially when the graph or digraph is 'sparse', with many vertices but
relatively few edges or arcs. Another method is to take each vertex in turn and list those
vertices adjacent to it; by joining each vertex to its neighbours, we can reconstruct the
graph or digraph. Yet another method is to give a table indicating which pairs of
vertices are adjacent, or indicating which vertices are incident to which edges or arcs.

Each of these methods has its advantages, but the last one is particularly useful. Using
this method, we represent each graph or digraph by a rectangular array of numbers,

Mathematics Program: By Werku Debele (MSc.) Page 149


Discrete Mathematics And Combinatorics (Math 393) 2012

called a matrix. Such matrices lend themselves to computational techniques, and are
often the most natural way of formulating a problem. There are various types of matrix
that we can use to specify a given graph or digraph. Here we describe the two simplest
types - the adjacency matrix and the incidence matrix.

6.1 Adjacency Matrices

Objectives: After studying this topic, you should be able to:


 write down the adjacency matrix of a given labelled graph or digraph;
 draw the graph or digraph with a given adjacency matrix;
 use an adjacency matrix to determine the number of walks between two given
vertices in a graph or digraph;
 use an adjacency matrix to determine whether a given graph/digraph is
connected/strongly connected;
 describe the connections between adjacency matrices and problems in
archaeology and genetics;
 describe the connections between adjacency matrices and Markov chains.

Consider the following example:

On the left we have a graph with four labelled vertices, and on the right we have a
matrix with four rows and four columns - that is, a 4 𝑥 4 matrix. The numbers
appearing in the matrix refer to the number of edges joining the corresponding vertices
in the graph. For example,

vertices 1 and 2 are joined by 1 edge, so 1 appears in row 1 column 2, and in row 2
column 1;

Mathematics Program: By Werku Debele (MSc.) Page 150


Discrete Mathematics And Combinatorics (Math 393) 2012

vertices 2 and 4 are joined by 2 edges, so 2 appears in row 2 column 4, and in row 4
column 2;
vertices 1 and 3 are joined by 0 edges, so 0 appears in row 1 column 3, and in row 3
column 1;
vertex 2 is joined to itself by 1 edge, so 1 appears in row 2 column 2.

We generalize this idea, as follows.

Definition 6.1: Let G be a graph with n vertices labelled 1,2,3, . . . , 𝑛. The adjacency
matrix 𝐴( 𝐺) of G is the 𝑛 𝑥 𝑛 matrix in which the entry in row 𝑖 and column 𝑗 is the
number of edges joining the vertices 𝑖 and 𝑗.

The adjacency matrix of a graph is symmetrical about the main diagonal (top-left to
bottom-right). Also, for a graph without loops, each entry on the main diagonal is 0,
and the sum of the entries in any row or column is the degree of the vertex
corresponding to that row or column.

Example 6.1: For the graph


v1 e5 v4

e1 e3 e4

e6
v2 e2 v3

the adjacency matrix is


v1 v 2 v3 v 4
v1  0 1 0 1
 
v2  1 0 1 1
v3  0 1 0 2
 
v 4  1 1 2 0 
and the incidence matrix is
e1 e 2 e3 e 4 e5 e 6
v1 1 0 0 0 1 0
 
v2 1 1 0 0 0 1 .
v3 0 1 1 1 0 0
 
0 1 
v4  0 1 1 1

Mathematics Program: By Werku Debele (MSc.) Page 151


Discrete Mathematics And Combinatorics (Math 393) 2012

The representation of a graph by an adjacency matrix has a digraph analogue that is


frequently used when storing large digraphs in a computer. When defining the
adjacency matrix of a digraph, we have to take into account the directions of the arcs.

Consider the following example:

Example 6.2:

On the left we have a digraph with four labelled vertices, and on the right we have a
matrix with four rows and four columns. The numbers appearing in the matrix refer to
the number of arcs joining the corresponding vertices in the digraph. For example,

vertices 1 and 2 are joined (in that order) by 1 arc, so 1 appears in row 1 column 2;
vertices 2 and 4 are joined (in that order) by 2 arcs, so 2 appears in row 2 column 4;
vertices 4 and 1 are joined (in that order) by 0 arcs, so 0 appears in row 4 column 1;
vertex 2 is joined to itself by 1 arc, so 1 appears in row 2 column 2.

We generalize this idea, as follows.

Definition 6.2: Let D be a digraph with 𝑛 vertices labelled. 1, 2, 3, . . . , 𝑛. The


adjacency matrix 𝑨(𝑫) of D is the 𝑛 𝑥 𝑛 matrix in which the entry in row 𝑖 and column
𝑗 is the number of arcs from vertex 𝑖 to vertex 𝑗.

The adjacency matrix of a digraph is not usually symmetrical about the main diagonal.
Also, if the digraph has no loops, then each entry on the main diagonal is 0, the sum of
the entries in any row is the out-degree of the vertex corresponding to that row, and the
sum of the numbers in any column is the in-degree of the vertex corresponding to that
column.

Mathematics Program: By Werku Debele (MSc.) Page 152


Discrete Mathematics And Combinatorics (Math 393) 2012

Walks in Graphs and Digraphs

We can establish the existence of walks in a graph or digraph by using the adjacency
matrix. In the following, we restrict our attention to digraphs: similar results can be
derived for graphs.
Consider the following digraph and table:
Example 6.3:

The table shows the number of walks of length 1 between each pair of vertices. For
example,
the number of walks of length 1 from a to c is 0, so 0 appears in row 1 column 3;
the number of walks of length 1 from b to a is 1, so 1 appears in row 2 column 1;
the number of walks of length 1 from d to b is 2, so 2 appears in row 4 column 2.

Now a walk of length 1 is an arc, so the table above is the adjacency matrix A of the
digraph:

Next, we consider walks of lengths 2 and 3. For example, there are two different walks
of length 2 from 𝑎 to 𝑏, because there is one arc from a to 𝑑 and two arcs from 𝑑 to 𝑏.
Similarly, there are two different walks of length 3 from 𝑑 to 𝑑, since there are two arcs
from d to b, and one walk of length 2 from 𝑏 to d, namely, 𝑏𝑎𝑑.

The solution to the above problem illustrates the following theorem;

Mathematics Program: By Werku Debele (MSc.) Page 153


Discrete Mathematics And Combinatorics (Math 393) 2012

Theorem 6.1: Let D be a digraph with 𝑛 vertices labelled 1,2, . . . , 𝑛, let A be its
adjacency matrix with respect to this listing of the vertices, and let 𝑘 be any positive
integer. Then the number of walks of length 𝑘 from vertex 𝑖 to vertex 𝑗 is equal to the
entry in row 𝑖 and column 𝑗 of the matrix 𝐴𝑘 (the kth power of the matrix A).

Write down the adjacency matrix A, calculate the matrices A2 , A3 and A4 , and hence
find the numbers of walks of lengths 1, 2,3 and 4 from 𝑏 to 𝑑. Are there walks of
lengths 1, 2, 3 or 4 from 𝑑 to 𝑏?

Theorem 6.1 also gives a method of determining whether a digraph is strongly


connected, by working directly from its adjacency matrix.

Recall that a digraph is strongly connected if there is a path from vertex i to vertex j, for
each pair of distinct vertices i and j, and that a path is a walk in which all the vertices
are different. For example, in the digraph considered earlier, there are four vertices, so a
path has length 1, 2 or 3. We have seen that the numbers of walks (including the paths)
of lengths 1, 2 and 3 between pairs of distinct vertices are given by the non-diagonal
entries in the matrices

By examining these matrices, we can see that each pair of distinct vertices is indeed
joined by at least one path of length 1, 2 or 3, so the digraph is strongly connected.
However, we can check this more easily if we consider the matrix B obtained by
adding the three matrices together:

Mathematics Program: By Werku Debele (MSc.) Page 154


Discrete Mathematics And Combinatorics (Math 393) 2012

Let 𝑏𝑖𝑗 denote the entry in row 𝑖 and column 𝑗 in the matrix B. Then each entry 𝑏𝑖𝑗 is
the total number of walks of lengths 1, 2 and 3 from vertex 𝑖 to vertex 𝑗. Since all the
non-diagonal entries are positive, each pair of distinct vertices is connected by a path,
so the digraph is strongly connected.

We generalize this result in the following theorem; the proof is given at the end of this
section.

Theorem 6.2: let D be a digraph with 𝑛 vertices labelled 1,2, . . . , 𝑛, let A be its
adjacency matrix with respect to this listing of the vertices, and let B be the matrix

𝐵 = 𝐴 + 𝐴2 + ⋯ + 𝐴𝑛−1

Then D is strongly connected if and only if each non-diagonal entry in B is positive -


that is, 𝑏𝑖𝑗 > 0 whenever 𝑖 ≠ 𝑗.

Counting walks
 
Let A  aij be the adjacency matrix of a graph G with vertex set {v1 , v2 ,, vn } . The


n
(i, j ) th element of A2 is k 1
aik a kj and this is the number of walks of length 2 from

v i to v j .

Example 6.4: If G is v1 v2

v3 v4
then
0 1 1 0 2 1 1 2
   
1 0 1 1 1 3 2 1
A and A 
2
.
1 1 0 1 1 2 3 1
   
0 0  2 2 
 1 1  1 1

Hence, for example, the number of walks of length 2 from v2 to v3 is 2, and the number
of walks of length 2 from v2 to v2 is 3.

Generally, for any positive integer r, the number of walks of length r from vi to vj is
given by the (i, j ) th element of Ar .

Mathematics Program: By Werku Debele (MSc.) Page 155


Discrete Mathematics And Combinatorics (Math 393) 2012

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
1. Can you define a adjacency matrix of a graph? ...........................................
2. Can you define a adjacency matrix of a digraph? ........................................

Exercise 6.1

1. Write down the adjacency matrix of each of the following graphs:

2. Draw the graph represented by each of the following adjacency matrices:

3. Write down the adjacency matrix of each of the following digraphs:

4. Draw the digraph represented by each of the following adjacency matrices:

Mathematics Program: By Werku Debele (MSc.) Page 156


Discrete Mathematics And Combinatorics (Math 393) 2012

5. Complete the following tables for the numbers of walks of lengths 2 and 3 in the above
digraph.

b. Find the matrix products A2 and A3 , where A is the adjacency matrix of the
above digraph.
c. Comment on your results.
6. Consider the following digraph:

7. Find B for the digraph in Problem 5.6, and hence determine whether the digraph is
strongly connected.
8. Determine whether the digraph with the following adjacency matrix is strongly connected:

Mathematics Program: By Werku Debele (MSc.) Page 157


Discrete Mathematics And Combinatorics (Math 393) 2012

6.2. Incidence Matrices

Objectives: After studying this topic, you should be able to:


 write down the incidence matrix of a given labelled graph or digraph;
 draw the graph or digraph with a given incidence matrix;
 use an incidence matrix to determine the number of walks between two given
vertices in a graph or digraph;

For convenience, in this section we restrict our attention to graphs all digraphs with out
loops.

Whereas the adjacency matrix of a graph or digraph involves the adjacency of vertices,
the incidence matrix involves the incidence of vertices and edges or arcs. To see what
is involved, consider the following example:

On the left we have a graph with four labelled vertices and six labelled edges, and on
the righ t we have a matrix with four rows and six columns. Each of the numbers
appearing in the matrix is 1 or 0, depending on whether the corresponding vertex and
edge are incident with each other. For example,

vertex ① is incident with edge 4, so 1 appears in row 1 column 4;


vertex ②is not incident with edge 4, so 0 appears in row 2 column 4.

We generalize this idea, as follows.

Mathematics Program: By Werku Debele (MSc.) Page 158


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 6.3: Let G be a graph without loops, with 𝑛 vertices labelled ①, ②, ...,
and 𝑚 edges labelled 1,2, 3, . . . , 𝑚. The incidence matrix I(G) of G is the n x m matrix
in which the entry in row 𝑖 and column 𝑗 is

1 if the vertex 𝑖 is incident with the edge 𝑗


{
0 otherwise

In the incidence matrix of a graph without loops, each column contains exactly two 1s,
as each edge is incident with just two vertices; the sum of the numbers in a row is the
degree of the vertex corresponding to that row.

Whereas the adjacency matrix of a digraph involves the adjacency of vertices, the
incidence matrix of a digraph involves the incidence of vertices and arcs. Since an arc
can be incident from, incident to, or not incident with a vertex, we have to take account
of this when defining the matrix. To see what is involved, consider the following
example:

Example 6.5:

On the left we have a digraph with four labelled vertices and six labelled arcs, and on
the right we have a matrix with four rows and six columns. Each of the numbers
appearing in the matrix is 1, −1 or 0, depending on whether the corresponding arc is
incident from, incident to, or not incident with, the corresponding vertex. For example,

arc 4 is incident from vertex ①, so 1 appears in row 1 column 4;


arc 5 is incident to vertex ④, so -1 appears in row 4 column 5;
arc 4 is not incident with vertex ②, so 0 appears in row 2 column 4.

We generalize this idea, as follows.

Mathematics Program: By Werku Debele (MSc.) Page 159


Discrete Mathematics And Combinatorics (Math 393) 2012

Definition 6.4: Let D be a digraph without loops, with n vertices labelled ①, ②, ...,
and 𝑚 arcs labelled 1, 2,3, … , 𝑚. The incidence matrix I(D) of D is the 𝑛 𝑥 𝑚
matrix in which the entry in row𝑖 and column 𝑗 is

1 if arc j is incident from vertex i,


{−1 if arc j is incident to vertex,
𝑜 otherwise.

In the incidence matrix of a digraph without loops, each column has exactly one 1 and
one −1, since each arc is incident from one vertex and incident to one vertex; the
number of 1s in any row is the out-degree of the vertex corre- sponding to that row, and
the number of −1s in any row is the in-degree of the vertex corresponding to that row.

√ Check-List

Put a tick (√) mark if you can perform the task and a cross (x) mark if you can’t in the
box against the following questions.
3. Can you define a incidence matrix of a graph without loops? ..........................
4. Can you define a incidence matrix of a digraph without loops? .......................

Exercise 6.2

1. Write down the adjacency matrix A for K 5 . By working out A3 determine

a. the number of walks of length 3 from a vertex u to a distinct vertex v;


b. the number of triangles (i.e. cycles of length 3).
2. Write down the incidence matrix of each of the following graphs:

3. Draw the graph represented by each of the following incidence matrices:

Mathematics Program: By Werku Debele (MSc.) Page 160


Discrete Mathematics And Combinatorics (Math 393) 2012

4. Write down the incidence matrix of each of the following digraphs:

5. Draw the digraph represented by each of the following incidence matrices:

Chapter Summary

 The adjacency matrix for a loopless graph G is the n  n matrix whose ijth
element is the number of edges joining v i to v j .

 The adjacency matrix 𝐴(𝐷) of a directed graph D is the 𝑛 𝑥 𝑛 matrix in which


the entry in row 𝑖 and column 𝑗 is the number of arcs from vertex 𝑖 to vertex 𝑗.
 The incidence matrix of a loopless graph G is the n  m matrix whose ijth
element is 1 if v i is incident with e j and 0 otherwise.

 The incidence matrix I(D) of a digraph D is the 𝑛 𝑥 𝑚 matrix in which the entry
in row 𝑖 and column 𝑗 is
1 if arc j is incident from vertex i,
{−1 if arc j is incident to vertex,
𝑜 otherwise.

Mathematics Program: By Werku Debele (MSc.) Page 161


Discrete Mathematics And Combinatorics (Math 393) 2012

Self Test Exercise 6


1. (a) Write down the adjacency and incidence matrices for the following graph:

v1 v4
e1 e2
e3 e4
e5

v2 v3
e6

(b) Draw the graph with the adjacency matrix

0 1 1 1 1
 
1 0 1 0 1
1 1 0 0 0 .
 
1 0 0 0 1
1 0 
 1 0 1

(c) Draw the graph with the incidence matrix

0 0 0 1 0 1 0
 
1 0 1 1 0 0 1
1 1 0 0 0 0 0 .
 
0 1 1 0 1 1 0
0 1 
 0 0 0 1 0
2. Write down the adjacency matrices of the following graph and digraph.

3. Draw the graph corresponding to adjacency matrix (a) and the digraph corresponding to
adjacency matrix (b).

Mathematics Program: By Werku Debele (MSc.) Page 162


Discrete Mathematics And Combinatorics (Math 393) 2012

4. The following matrix is the adjacency matrix of a graph G.

Which three of the following statements are TRUE?


(a) G is connected; (b) G is regular;
(c) G is bipartite; (d) G is a tree;
(e) G is Eulerian; (f) G is Hamiltonian.
5. Consider the following digraph:

Write down the adjacency matrix A, calculate the matrices A2, A3 and A4, and hence find
the numbers of walks of lengths 1, 2, 3 and 4 from 𝑤 to 𝑢. Is there a walk of length 1, 2, 3
or 4 from 𝑢 to 𝑤?
6. Write down the incidence matrices of the following graph and digraph.

Mathematics Program: By Werku Debele (MSc.) Page 163


Discrete Mathematics And Combinatorics (Math 393) 2012

7. Draw the digraph whose incidence matrix is

8. The following matrix is the incidence matrix of a graph G. What is the adjacency matrix of
G with the same labelling?

REFERENCE

[1]. C. Berge, Graphs and Hypergraphs, North-Hoi Land Publishing Company-


Amsterdam, 1976.
[2]. A. Bezdek, Discrete Geometry, Marcel Dekker, 2003.
[3]. N. L. Biggs, Discrete mathematics, Oxford University Press, 2002.
[4]. Eric W., "Discrete mathematics" from MathWorld.
[5]. Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied
Introduction 5th ed. Addison Wesley.
[6]. T. R. Hodkinson and J. A. N. Parnell, Reconstructing the Tree of Life: Taxonomy
and systematics of species rich taxa, CRC Press, 2007.
[7]. B. Hopkins, Resources for Teaching Discrete Mathematics, Mathematical
Association of America, 2008.
[8]. R. Johnsonbaugh, Discrete Mathematics, New Jersey, 2005.
[9]. R. Johnsonbaugh, Discrete Mathematics, Prentice Hall, 2008.
[10]. S. G. Krantz, Discrete Mathematics Demystified, McGraw-Hill, 2009.
[11]. B. Mohar and C. Thomassen, Graphs on Surfaces, Johns Hopkins University
press, 2001.
[12]. K.H. Rosen &J.G. Michaels, Handbook of Discrete and Combinatorial
Mathematics, CRC Press, 2000.

Mathematics Program: By Werku Debele (MSc.) Page 164


Discrete Mathematics And Combinatorics (Math 393) 2012

[13]. K. H. Rosen, Discrete Mathematics and Its Applications 6th ed. McGraw Hill.
[14]. R. J. Wilson, Introduction to Graph Theory, Longman, 1996.
[15]. D. B. West, Introduction to Graph Theory, 2005.

Mathematics Program: By Werku Debele (MSc.) Page 165

You might also like