The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The...

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).

Transcript of The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The...

Page 1: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Mathematics of Networks (Chapter 7)

We have studied how to visit all the edges of a graph (via anEuler path or circuit) and how to visit all the vertices (via aHamilton circuit).

What if we just want to connect all the verticestogether into a network?

In other words, What if we just want to connect all thevertices together in a network?

I Roads, railroads

I Telephone lines

I Fiber-optic cable

Page 2: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Mathematics of Networks (Chapter 7)

We have studied how to visit all the edges of a graph (via anEuler path or circuit) and how to visit all the vertices (via aHamilton circuit).

What if we just want to connect all the verticestogether into a network?

In other words, What if we just want to connect all thevertices together in a network?

I Roads, railroads

I Telephone lines

I Fiber-optic cable

Page 3: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Mathematics of Networks (Chapter 7)

We have studied how to visit all the edges of a graph (via anEuler path or circuit) and how to visit all the vertices (via aHamilton circuit).

What if we just want to connect all the verticestogether into a network?

In other words, What if we just want to connect all thevertices together in a network?

I Roads, railroads

I Telephone lines

I Fiber-optic cable

Page 4: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Mathematics of Networks (Chapter 7)

We have studied how to visit all the edges of a graph (via anEuler path or circuit) and how to visit all the vertices (via aHamilton circuit).

What if we just want to connect all the verticestogether into a network?

In other words, What if we just want to connect all thevertices together in a network?

I Roads, railroads

I Telephone lines

I Fiber-optic cable

Page 5: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(UL)Uluru

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Page 6: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 7: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Too many edges!

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 8: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Still too many edges

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 9: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Just right

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 10: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Another possibility

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 11: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Not enough edges

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 12: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Networks and Spanning Trees

Definition: A network is a connected graph.

Definition: A spanning tree of a network is a subgraphthat

1. connects all the vertices together; and

2. contains no circuits.

In graph theory terms, a spanning tree is a subgraph that isboth connected and acyclic.

Page 13: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

A spanning tree

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 14: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

A spanning tree

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 15: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Not a spanning tree

(not connected)

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 16: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Not a spanning tree

(connected, but has a circuit)

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 17: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Not a spanning tree

(connected, but has a circuit)

Hobart

Canberra

Sydney

Brisbane

Mackay

Cairns

Mount Isa

Alice Springs

Kununurra

Darwin

Perth

Albany

(SY)(PE)

(MI)

(CN)

(HO)

(KU)

(MK)

(DA)

(AL)

(AS)

(CS)

(BR)

(BM)Broome

Melbourne (ML)

Adelaide (AD)

Uluru(UL)

Page 18: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

In a network with N vertices, how many edges does aspanning tree have?

Page 19: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you either

I connect two components together, or

I

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 20: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you eitherI connect two components together, orI close a circuit

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 21: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you eitherI connect two components together, orI close a circuit

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 22: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you eitherI connect two components together, orI close a circuit

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 23: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you eitherI connect two components together, orI close a circuit

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 24: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

I Imagine starting with N isolated vertices and addingedges one at a time.

I Each time you add an edge, you eitherI connect two components together, orI close a circuit

I Stop when the graph is connected (i.e., has only onecomponent).

I You have added exactly N − 1 edges.

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

Page 25: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

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

Page 26: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Edges in a Spanning Tree

In a network with N vertices, every spanning tree hasexactly N − 1 edges.

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

Page 27: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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

Page 28: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Spanning Trees in K2 and K3

K3

K2

32

1

32

1

32

1

1 2

Page 29: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Spanning Trees in K4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

Page 30: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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 thevertices, so it is a spanning tree.

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

Page 31: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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 thevertices, so it is a spanning tree.

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

Page 32: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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 thevertices, so it is a spanning tree.

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

Page 33: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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 thenetwork, denoted by R .

5. If R = 0, then the network is itself a tree.If R > 0, then there are usually several spanning trees.

Page 34: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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 thenetwork, denoted by R .

5. If R = 0, then the network is itself a tree.If R > 0, then there are usually several spanning trees.

Page 35: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 36: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 37: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 38: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 39: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 40: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 41: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

bridge

Page 42: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 43: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 44: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 45: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Loops and Bridges

I If an edge of a network is a loop, then it is not in anyspanning tree.

I If an edge of a network is a bridge, then it must belongto every spanning tree.

Page 46: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 47: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 48: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

We now know that every spanning tree of an N-vertex networkhas exactly N − 1 edges.

How many different spanning trees are there?

Of course, this answer depends on the network itself.

Page 49: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 50: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 51: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 52: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 53: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 54: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

Page 55: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

xof this triangleof this triangle

3 spanning trees 3 spanning trees

= 9 total spanning trees

Page 56: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

How many spanningtrees does thisnetwork have?

Page 57: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

bridges How many spanningtrees does thisnetwork have?

Page 58: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

bridges How many spanningtrees does thisnetwork have?

4

4

3

3

Page 59: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

bridges How many spanningtrees does thisnetwork have?

4

4

3

34 x 3 x 3 x 4 =Answer:

144.

Page 60: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

If the graph has circuits that overlap, it is trickier to countspanning 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 thatare not spanning trees.

Page 61: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

If the graph has circuits that overlap, it is trickier to countspanning 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 thatare not spanning trees.

Page 62: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

If the graph has circuits that overlap, it is trickier to countspanning 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 thatare not spanning trees.

Page 63: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

10 ways to select three edges

Page 64: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

Counting Spanning Trees

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

1 2

3 4

2 are not treesTotal: 8 spanning trees

10 ways to select three edges

Page 65: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

(Not in Tannenbaum!)

Since KN has N vertices, we know that every spanning tree ofKN has N − 1 edges.

How many different spanning trees are there?

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

Page 66: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

(Not in Tannenbaum!)

Since KN has N vertices, we know that every spanning tree ofKN has N − 1 edges.

How many different spanning trees are there?

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

Page 67: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

2 13 34 16

What’s the pattern?

Page 68: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 16

What’s the pattern?

Page 69: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 165 125

What’s the pattern?

Page 70: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 165 1256 1296

What’s the pattern?

Page 71: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 165 1256 12967 168078 262144

What’s the pattern?

Page 72: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 165 1256 12967 168078 262144

What’s the pattern?

Page 73: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 165 1256 12967 168078 262144

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

Page 74: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 16 = 42

5 1256 12967 168078 262144

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

Page 75: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 34 16 = 42

5 125 = 53

6 12967 168078 262144

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

Page 76: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 3 = 31

4 16 = 42

5 125 = 53

6 12967 168078 262144

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

Page 77: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 3 = 31

4 16 = 42

5 125 = 53

6 1296 = 64

7 168078 262144

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

Page 78: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 3 = 31

4 16 = 42

5 125 = 53

6 1296 = 64

7 16807 = 75

8 262144

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

Page 79: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 13 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.

Page 80: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

The Number of Spanning Trees of KN

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

1 12 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.

Page 81: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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.

Page 82: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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.

Page 83: The Mathematics of Networks (Chapter 7)jmartin/courses/math105-F11/Lectures/chapter7... · The Mathematics of Networks (Chapter 7) ... Must every set of N 1 edges form a spanning

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.)