Discrete Chapter 10
Discrete Chapter 10
Chapter 10
Graphs
New York
San Francisco
Chicago
Denver
Washington
Los Angeles
New York
Denver
San Francisco
Chicago
Washington
Los Angeles
Detroit
New York
Denver
San Francisco
Chicago
Washington
Los Angeles
Result: There are 9 edges, and the sum of all degrees is 18.
This is easy to explain: Each new edge increases the sum of
degrees by exactly two.
deg-(a) = 1 deg-(b) = 4
a
deg+(a) = 2 b deg+(b) = 2
deg-(d) = 2 deg-(c) = 0
d c
deg+(d) = 1 deg+(c) = 2
K1 K2 K3 K4 K5
C3 C4 C5 C6
W3 W4 W5 W6
Q1 Q2 Q3
K3,2 K3,4
subgraph of K5
K5
G1 G2 G1 G2 = K5
b e e
b
c d c d
f h
d
a e
g
b c f j
a
b Weakly connected, because, for example,
d there is no path from b to d.
c
a
Strongly connected, because there are
b paths between all possible pairs of
d vertices.
c
04/17/2025 Discrete Mathematics Chapter 10 47
Shortest Path Problems
We can assign weights to the edges of graphs, for
example to represent the distance between cities in
a railway network:
Toronto
650
700 Boston
Chicago
200
600
New York
650 550
700
700 Boston
Chicago
200
600
New York
Solution: The shortest path is Boston, New York, Chicago,
Toronto, Boston (2,000 miles).
04/17/2025 Discrete Mathematics Chapter 10 52
The Traveling Salesman Problem
Question: Given n vertices, how many different
cycles Cn can we form by connecting these vertices
with edges?
Solution: We first choose a starting point. Then we
have (n – 1) choices for the second vertex in the cycle,
(n – 2) for the third one, and so on, so there are (n –
1)! choices for the whole cycle.
However, this number includes identical cycles that
were constructed in opposite directions. Therefore,
the actual number of different cycles Cn is (n – 1)!/2.