DISCRETE MATHEMATICS
W W L CHEN
c
±
W W L Chen, 1992, 2008.
This chapter is available free to all individuals, on the understanding that it is not to be used for ﬁnancial gain,
and may be downloaded and/or photocopied, with or without permission from the author.
However, this document may not be kept on any information storage and retrieval system without permission
from the author, unless such system is not accessible to any individuals other than its owners.
Chapter 18
WEIGHTED GRAPHS
18.1. Introduction
We shall consider the problem of spanning trees when the edges of a connected graph have weights. To
do this, we ﬁrst consider weighted graphs.
Definition.
Suppose that
G
= (
V,E
) is a graph. Then any function of the type
w
:
E
→
N
is called a
weight function. The graph
G
, together with the function
w
:
E
→
N
, is called a weighted graph.
Example 18.1.1.
Consider the connected graph described by the following picture.
123
456
Then the weighted graph
DISCRETE MATHEMATICS
WWL CHEN
c
²
WWL Chen, 1992, 2003.
This chapter is available free to all individuals, on the understanding that it is not to be used for Fnancial gains,
and may be downloaded and/or photocopied, with or without permission from the author.
However, this document may not be kept on any information storage and retrieval system without permission
from the author, unless such system is not accessible to any individuals other than its owners.
Chapter 18
WEIGHTED GRAPHS
18.1.
Introduction
We shall consider the problem of spanning trees when the edges of a connected graph have weights. To
do this, we Frst consider weighted graphs.
Definition.
Suppose that
G
=(
V, E
)isa graph. Then any function of the type
w
:
E
→
N
is called
aweight function. The graph
G
, together with the function
w
:
E
→
N
,is called a weighted graph.
Example 18.1.1.
Consider the connected graph described by the following picture.
Then the weighted graph
3
2
5
1
4
6
7
has weight function
w
:
E
→
N
, where
E
=
{{
1
,
2
}
,
{
1
,
4
}
,
{
2
,
3
}
,
{
2
,
5
}
,
{
3
,
6
}
,
{
4
,
5
}
,
{
5
,
6
}}
and
w
(
{
1
,
2
}
)=3
,w
(
{
1
,
4
}
)=2
(
{
2
,
3
}
)=5
(
{
2
,
5
}
)=1
,
w
(
{
3
,
6
}
)=4
(
{
4
,
5
}
)=6
(
{
5
,
6
}
)=7
.
has weight function
w
:
E
→
N
, where
E
=
{{
1
,
2
}
,
{
1
,
4
}
,
{
2
,
3
}
,
{
2
,
5
}
,
{
3
,
6
}
,
{
4
,
5
}
,
{
5
,
6
}}
and
w
(
{
1
,
2
}
) = 3
,
w
(
{
1
,
4
}
) = 2
,
w
(
{
2
,
3
}
) = 5
,
w
(
{
2
,
5
}
) = 1
,
w
(
{
3
,
6
}
) = 4
,
w
(
{
4
,
5
}
) = 6
,
w
(
{
5
,
6
}
) = 7
.
Chapter 18 : Weighted Graphs
page 1 of 7