Discrete Lecture - Notes
Discrete Lecture - Notes
Discrete Lecture - Notes
This chapter develops some techniques for determining, without direct enumeration, the
number of possible outcomes of a particular event or the number of elements in a set. Such
sophisticated counting is sometimes called combinatorial analysis. It includes the study of
permutations and combinations
Suppose some event E can occur in m ways and a second event F can occur in n ways,
and suppose both events cannot occur simultaneously. Then E or F can occur in m + n
ways.
Example 1
How many students are there in your class? The class contains male students and female
students. Let A be the set of male students in your class and let B be the set of female
students in your class.
Simple observations:
1.A ∩ B = ∅ and
2. A ∪ B is the set of students in your class.
So, if |A| = 15 and |B| = 35, then there are a total of 15 + 35 = 50 students in your class.
Example 2
A student can choose a maths project from one of three lists. The three lists contain 23,
By Mesfin M, AAU
1.1 Basic counting principles 2
15, and 19 possible projects, respectively. No project is on more than one list. How many
possible projects are there to choose from?
Solution: The student can choose a project by selecting a project from the first list, the
second list, or the third list. Because no project is on more than one list, by the sum rule
there are 23 + 15 + 19 = 57 ways to choose a project.
Example 3
Suppose E is the event of selecting a prime number less than 10 and F is the event of selecting
an even number less than 10. Then E can happen in 4 ways, and F can happen in 4 ways.
But, because 2 is even and prime, E or F can happen in only 4+4-1=7 ways.
By Mesfin M, AAU
1.1 Basic counting principles 3
Example
1. To reach city D from city A, one has to pass through city B and then through city C. If
there are 2 ways to travel from city A to city B, 5 ways to travel from city B to city C and
3 ways from city C to city D, what is the number of ways to go from city A to city D via
city B and city C.
Solution: By multiplication principle, the number of ways is 2 ∗ 5 ∗ 3 = 30.
2. There are five different mathematics books, six different chemistry books, and eight dif-
ferent physics books. How many ways are there to pick an (unordered) pair of two books
not both in the same subject?
Solution: If one mathematics and one chemistry book are chosen, the multiplication prin-
ciple says that the selection can be done in 5 × 6 = 30 ways; if one mathematics and one
physics book, 5 × 8 = 40 ways; and if one chemistry and one physics book, 6 × 8 = 48
ways. These three types of selections are disjoint, and so by the addition principle there are
30 + 40 + 48 = 118 ways in all.
3. The digits 0, 1, 2, 3, and 4 are to be used in 4 digit identification card. How many
different cards are possible if
a) Repetitions are permitted.
b) Repetitions are not permitted
Solution
There are four steps
1. Selecting the 1st digit, this can be made in 5 ways.
2. Selecting the 2nd digit, this can be made in 4 ways.
3. Selecting the 3rd digit, this can be made in 3 ways.
4. Selecting the 4th digit, this can be made in 2 ways.
5*4*3*2 120 different cards are possible.
Exercise
Give your brief answer for the following questions.
1. Find the number of positive divisors of 600, inclusive 1 and 600 itself. (Ans=24)
2. How many two-digit numbers have distinct and non-zero digits? (Ans=72)
3. Each user on a computer system has a password, which is six to eight characters long,
where each character is an uppercase letter or a digit. Each password must contain at least
one digit. How many possible passwords are there?
By Mesfin M, AAU
1.2 Permutations and Combinations 4
n!
P (n, r) =
(n − r)!
3. The number of permutations of n objects in which k1 are alike, k2 are alike, ...,kn are
alike is given by:
n!
P (n; k1 , k2 , ..., kn ) =
k1 ! × k2 ! × ... × kn !
Note that: The third rule of permutation is called Permutation with repetitions.
Example
1. Suppose we have a letters A,B, C, D
2. Find the number of even integers between 20,000 and 70,000 in which no digit is repeated.
3. How many different permutations can be made from the letters in the word
“CORRECTION”?
4. How many integers between 100 and 999 inclusive consist of distinct odd digits?
5. There are 7 boys and 3 girls in a gathering. In how many ways can they be arranged in
a row, so that the 3 girls form a single block?
Solutions:
1. a) Here n = 4, there are four distinct objects
⇒ There are 4! = 24 permutations.
b) Here n = 4 and r = 2
By Mesfin M, AAU
1.2 Permutations and Combinations 5
4!
⇒ There are P (4, 2) = (4−2)! = 12 permutations.
2. Let abcde be a required even integer. The first digit a can be chosen from {2, 3, 4, 5, 6} and
the fifth digit e can be chosen from {0, 2, 4, 6, 8}. Since {2, 3, 4, 5, 6}∩{0, 2, 4, 6, 8} = {2, 4, 6},
we divide the problem in to two disjoint cases.
Case I: a∈ {2, 4, 6}, so a has 3 choices, e has 4 choices and bcd has P (10 − 2, 3) = P (8, 3)
choices. By MP, there are 3 × 4 × P (8, 3) = 4032 such even numbers.
Case II: a∈ {3, 5}, in this cases, a has 2 choices, e has 5 choices and bcd has P (10 − 2, 3) =
P (8, 3) choices, by MP, there are 2 × 5 × P (8, 3) = 3360 such even numbers.
Now by AP, the total number of required even numbers is 4032 + 3360 = 7392.
3. Here n = 10 of which 2 are C, 2 are O, 2 are R, 1E, 1T,1I,1N
⇒ k1 = 2, k2 = 2, k3 = 2, k4 = k5 = k6 = k7 = 1. Using permutation with repetitions we
have
10!
P (10; 2, 2, 2, 1, 1, 1, 1) = 2!×2!×2!×1!×1!×1!×1! = 453600 permutations.
4. The odd digits are 1, 3, 5, 7, 9; the even digits are 0, 2, 4, 6, 8. An integer such as 723 is
not to be counted because it contains the even digit 2; and an integer such as 373 is not
to be counted because it does not have distinct digits. The question amounts to asking for
the number of permutations of the five distinct digits 1, 3, 5, 7, 9, taken three at a time. The
answer is
5!
P (5, 3) = = 60.
(5 − 3)!
5. Since the 3 girls must be together, we can treat them as single entity. The number of
ways to arrange the 7 boys together with this entity is (7 + 1)! . As the girls can permute
among themselves within the entity in 3! ways, the desired number of ways is, by MP, 8!3!.
Exercises:
1. Six different mathematics books, seven different physics books, and 3 different computer
books are arranged on a shelf. How many different arrangements are possible if;
a. The books in each particular subject must all stand together
b. Only the statistics books must stand together
2. If the permutation of the word “WHITE” is selected at random, how many of the
permutations
a. Begins with a consonant?
b. Ends with a vowel?
c. Has a consonant and vowels alternating?
3. What is the number of ways to order the 26 letters of the alphabet so that no two of the
vowels a,e,i,o and u occur consequently? (Ans = 21! ∗ P (22, 5))
By Mesfin M, AAU
1.2 Permutations and Combinations 6
Solution:
If we label the persons A, B, C, D, E, we see that the five linear permutations
are identical when thought of as circular permutations. This is so because two arrangements
of people around table are considered to form the same circular permutation if one can be
obtained from the other by rotating everybody around the circle by the same amount and
in the same direction. This is the case, for example, if everybody moves one place to his
right. Hence we can get at the number of circular permutations by relating them to the
linear permutations: each circular permutation corresponds to five linear permutations, so
there are only 51 as many circular permutations as there are linear permutations. But there
are 5! linear permutations of five objects, and hence the answer to the question is
1
(5!) = 4! = 24.
5
Hence number of r-circular permutation of a set A with n objects is
P (n, r) n!
Q(n, r) = =
r r(n − r)!
Example:
In how many ways can 5 boys and 3 girls be seated around a table if
i. There is no restriction?
ii. Boy B1 and girl G1 are not adjacent?
iii. No girls are adjacent?
Solution:
i. The number of ways is Q(8, 8) = (8 − 1)! = 7!.
ii. The 4 boys and 3 girls not including B1 can be seated in Q(7, 7) = (7 − 1)! = 6! Ways.
Given such an arrangement B1 has (7 − 2) = 5 choices for a seat not adjacent G1 , this is
equals to 6! ∗ 5 = 3600.
iii. We first seat the 5 boys around the table in (5−1)! = 4! ways. Given such an arrangement
there are 5 ways to seat G1 . As no girls are adjacent, G2 and G3 have 4 and 3 choices,
respectively. Thus the desired number of ways is 4! ∗ 5 ∗ 4 ∗ 3 = 1440.
1.2.3 Combinations
A selection of objects with out regard to order is called combination. , i.e. a combination of
a set of objects is an unordered selection of the objects. Thus, an r-combination is simply a
subset of the set with r elements(r-subsets).
Note that:Permutation is an ordered arrangement of objects and Combination is a selection
By Mesfin M, AAU
1.2 Permutations and Combinations 7
without regard to order. Example: Given the letters A, B, C, and D list the permutation
and combination for selecting two letters.
Solutions:
Permutation Combination
AB BA CA DA AB BC
AC BC CB DB AC BD
AD BD CD DC AD DC
Note that in permutation AB is different from BA. But in combination AB is the same
as BA.
Combination Rule
The number of combinations of r objects selected from n objects without repetition is denoted
by C(n, r) or nr , where 0 ≤ r ≤ n and is given by the formula:
n P (n, r) n!
C(n, r) = = = .
r r! r! ∗ (n − r)!
These numbers are also called binomial coefficients. Note that: The symbol C(n, r) or nr
Solutions
1. The number of ways is
11
a) 5 = 462
b) 42 73 = 210
c) 93 , because T1 and T2 are already chosen
4 7 4 7
d) 3 2 + 4 1
By Mesfin M, AAU
1.2 Permutations and Combinations 8
e) 11 9 9
5
− 3
= 378, since there are 3
ways to form a committee which contains a particular
teacher and a particular student.
2. Note that every route consists of 7 continuous segments of which
4 are horizontal and 3
are vertical. The number of shortest route is then 73 = 74 = 3+4
3
= 35.
2. The number of selections, with unrestricted repetition of size r from a collection of size
n.
x 1 + x2 + x3 = 5 (1.1)
By Mesfin M, AAU
1.2 Permutations and Combinations 9
/ /
Iced tea hot tea coffee
Mark each person’s selection by an X in the appropriate area. For instance, the distri-
bution XX / X / XX indicates that two people selected iced tea, one selected hot tea, and
two selected coffee; the distribution XXX/ /XX means, three people selected iced tea, none
ordered hot tea, and two selected coffee.Thus the number of possible beverage orders equals
the number of permutations of seven items (five X’s and two /’s) of which five are alike (X’s)
and the other two are alike (/’s):
7!
= = 21.
2!5!
2. a) 10+4−1 13
10
= 10
b) 6+4−1 = 96 = 84.
6
3. Here we have r = 5 and n = 3. By Theorem (1), the number of solutions is C(n+r−1, r) =
C(3 + 5 − 1, 5) = C(7, 5) = 21.
Can you list all the solutions?
Taking this example a step further, suppose you would like to find all solutions of equation
(1.1)in the above example, where x1 , x2 , x3 ≥ 1. To find the number of solutions for this
equation, make the substitution yi = xi − 1, 1 ≤ i ≤ 3. Clearly, yi ≥ 0. After this
substitutions, equation (1.1) becomes y1 + y2 + y3 = 2, Where yi are nonnegative integers.
By Theorem (1), the number of solutions for this equation is C(n+r−1, r) = C(3+2−1, 2) =
C(4, 2) = 6.
Those are: (0,1,1),(1,0,1),(1,1,0),(2,0,0),(0,2,0),and (0,0,2). Consequently, Equation (1) with
xi ≥ 1 has six solutions those are:
(1,2,2),(2,1,2),(2,2,1),(3,1,1),(1,3,1),and (1,1,3).
Theorem 2. Let S = {a1 , a2 , a3 , ..., an } be a set with n elements. Then, the number of
combinations of size r taken from S with the property that the element ai must be repeated
at least Si times in any combination is
n + (r − S1 − S2 − ... − Sn − 1)
n−1
Example
The number of combinations of size 10 taken from a set S = {a, b, c, d, e, f } with the property
that a must be repeated
at10least twice b repeated at least 3 times is
6+(10−2−3−0−0−0−0−1)
6−1
= 5 .
Exercise
1. Consider a group of 20 people. If everyone shakes hands with everyone else, how many
handshakes take place?
2. Out of 5 Mathematician and 7 Statistician a committee consisting of 2 Mathematician
and 3 Statistician is to be formed. In how many ways this can be done if:
By Mesfin M, AAU
1.3 The Inclusion- Exclusion principles 10
a) There is no restriction
b) One particular Statistician should be included
c) Two particular Mathematicians can not be included on the committee.
3. A committee of k people is to be chosen from a set of 7 women and 4 men. How many
ways are there to form the committee if:
(a) The committee has 5 people, 3 women and 2 men. (Ans 210 ways)
(b) The committee can be any positive size but must have equal numbers of women and
men. (Ans 329 ways)
(c) The committee has 4 people and one of them must be Mr. Abebe. (Ans 120 ways) 4.
Seven friends go to a restaurant for lunch and order from the menu that has four items: fish,
meat, vegetable or pasta. How many different orders are there? (Ans.=120)
5. How many positive integers less than 1000,000 have the sum of their digits equals to 9?
14
(Ans 9 )
6. How many solutions in a non negative integers are there to
34 23
a) x1 + x2 + x3 + x4 + x5 = 30 and x1 ≤ 10 (Ans 10
− 19
)
b) x1 + x2 + x3 + x4 ≤ 30 (Ans 34
10
)
S1 = ni=1 |Ai |,
P P P
S2 = 1≤i<j≤n |Ai ∩ Aj |, S3 = 1≤i<j<k≤n |Ai ∩ Aj ∩ Ak |,
Sn = |A1 ∩ A2 ∩ A3 ∩ ... ∩ An |
With the notations as defined above, we have the following theorem, called the inclusion-
exclusion principle.
Theorem 4. (Inclusion-Exclusion Principle) Let A1 , A2 ,..., An be n subsets of a finite set
U . Then the number of elements of U that are in none of A1 , A2 ,..., An is given by:
|AC C C n
1 ∩ A2 ∩ ... ∩ An | = |U | − S1 + S2 − S3 + ... + (−1) Sn = |U | − |A1 ∪ A2 ∪ ... ∪ An |.
By Mesfin M, AAU
1.3 The Inclusion- Exclusion principles 11
Where,
|A1 ∪ A2 ∪ ... ∪ An | = S1 − S2 + S3 − S4 + ... + (−1)n−1 Sn .
Examples
1. How many bit strings of length eight either start with a 1 bit or end with two bits 00?
2. Let U = {1, 2, 3, ..., 500}. Then find
a) The number of integers in U which are divisible by 2, 3, or 5.
b)The number of integers in U which are divisible by none of 2, 3, or 5.
3. How many combination of size 13 are there taken from the set S = {a1 , a2 , a3 } with the
property that a1 can be repeated at most 4 times, a2 can be repeated at most 5 times, a3
can be repeated at most 6 times.
Solutions:
1. Let A be set of bit strings of length eight that start with 1 and B be set of bit strings
of length eight that end with 00. Then A ∩ B is set of bit strings of length eight that start
with 1 and end with 00. This implies that,
|A| = 27 , |B| = 26 and |A ∩ B| = 25 . By Inclusion-Exclusion principle,
|A ∪ B| = |A| + |B| − |A ∩ B|= 27 + 26 − 25 = 160.
Hence, there are 160 bit strings of length eight that start with 1 or end with 00.
2. First note the following facts,
i. The number of integers in U which are divisible by n ∈ N is b 500 n
c, an integer less or equal
to 500
n
. i.e., b 500
n
c ≤ 500
n
.
ii. For a, b, c ∈ N, c is divisible by both a and b if and only if c is divisible by the LCM of a
and b.
By Mesfin M, AAU
1.4 The Pigeonhole Principle 12
Excersise
Find the number of integers between 1 and 1000, inclusive, which are divisible by none of 5,
6 or 8.
Proof. We prove the pigeonhole principle using proof by contraposition. Suppose that none
of the n boxes contains more than one object. Then the total number of objects would be at
most n. This is a contradiction, because there are at least n + 1 objects.
We will illustrate the usefulness of the pigeonhole principle. We first show that it can be
used to prove a useful corollary about functions.
Corollary 1. A function f from a set with k + 1 or more elements to a set with k elements
is not one-to-one.
Proof. Suppose that for each element y in the codomain of f we have a box that contains
all elements x of the domain of f such that f (x) = y. Because the domain contains k + 1 or
more elements and the codomain contains only k elements, the pigeonhole principle tells us
that one of these boxes contains two or more elements x of the domain. This means that f
cannot be one-to-one.
Examples
1. Among any group of 367 people, there must be at least two with the same birthday,
By Mesfin M, AAU
1.5 The Binomial Theorem 13
Example
1. Expand (x2 + 3y)4 using binomial theorem.
2. What is the coefficient of x3 y 4 in the expansion of (2x + y 2 )5 ?
Solutions:
1. (x2 + 3y)4 = 40 (x2 )4 + 41 (x2 )3 (3y) + 42 (x2 )2 (3y)2 + 43 x2 (3y)3 + 44 (3y)4
2. Let z = y 2 , then apply binomial theorem to (2x + z)5 , and find the coefficient 3 2
of x z .
3 2 5 3 2 3 2 3 4 5 3
The term involving x z is 2 (2x) z . Hence the coefficient of x z = x y is 2 2 = 80.
Exercise
1. Expand (2xy − y3 )5 using binomial theorem.
2. What is the coefficient of x3 y 194 in the expansion of (2x + y 2 )100 ?
3. Find the constant
Pn term in the expansion of (2x2 − x1 )12 . (Ans 7920)
n k
4. Show that k=0 k 2 = 3n
By Mesfin M, AAU
1.5 The Binomial Theorem 14
1.5.2 Multinomial
We have seen the value of binomial coefficients in expanding a power of a binomial. It
is natural to ask whether a similar family of coefficients might prove helpful when we wish
to expand a power of a ”trinomial” (x+y+z) or in general a ”multinomial” (x1 +x2 +...+xm ).
By Mesfin M, AAU
1.5 The Binomial Theorem 15
Exercise
1. Prove the
following using the idean of
Pascal identity
n n n n n
i. 0 − 1 + 2 − 3 + ... + (−1) n = 0
ii. n0 − n1 + n2 − n3 + ... + (−1)k nk = (−1)k n−1
k
2. Expand (2x1 − x2 + 3x3 )4 .
By Mesfin M, AAU
1.5 The Binomial Theorem 16
Worksheet 1
1. a) How many permutations of size 3 can one produce with the letters p,r,m and n? List
them.
b) List all combinations of size 3 that one produce with the letters p,r,m,t and n?
2. m boys and n girls are to be arranged in a row, where m, n ∈ N with n ≥ m. Find the
number of ways this can be done in each of the following cases:
a) There are no restrictions;
b) No boys are adjacent;
c) The n girls make a single block;
d) A particular boy and a particular girl must be adjacent.
3. In how many ways can 7 boys and 2 girls be lined up in a row such that the girls must
be separated by exactly 3 boys?
4. New licence plates in Addis Ababa start with a letter (English alphabet) followed by five
digits. How many different license plates can be made if
a) Repetition of digits is allowed
b) Repetition of digits is not allowed
c) The letters R and Q are not used with no repetition of digits.
d) Vowels are not used and the numbers begin with odd digits and end in even digits.
5. Find the value(s) of n in each of the following
a) P (n, 2) = 90 c) P (n, 3) = 3P (n, 2)
b) 2P (n, 2) + 50 = P (2n, 2) d) 6P (n, 1) = P (n, 3)
6. For all positive integersm and n show that
a) n m+n = (m + 1) m+n b) For n > 1, n2 + n−1
m m+1 2
is a perfect square
7. Determine x if 50 50 r 100
P
r=0 r 8 = x
8. Find the coefficient of x4 y 2 in the expansion of (2x − 3y)6 .
9. Determine the number of positive integers whose decimal expansion contains exactly 4
digits, doesnt contain equal digits, and doesnt contain the digit 3.
10. How many integers between 1 and 1000 have all their digits different and dont contain
the digit 5 in their decimal expansion?
11. How many bit strings of length 10 contain at least three 1s and at least three 0s.
12. Find the number of positive integers less than 601 that are not divisible by 3 or 5 or 7.
13. Find the number of even integers between 10,000 and 60,000 in which no digit is repeated.
14. 25 points, no 3 collinear (no three of the points lie on a line), are given in the plane.
How many streight lines do they determines? How many triangle do they determine?
15. In a certain part of our town, the streets form a square grid, and each street is one-way
to the north or to the east. Let us assume that our car is currently at the southwest corner
of this grid, which we will denote by O(0,0) as shown below:
A. In how many ways can drive to the point X=(6,4)?
B. In how many ways can we drive to the point X, if we want to stop at the bakery at
By Mesfin M, AAU
1.5 The Binomial Theorem 17
Y=(4,2)?
C. In how many ways can we drive to the point X, if we want to stop at either the ice cream
shop at U=(3,2) or at the coffee shop at V=(2,3)?
D. In how many ways can drive to the point X, if the street UY is closed?
16. How many ways are there to put 30 identical balls into 5 different boxes if each box
must contain at least 3 balls?
17. How many solutions are there of the equation x1 + x2 + x3 + x4 = 6 where each
xi , i ∈ {1, 2, 3, 4} is a non-negative integer?
18. Show that among any n + 1 positive integers not exceeding 2n there must be an integer
that divides one of the other integers.
19. Assume that in a group of six people, each pair of individuals consists of two friends or
two enemies. Show that there are either three mutual friends or three mutual enemies in the
group.
20. How many non negative integer solutions are there to the equation x1 + x2 + x3 + x4 +
x5 + x6 = 29 such that
c) x1 ≤ 5
21. How many positive integers less than 1,000,000 have exactly one digit equal to 9 and
have a sum of digits equal to 13?
22. How many combinations of size 25 are there taken from a set S = {a1 , a2 , a3 }, with
the property that a1 must be repeated at least two times but at most 8 times. a2 must be
repeated at least three times but at most 12 times. a3 must be repeated at least seven times
but at most 10 Ptimes.
23. Show that ni1 +i2 +...+ik =n i1 !i2n!!...ik ! = k n .
By Mesfin M, AAU
Chapter 2
Recurrence Relation
A sequence can be defined by giving a general formula for its nth term or by writing few of
its terms. An alternative approach is to write the sequence by finding a relationship among
its terms. Such a relationship is called a recurrence relation or sometimes called difference
equation.
Definition 1. A recurrence relation for the sequence {an } is an equation that relates an
interms of one or more of the previous terms of the sequence, namely a0 , a1 , ..., an−1 for all
integers n >= n0 , where n0 is a non negative integer. The values a0 , a1 , ..., an−1 are explicitly
given values and are not defined by recursive formula. They are called initial conditions or
boundary conditions of the recurrence relation.
Definition 2. Initial condition: the information about the beginning of the sequence.
with f (n) is a function and c1 , c2 , ..., ck are constants. Then this Recurrence Relation is
called
i. Homogeneous Recurrence Relation of degree k if f (n) = 0.
ii. Non homogeneous Recurrence Relation if f (n) 6= 0.
2. A Recurrence Relation is non-linear if it is expressed as a power or product of terms of a
sequence. Otherwise it is called linear Recurrence Relation.
Example: Which of the following Recurrence Relations are homogeneous, non-homogeneous,
linear and non-linear?
1. an − 3an−1 + 2an−2 = 0
By Mesfin M, AAU
2.2 Recurrence Relation Models 19
4. an − 3an−1 + 2an−2 + 5 = 0
5. an − 3an−1 + 2an−2 = 2n − 4
By Mesfin M, AAU
2.3 Solving Recurrence Relations 20
hn = 2hn−1 + 1, n > 1
with initil condition h1 = 1.
By Mesfin M, AAU
2.3 Solving Recurrence Relations 21
We call this equation the characteristic equation of the recurrence relation. The roots of the
characteristic equation are called characteristic roots.
Examples
Solve the following recurrence relations with the given initial values.
1. an = 2an−1 + 3an−2 , with initial conditions a0 = 0, and a1 = 8.
2. an = 2an−1 + an−2 − 2a−3 (n ≥ 3), with initial values a0 = 1, a1 = 2 and a2 = 0.
Solutions
1. The characteristic equation of this RR is x2 − 2x − 3 = 0 , whose roots are r1 = −1, and
r2 = 3. Hence the solution to this RR must be of the form an = c1 (−1)n + c2 (3)n ,with the
given initial conditions we get
an = −2(−1)n + (3)n
2. The characteristic equation of the recurrence relation is x3 − 2x2 − x + 2 = 0, and it has
three roots: r1 = 1, r2 = −1 and r3 = 2. Then we have
an = c1 (1)n + c2 (−1)n + c3 (2)n = c1 + c2 (−1)n + c3 (2)n is the general solution. Now we are
By Mesfin M, AAU
2.3 Solving Recurrence Relations 22
going to find the value of the constants c1 , c2 ,and c3 using the initial values. So that
c1 + c2 + c3 = 1,
c1 − c2 + 2c3 = 2,
c1 + c2 + 4c3 = 0
an = (c11 +nc12 +...+n(m1 −1) c1m1 )r1n +(c21 +nc22 +...+n(m2 −1) c2m2 )r2n +...(ct1 +nct2 +...+n(mt −1) ctmt )rtn .
for n = 0, 1, 2, ..., where ci,j are constant is the general form of the solutions for the HRR
an = q1 an−1 + q2 an−2 + ... + qk an−k .
Examples
Solve the following recurrence relation with the given initial values.
1. an = −6an−1 − 9an−2 , with initial conditions a0 = 2, and a1 = −3.
2. an = 4an−1 − 4an−2 for n ≥ 4 where a2 = 1 and a3 = 4.
3. an = 7an−1 − 15an−2 + 9an−3 for n ≥ 3 where a0 = 1, a1 = 2 and a2 = 3.
Solution:
1. The characteristic equation of this recurrence relation is x2 +6x+9 = 0, with characteristic
roots r1 = r2 = −3
Hence the solution of this RR must be of the form an = c1 (−3)n + c2 n(−3)n . After
substituting the initial values we get, an = 2(−3)n − n(−3)n = (2 − n)(−3)n
2. The characteristic equation of this recurrence relation is x2 −4x+4 = 0, with characteristic
roots r1 = r2 = 2
Hence the solution of this RR must be of the form an = c1 2n + c2 n2n . After substituting
the initial values we get, an = 81 n2n = n2n−3
3. The characteristic equation of this recurrence relation is x3 − 7x2 + 15x − 9 = 0, with
characteristic roots r1 = 1, r2 = r3 = 3
Hence the solution of this RR must be of the form an = c1 1n +c2 3n +nc3 3n . After substituting
the initial values we get, an = 3n − 31 n3n = 3n−1 (3 − n).
Exercise
Solve the following recurrence relation with the given initial value.
1. an+2 − 5an+1 + 6an = 0 for n ≥ 3 where a0 = 1, a1 = −1.
2. an − 12an−1 + 48an−2 − 64an−3 = 0 for n ≥ 3 where a0 = 1, a1 = 4 and a2 = 32.
By Mesfin M, AAU
2.3 Solving Recurrence Relations 23
2. Find a particular solution for the given non homogeneous recurrence relation denoted
by apn
3. Combine the general solution of the homogenous recurrence relation and the particular
solution and determine the values of the constants arising in the general solution so
that the combined solution satisfies the initial conditions. i.e, an = ahn + anp
Note that: We find the values of the constants after we get the general solution, not only
after we get the homogeneous solution!!!
Examples
Solve the following recurrence relation with the given initial value.
1. an = 2an−1 + 3n , (n ≥ 1) ,with initial conditions a0 = 2.
2. an − 3an−1 = 2 − 2n2 ,with initial conditions a0 = 3.
Solutions:
1. Since the homogeneous recurrence relation an = 2an−1 , has only one characteristic root
r = 2, its general solution is ahn = c2n
The particular solution of an = 2an−1 + 3n , is in the form of apn = k3n , where k is constant.
By substituting it in the given LNHRR we get
k3n = 2k3n−1 +3n , after cancellation it reduces to, 3k = 2k +3 or equivalently, k = 3. Hence,
an = c2n + 3n+1 is a solution for each choice of the constants c. We now want to determine
c so that the initial condition a0 = 2 is satisfied. This gives c = −1 and the solution of the
problem is an = −2n + 3n+1 , (n ≥ 1).
2. First find ahn by solving an − 3an−1 = 0. The characteristic equation is x − 3 = 0, implies
x = 3 is the characteristic root. Therefore, ahn = A3n , where A is a constant.
To find apn , since f (n) = 2 − 2n2 is a polynomial of degree 2, we let apn = Bn2 + Cn + D,
where B, C and D are constants then, Bn2 +Cn+D −3(B(n−1)2 +C(n−1)+D) = 2−2n2 .
This yields by equating corresponding coefficients, we have
B − 3B = −2
C + 6B − 3C = 0
−3B + 3C − 2D = 2
By Mesfin M, AAU
2.4 System of linear Recurrence relations 24
By Mesfin M, AAU
2.4 System of linear Recurrence relations 25
Worksheet II
1. Find recurrence relations that are satisfied by the sequence formed from the following
functions.
n!
a)an = 15! b) an = n2 − 6n + 8
2. Find a cubic polynomial whose roots are 5, −1, and 3. Then find a LHRRWCC with this
characteristic polynomial.
3. Solve the following recurrence relations by inspection.
a) an = 2an−1 for n > 1, a1 = 1. c) an = an−1 +k for n > 0, a1 = 1 and k constant.
b) an = an−1 + (2n − 2) for n > 1, a1 = 0. d) an = an−1 + (n − 1)2 for n > 1, a1 = 1
4. Show that an = 4 , an = n4 , and an = 2.4 + 3n.4n are all solutions of the same recur-
n n n
By Mesfin M, AAU
2.4 System of linear Recurrence relations 26
7. What is the general form of the particular solution of the linear nonhomogeneous recur-
rence relation an = 6an−1 − 12an−2 + 8an−3 + F (n) if
a) F (n) = n2 ? d) F (n) = n2 2n ?
n
b) F (n) = 2 ? e) F (n) = n3 (−2)n ?
c) F (n) = n2n ? f) F (n) = 3?
8. An employee joined a company in 1987 with a starting salary of 50, 000. Every year this
employee receives a raise of 1000 plus 5% of the salary of the previous year. Then
a) Find a recurrence relation for the salary of this employee n years after 1987.
b) Find an explicit formula for the salary of this employee n years after 1987.
c) What is the salary of this employee in 1995?
9. Find a recurrence relation for the number of binary strings of length n that do not contain
the pattern 0000 and find the initial values.
10. Suppose that each year you deposit d birr into a bank account, at an annual interest
rate equal to i%. Find a recurrence relation for the amount in your account at the end of
n-years. Solve the recurrence relation.
By Mesfin M, AAU
Chapter 3
Example
1. G1 = (V1 , E1 ), where V1 = {a, b, c, d, e} and
E1 = {{a, b}, {a, d}, {b, c}, {b, e}, {b, d}, {c, d}, {c, e}, {d, e}}.
E2 = {{1, 2}, {1, 3}, {1, 6}, {2, 3}, {2, 5}, {2, 4}, {3, 5}, {3, 6}, {4, 5}, {5, 6}}.
Graphs are usually represented pictorially by drawing dots (or circles) for the vertices and
joining two dots if the corresponding vertices form an edge.
Note that: The shape of an edge or the position of a vertex in the plane are not importance
in graph. What matter is:
By Mesfin M, AAU
3.1 Definition and Examples of a graph 28
a 1
b c 2 6
d e 3 5
4
G1 G2
Figure 3.1: Pictorial representations of graphs G1 and G2
All graphs are generally divided into two main classes, simple graphs and multi graphs.
The classifications depends on the presence or absence of two features, loops and multiple
edges.
Definition 4. An edge for which the two ends are the same is called a loop at the common
vertex. A set of two or more edges of a graph is called a set of multiple edges if they have
the same ends.
Definition 5. A graph is simple if it has no loops and no multiple edges. A graph is
considered a multi graph if it contains at least one loop or multiple edge.
Next, we will define some important terms used when describing a graph.
Definition 6. The order of a graph G is the cardinality of V (G), denoted |V (G)| or |G|.
The size of a graph G is the cardinality of E(G), denoted |E(G)| or ||G||.
Example: In the above graphs G1 and G2 , we have |V (G1 )| = 5, |E(G1 )| = 8 and
|V (G2 )| = 6, |E(G2 )| = 10.
Definition 7. Given u, v ∈ V , if uv ∈ E, then u and v are adjacent vertices. If an edge
e has a vertex v as an end, then v and e are incident. Two edges e and f are adjacent if
they have a vertex in common.
Example: Recall the graph G1 from before:
• Vertices a and b are adjacent.
By Mesfin M, AAU
3.1 Definition and Examples of a graph 29
We can obtain a formula for the number of edges in the complete graph with n vertices, using
the following reasoning. Each edge in the graph corresponds to a selection of two distinct
vertices from the set of n vertices, without taking order into account. This selection can be
carried out in 2 ways. Hence the number of edges in Kn is 2 , which equals n(n−1)
n n
2
.
Definition 9. The neighborhood of a vertex v, denoted N (v), is the set of vertices adjacent
to v. The degree dG (v) = d(v) of a vertex v is the number of edges incident to v. Equivalently,
d(v) = |N (v)|. A vertex of degree 0 is called an isolated vertex.
The minimum degree of G is δ(G) = min{d(v) : v ∈ V }. The maximum degree of G is
4(G) = max{d(v) : v ∈ V }. If dG (v) = k for all v ∈ V , then G is called a k-regular graph
(or, simply, a regular graph). A complete graph Kn is (n − 1)-regular.
K1 K2 K3 K4 K5 K6
Exercise:
1. Give an example of a 2-regular graph, a 3-regular graph.
2. Find δ(Kn ) and 4(Kn ).
There is a simple relationship between the degrees of the vertices of any graph and the
number of edges of the graph. It is given by the following lemma.
The lemma follows immediately from the fact that if we add the degrees of all the vertices,
every edge will be counted twice, since each edge is incident to two vertices.
By Mesfin M, AAU
3.1 Definition and Examples of a graph 30
Exercise
Let G be a simple graph with 5 vertices. If each vertex of G is adjacent with any two other
vertices, then find the number of edges of G.
Definition 10. Let G = (V, E) be a graph with V = {v1 , v2 , ..., vn }. The degree sequence of
G is a non increasing sequence of non negative integers d1 , d2 , d3 , ...., dn , where di = deg(vi ).
Example:
The degree sequence of the following graph G is 3,3,2,1,1.
a b
c d e
G
Figure 3.3:
Obviously, for any graph G, there exists a non increasing sequence of non negative integers
which is the degree sequence of G. Is the converse is true? i.e., given a non increasing
sequence of non negative integers does there always exists a graph G corresponding to it?
Example
1. Does 5,4,3,2,1 correspond to a graph?
2. Does 4,3,2,1 correspond to a graph?
Theorem 10. A sequence of non P increasing and non negative integers d1 , d2 , d3 , ...., dn cor-
responds to a graph if and only if ni=1 di = 2k for some non negative integer k.
Definition 11. A sequence of non increasing and non negative integers is said to be graphic
if it is a degree sequence of a simple graph.
Exercise
1. Show that the following sequence are graphic.
a) 4,2,2,1,1 b) 4,4,4,4,4
a) 4,3,2,1 b) 7,6,5,4,3,3,2
Pn
Note that: If a degree sequence d1 , d2 , d3 , ...., dn is graphic, then i=1 di is even.
By Mesfin M, AAU
3.2 Matrix representation of a graph 31
Definition 12. (Adjacency Matrix). Let G = (V, E) be a graph and assume that V =
{v1 , v2 , ..., vn }. The adjacency matrix of G is an n × n matrix M defined as:
0, if vi vj ∈
/ E,
Mi,j = 1, if vi vj ∈ E and vi vj is not a loop,
2, if vi vj ∈ E and vi vj is a loop
Note that:
1. Mi,j is the number of edges joining vi and vj .
2. The adjacency matrix of a (simple) graph is symmetric with respect to its diagonal
consisting of zeros because simple graphs do not have loops.
A graph has usually many different adjacency matrices, one for each ordering of its set V of
vertices. a graph with n vertices could have up to n! different adjacency matrices because
there are n! different ways in which n items can be arranged.
Exercise
1. Write down the adjacency matrix of the following graphs.
a b e a b
d c
c d e
f
a) b)
Figure 3.4:
By Mesfin M, AAU
3.2 Matrix representation of a graph 32
Definition 13. (Incidence Matrix). Let G = (V, E) be a graph with V = {v1 , v2 , ..., vm }
and E = {e1 , e2 , ..., en }. Then the incidence matrix of G is an m × n matrix A with:
0, if vi is not incident with ej
Ai,j = 1, if vi is incident with ej and ej is not a self loop
2, if vi is incident with ej and ej is a self loop
Theorem 11. Let G = (V, E) be a graph with V = {v1 , v2 , ..., vm } and E = {e1 , e2 , ..., en }
with incidence matrix A. The sum of every column in A is 2 and the sum of each row in A
is the degree of the vertex corresponding to that row.
Now consider any row in A, it corresponds to a vertex v of G. The entries in this row
are 1 if there is some edge that is adjacent to v and 2 if there is a loop at v. Adding these
values up yields the degree of the vertex v. This completes the proof.
Note that the adjacency matrix of a graph involves adjacency of vertices, where incidence
matrix of a graph involves incidence of vertices and edges.
Exercise
1. Write down the incidence matrix of the following graphs.
a b c
a b c
d
f
e d
e
g
a) b)
Figure 3.5:
By Mesfin M, AAU
3.3 Subgraph 33
0 1 1 0 0 0 1
0 1 0 1 1
1 0 0
1 1 0 0 0 1 0
1 0
1 0 0 1 0 0 0
0 0 1
a) 0 0 b)
0 1 1
0 0 0 0 0 1 1
0 0
0 0 0 1 1 0 0
1 0 0 0 1
0 0 1 0 1 1 0
3.3 Subgraph
Definition 14. A graph H is called a subgraph of a graph G, written H ⊆ G, if V (H) ⊆
V (G) and E(H) ⊆ E(G). If H ⊆ G but H 6= G, we call H a proper subgraph of G. If H
is a subgraph of G, then G is called a super graph of H. A spanning subgraph of G is a
subgraph that contains all vertices of G.
Definition 15. Let G = (V, E) and let V 0 ⊂ V . The subgraph of G induced by V 0 , denoted
G[V 0 ], is the graph H = (V 0 , E 0 ) where, for every x, y ∈ V 0 , xy ∈ E 0 if and only if xy ∈ E.
We say H = G[V 0 ] is an induced subgraph of G. The subgraph of G obtained by deleting V 0
is G[V \V 0 ], which is usually written as G − V 0 . If V 0 = {v}, it is common to write G − v.
Proof: The bijection f = {(a, v), (b, w), (c, y), (d, u), (e, x)} is an isomorphism between
the two graphs.
By Mesfin M, AAU
3.4 Isomorphic Graphs 34
How can we show that two graphs are not isomorphic? A better way of showing that two
graphs are not isomorphic is to find a graph-theoretic property that one graph has but the
other does not. For example two graphs with different numbers of edges or vertices cannot
possibly be isomorphic. If two graphs have the same number of edges and the same number
of vertices, then the problem is more difficult. In such cases, it is often useful to look at the
degrees of the vertices. For example, if one graph has two vertices with degree 3, and the
other has only one, then the graphs are not isomorphic. Sometimes even this test fails, and
it is necessary to look for another property that distinguishes the two graphs.
Example Show that the pairs of graphs shown below are not isomorphic.
G H
a b u v
d c w x
a)
a f u z
b e v y
c d w x
G H
b)
Figure 3.7:
Solution
(a) Both graphs in Figure 3.7 (a) have four vertices and three edges. However, the second
graph has a vertex with degree 3, while the first does not, so the graphs are not isomorphic.
(Note that it would be incorrect to say that they are not isomorphic because vertex a has
degree 2 in the first graph and degree 1 in the second. An isomorphism from one graph
to another does not necessarily associate vertices that happen to be labelled with the same
letter.)
(b) Both graphs in Figure 3.7(b) have six vertices and seven edges. Also, both graphs have
four vertices with degree 2 and two vertices with degree 3. However, the first graph has a se-
quence def of three vertices with degree 2, with d adjacent to e and e adjacent to f , whereas
there is no such sequence of three vertices with degree 2 in the second graph. Therefore the
graphs are not isomorphic.
By Mesfin M, AAU
3.5 Bipartite graph 35
Exercise
1. Find all non-isomorphic graphs on 3 vertices.
2. Find all non-isomorphic graphs on 4 vertices.
3. Find all non-isomorphic graphs with 5 vertices and 6 edges.
Example
G Ḡ
G Ḡ
Figure 3.8:
Exercise
1. Draw a graph on 5 vertices and 6 edges. How many edges does its complement have?
2. If G has 12 vertices and 23 edges, how many edges does Ḡ have?
Exercise
1. How many edges does a self-complementary graph on n vertices have?
2. Find self-complementary graphs on 4 vertices and 5 vertices.
By Mesfin M, AAU
3.6 Paths and Connectivity of a graph 36
Example The complete bipartite graphs K2,3 , K3,4 and K3,3 are displayed below.
Exercise
1. How many edges does Kn,m have?
2. Let G be
P a bipartite P
graph with bipartition (X, Y ). Prove that
|E(G)| = x∈X d(x) = y∈Y d(y).
v1
e1 e2 e3
v7 v8 e4 v2
e5
e8
e10 v5 v3
e9 e7 e6
v6 v4
Figure 3.10:
By Mesfin M, AAU
3.6 Paths and Connectivity of a graph 37
Definition 22. The path graph Pn = (V, E) is the graph with V = (v1 , v2 , ..., vn ) and
E = (v1 v2 , v2 v3 , ...vn−1 vn ).
Definition 23. A walk is closed if it has positive length and it starts and ends at the same
vertex. A closed trail is called a cycle. A cycle of length k is called a k-cycle and denoted by
Ck . A k-cycle is an even cycle if k is even. A k-cycle is an odd cycle if k is odd. A 3-cycle
is usually called a triangle.
From the above definitions, one can note the following properties of paths and cycles:
• in a path the degree of each vertex is 2, except for the end vertices for which the degree
is 1,
• in a path the number of edges is one less than the number of vertices; in a cycle the
number of edges and of vertices are equal.
By Mesfin M, AAU
3.6 Paths and Connectivity of a graph 38
Example
a g a
b f i h b e
c d
c e
1 v2 v3
v1 v4 v6
5 4 v7
6 2 v5 v8
By Mesfin M, AAU
3.6 Paths and Connectivity of a graph 39
Worksheet III
1.(a) If G is a k-regular graph with n vertices, how many edges does G have?
b) Draw a 3-regular graph with 11 vertices or prove that no such graph exists.
2. Find the order of a graph of size 45 with seven vertices of degree 6, five vertices of degree
4 and the remaining vertices of degree 7.
3. Is every subgraph of a complete graph is complete?
4. Let V = {1, 2, 3, 4, ..., n}. How many different simple graphs with vertex set V are there?
5. What is the maximum order of a simple graph of size 21 of deg(v) ≥ 3, ∀v ∈ V (G).
6. For each of the following, decide if the sequence is graphic. If so, find a graph with the
given degree sequence.
a) 2, 2, 2, 2, 2, 2 c) 7, 6, 5, 4, 3, 2, 1
b) 5, 5, 4, 3, 2, 1 d) 5, 4, 3, 3, 3, 2, 1
7. Find the degree sequence of k regular graph of order n.
8. Show that G ∼ = H if and only if G ∼ = H.
9 Consider the graph G = (V, E) with V = {1, 2, 3, 4, 5} and E = {12, 13, 23, 24, 34, 45}.
Give the set of edges, the incidence and adjacency matrices, and a drawing of the graphs
Gc , G − 4, G − 45 and G + 25.
2
10. Show that if G is simple and bipartite, then ||G|| ≤ |G|4 .
11. Show that δ ≤ 2||G||
|G|
≤ 4.
12. Prove that every subgraph of a bipartite graph is bipartite.
13. Prove that if a graph is regular of odd degree, then it has even order.
14. Are any of the following graphs isomorphic to each other? if no why?
G1 G2
G3 G4
Figure 3.14:
By Mesfin M, AAU
3.6 Paths and Connectivity of a graph 40
G1
G2
Figure 3.15:
By Mesfin M, AAU
3.7 Eulerian and Hamiltonian graphs 41
Existence of Euler Paths and Circuits.The graphs that have an Euler path can be
characterized by looking at the degree of their vertices. Recall that the degree of a vertex
v, represented deg(v), is the number of edges that contain v (loops are counted twice). An
even vertex is a vertex with even degree; an odd vertex is a vertex with odd degree. The
sum of the degrees of all vertices in a graph equals twice its number of edges, so it is an even
number. As a consequence, the number of odd vertices in a graph is always even.
Let G be a connected multigraph. Then G contains an Euler circuit if and only if all
vertices of G have even degree. Also, G contains an Euler path from vertex a to vertex
b(6= a) if and only if a and b have odd degree, and all its other vertices have even degree.
In general it is not easy to determine if a given graph has a Hamilton path or circuit,
although often it is possible to argue that a graph has no Hamilton circuit. For instance
By Mesfin M, AAU
3.8 Trees and forests 42
if G = (V, E) is a bipartite graph with vertex partition {V1 , V2 } (so that each edge in G
connects some vertex in V1 to some vertex in V2 ), then G cannot have a Hamilton circuit
if |V1 || =
6 |V2 |, because any path must contain alternatively vertices from V1 and V2 , so any
circuit in G must have the same number of vertices from each of both sets.
Theorem 12. (Diracs Theorem) If G is a simple graph with n vertices with n ≥ 3 such that
the degree of every vertex in G is at least n2 , then G has a Hamilton circuit.
Theorem 13. (Ores Theorem) If G is a simple graph with n vertices with n ≥ 3 such that
deg(u) + deg(v) ≥ n for every pair of nonadjacent vertices u and v in G, then G has a
Hamilton circuit.
Note that: A graph G is said to be Hamiltonian graph if it contains a Hamiltonian cycle
and Eulerian graph if it contains an Eulerian circuit. For example consider the following
four graphs:
b c b c b c b c
a g d g g a g d
f e f e f e e
f
G1 G2 G3 G4
Figure 3.16:
By Mesfin M, AAU
3.8 Trees and forests 43
Figure 3.17:
Theorem 14. Let T be a graph with n vertices. Then the following statements are equiva-
lent.
1. T is a tree.
6. T contains no cycles, but the addition of any new edge creates a cycle.
Exercise 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
Theorem 15. Every connected graph has at least one spanning tree.
By Mesfin M, AAU
3.8 Trees and forests 44
Figure 3.18:
Proof. Let G be a connected graph. If G has no cycles, then it is its own spanning tree. If
G has cycles, then on deleting one edge from each of the cycles, the graph remains connected
and cycle free containing all the vertices of G.
Definition 30. A rooted tree is a tree in which a particular vertex is designated as the root
and every edge is directed away from the root.
We can change an un rooted tree into a rooted tree by choosing any vertex as the root.
Note that different choices of the root produce different rooted trees. We draw rooted trees
with the root at the top. The arrows indicating the directions of the edges can be omitted.
root
rooted graph
Figure 3.19:
The level of a vertex v is the length of the simple path from the root to v. The height of
a rooted tree is the maximum level of its vertices.
Let T be a tree with root v0 . Suppose that x, y and z are vertices in T and that (v0 , v1 , ..., vn )
is a simple path in T . Then:
By Mesfin M, AAU
3.9 Planar graphs 45
3. vn is a child of vn−1 .
4. If x is an ancestor of y, y is a descendant of x.
8. The subtree of T rooted at x is the graph (V, E), where V is x together with its descen-
dants and E = edges of simple paths from x to some vertex in E.
Exercise
In the rooted tree T (with root a) shown in Figure 5, find the parent of c, the children of g,
the siblings of h, all ancestors of e, all descendants of b, all internal vertices, and all leaves.
What is the subtree rooted at g?
root
By Mesfin M, AAU
3.9 Planar graphs 46
For example, K4 is planar, since it can be drawn in the plane without edges crossing.
The following diagram shows three plane drawings of K4 .
Definition 33. A plane graph G partitions the rest of the plane into a number of connected
regions; these regions are called the faces of G. We shall denote the set of faces and the
number of faces by F (G) and φ(G) respectively, in plane graph G. Each plane graph has
exactly one unbounded face, called the exterior face.
For example, any plane drawing of K4 divides the plane into four regions: three triangles(3
cycles) and one infinite region.
For example consider the following planar graph.
Note that there is one unbounded face (f4 here). This is called the exterior face.
Definition 34. The boundary of a face, f , is denoted by b(f ). The boundary can be
regarded as a closed walk with cut-edges traversed twice.
Example From the above graph,
b(f1 ) = v1 e1 v2 e8 v8 e8 v2 e9 v9 e11 v6 e6 v7 e7 v1 .
b(f 2) = v2 e2 v3 e3 v4 e10 v9 e9 v2 .
Definition 35. A face f is said to be incident with the vertices and edges in its boundary.
If e is a cut-edge, there is only one face incident to it. Otherwise, there are two faces incident
with e. We say that an edge separates the faces incident with it. The degree, dG (f ), of a
face f is the number of edges incident with it (cut edges are counted twice).
f4 f4
f2
f4 f3 f1
f3 f2 f1
f2 f3
f1
Figure 3.22:
By Mesfin M, AAU
3.10 Graph coloring 47
e2 v3
v2 e3
e1 e9 f2e v4
10
v1 e8 v9
v8 e11 f3 e4
e7 f1 v5
e5
v7 e6 v6
f4
Figure 3.23:
G1
G2 G3
Figure 3.24:
By Mesfin M, AAU
3.10 Graph coloring 48
Definition 37. The minimum number of colors needed to properly color a given graph
G = (V, E) is called the chromatic number of G, and is represented χ(G).
Theorem 17. 1. Let G be a simple graph. The following statements are equivalent:
a) χ(G) = 2
b) G is bipartite
a) b) c) d)
Figure 3.25:
Hint: For each graph, devise a suitable coloring and explain why there is no coloring with
fewer colors.
By Mesfin M, AAU