0% found this document useful (0 votes)
26 views83 pages

Network

Chapter 7 discusses the concepts of networks and spanning trees in graph theory, focusing on how to connect all vertices without forming circuits. It defines a spanning tree as a connected, acyclic subgraph with exactly N-1 edges for N vertices. The chapter also explores the implications of loops and bridges in spanning trees and how to count the number of different spanning trees in a network.

Uploaded by

oztrk487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views83 pages

Network

Chapter 7 discusses the concepts of networks and spanning trees in graph theory, focusing on how to connect all vertices without forming circuits. It defines a spanning tree as a connected, acyclic subgraph with exactly N-1 edges for N vertices. The chapter also explores the implications of loops and bridges in spanning trees and how to count the number of different spanning trees in a network.

Uploaded by

oztrk487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

The Mathematics of Networks (Chapter 7)

We have studied how to visit all the edges of a graph (via an


Euler path or circuit) and how to visit all the vertices (via a
Hamilton circuit).
The Mathematics of Networks (Chapter 7)
We have studied how to visit all the edges of a graph (via an
Euler path or circuit) and how to visit all the vertices (via a
Hamilton circuit).
What if we just want to connect all the vertices
together into a network?
The Mathematics of Networks (Chapter 7)
We have studied how to visit all the edges of a graph (via an
Euler path or circuit) and how to visit all the vertices (via a
Hamilton circuit).
What if we just want to connect all the vertices
together into a network?
In other words, What if we just want to connect all the
vertices together in a network?
The Mathematics of Networks (Chapter 7)
We have studied how to visit all the edges of a graph (via an
Euler path or circuit) and how to visit all the vertices (via a
Hamilton circuit).
What if we just want to connect all the vertices
together into a network?
In other words, What if we just want to connect all the
vertices together in a network?

I Roads, railroads
I Telephone lines
I Fiber-optic cable
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Uluru(UL) Brisbane (BR)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

Too many edges!


Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

Still too many edges


Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

Just right
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

Another possibility
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

Not enough edges


Networks and Spanning Trees

Definition: A network is a connected graph.

Definition: A spanning tree of a network is a subgraph


that
1. connects all the vertices together; and
2. contains no circuits.

In graph theory terms, a spanning tree is a subgraph that is


both connected and acyclic.
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

A spanning tree
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Hobart (HO)

A spanning tree
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Not a spanning tree Hobart (HO)

(not connected)
Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Not a spanning tree Hobart (HO)

(connected, but has a circuit)


Darwin (DA)

Kununurra(KU) Cairns (CS)

Broome (BM)
Mount Isa (MI)
Mackay (MK)

Alice Springs(AS)

Brisbane (BR)

Uluru(UL)

Adelaide (AD)
Perth Sydney (SY)
(PE)

Melbourne (ML) Canberra (CN)


Albany (AL)

Not a spanning tree Hobart (HO)

(connected, but has a circuit)


The Number of Edges in a Spanning Tree

In a network with N vertices, how many edges does a


spanning tree have?
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
I Each time you add an edge, you either
I connect two components together, or
I close a circuit
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
I Each time you add an edge, you either
I connect two components together, or
I close a circuit
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
I Each time you add an edge, you either
I connect two components together, or
I close a circuit
I Stop when the graph is connected (i.e., has only one
component).
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
I Each time you add an edge, you either
I connect two components together, or
I close a circuit
I Stop when the graph is connected (i.e., has only one
component).
I You have added exactly N − 1 edges.
The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and adding


edges one at a time.
I Each time you add an edge, you either
I connect two components together, or
I close a circuit
I Stop when the graph is connected (i.e., has only one
component).
I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree has


exactly N − 1 edges.
The Number of Edges in a Spanning Tree

In a network with N vertices, every spanning tree has


exactly N − 1 edges.
The Number of Edges in a Spanning Tree

In a network with N vertices, every spanning tree has


exactly N − 1 edges.

Must every set of N − 1 edges form a spanning tree?


The Number of Edges in a Spanning Tree
Answer: No.
For example, suppose the network is K4 .

Spanning tree Spanning tree Not a spanning tree


Spanning Trees in K2 and K3

K2 1 2

1 1 1

K3
2 3 2 3 2 3
Spanning Trees in K4
1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4
Facts about Spanning Trees

Suppose we have a network with N vertices.

1. Every spanning tree has exactly N − 1 edges.


Facts about Spanning Trees

Suppose we have a network with N vertices.

1. Every spanning tree has exactly N − 1 edges.

2. If a set of N − 1 edges is acyclic, then it connects all the


vertices, so it is a spanning tree.
Facts about Spanning Trees

Suppose we have a network with N vertices.

1. Every spanning tree has exactly N − 1 edges.

2. If a set of N − 1 edges is acyclic, then it connects all the


vertices, so it is a spanning tree.

3. If a set of N − 1 edges connects all the vertices, then it is


acyclic, so it is a spanning tree.
Facts about Spanning Trees

4. In a network with N vertices and M edges,

M ≥N −1

(otherwise it couldn’t possibly be connected!) That is,

M − N + 1 ≥ 0.

The number M − N + 1 is called the redundancy of the


network, denoted by R.
Facts about Spanning Trees

4. In a network with N vertices and M edges,

M ≥N −1

(otherwise it couldn’t possibly be connected!) That is,

M − N + 1 ≥ 0.

The number M − N + 1 is called the redundancy of the


network, denoted by R.

5. If R = 0, then the network is itself a tree.


If R > 0, then there are usually several spanning trees.
Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.
Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.

How many different spanning trees are there?


Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.


Loops and Bridges

I If an edge of a network is a loop, then it is not in any


spanning tree.
Loops and Bridges

I If an edge of a network is a loop, then it is not in any


spanning tree.
I If an edge of a network is a bridge, then it must belong
to every spanning tree.
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.

bridge
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.
Loops and Bridges

I If an edge of a network is a bridge, then it must belong


to every spanning tree.
Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.
Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.

How many different spanning trees are there?


Counting Spanning Trees

We now know that every spanning tree of an N-vertex network


has exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.


Counting Spanning Trees
Counting Spanning Trees
Counting Spanning Trees
Counting Spanning Trees
Counting Spanning Trees
Counting Spanning Trees
Counting Spanning Trees

3 spanning trees x 3 spanning trees


of this triangle of this triangle

= 9 total spanning trees


Counting Spanning Trees

How many spanning


trees does this
network have?
Counting Spanning Trees

bridges How many spanning


trees does this
network have?
Counting Spanning Trees

bridges 3 How many spanning


4
trees does this
network have?

3 4
Counting Spanning Trees

bridges 3 How many spanning


4
trees does this
network have?

Answer:
4 4 x 3 x 3 x 4 = 144.
3
Counting Spanning Trees
If the graph has circuits that overlap, it is trickier to count
spanning trees. For example:

1 2

3 4
Counting Spanning Trees
If the graph has circuits that overlap, it is trickier to count
spanning trees. For example:

1 2

3 4

I There are N = 4 vertices =⇒


every spanning tree has N − 1 = 3 edges.
Counting Spanning Trees
If the graph has circuits that overlap, it is trickier to count
spanning trees. For example:

1 2

3 4

I There are N = 4 vertices =⇒


every spanning tree has N − 1 = 3 edges.
I List all the sets of three edges and cross out the ones that
are not spanning trees.
Counting Spanning Trees

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2
10 ways to select three edges

3 4 3 4
Counting Spanning Trees

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2 1 2 1 2

3 4 3 4 3 4 3 4

1 2 1 2
10 ways to select three edges
2 are not trees
3 4 3 4 Total: 8 spanning trees
The Number of Spanning Trees of KN
(Not in Tannenbaum!)

Since KN has N vertices, we know that every spanning tree of


KN has N − 1 edges.

How many different spanning trees are there?


The Number of Spanning Trees of KN
(Not in Tannenbaum!)

Since KN has N vertices, we know that every spanning tree of


KN has N − 1 edges.

How many different spanning trees are there?

We have already seen the answers for K2 , K3 , and K4 .


The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN

2 1
3 3
4 16
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
5 125
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
5 125
6 1296
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
5 125
6 1296
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
5 125
6 1296
7 16807
8 262144

What’s the pattern?


The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16
5 125
6 1296
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16 = 42
5 125
6 1296
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3
4 16 = 42
5 125 = 53
6 1296
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3 = 31
4 16 = 42
5 125 = 53
6 1296
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807 = 75
8 262144
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807 = 75
8 262144 = 86
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1
2 1 = 20
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807 = 75
8 262144 = 86
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1 = 1−1
2 1 = 20
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807 = 75
8 262144 = 86
The Number of Spanning Trees of KN

Number of vertices (N) Number of spanning trees in KN


1 1 = 1−1
2 1 = 20
3 3 = 31
4 16 = 42
5 125 = 53
6 1296 = 64
7 16807 = 75
8 262144 = 86

Cayley’s Formula:
The number of spanning trees in KN is NN−2 .
Cayley’s Formula:
The number of spanning trees in KN is NN−2 .

For example, K16 (the Australia graph!) has

1614 = 72, 057, 594, 037, 927, 936

spanning trees.

(By comparison, the number of Hamilton circuits is “only”

15! = 1, 307, 674, 368, 000.)

You might also like