57
(use PgDn or Enter to move forward) 0.1 The Route Inspection Problem The Route Inspection Problem also known as The Chinese Postman Problem The Chinese Postman Problem

Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

(use PgDn or Enter to move forward)

0.1

The Route Inspection ProblemThe Route Inspection Problem

also known as

The Chinese Postman ProblemThe Chinese Postman Problem

Page 2: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.2

Node type

An n-node is a node where n arcs join

Page 3: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.2

Node type

An n-node is a node where n arcs join and is

said to be a node of order n.

Page 4: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.2

Node type

An n-node is a node where n arcs join and is

said to be a node of order n.

1-nodes, 3-nodes, (and so on) are called odd

nodes or nodes of odd order.

Page 5: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.2

Node type

An n-node is a node where n arcs join and is

said to be a node of order n.

1-nodes, 3-nodes, (and so on) are called odd

nodes or nodes of odd order.

2-nodes, 4-nodes, (and so on) are called even

nodes or nodes of even order.

Page 6: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.3

Numbers of nodes

In any network there is always an even number

of odd nodes.

Page 7: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.3

Numbers of nodes

In any network there is always an even number

of odd nodes.

Add together the node type numbers of all the

nodes in a network.

Page 8: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.3

Numbers of nodes

In any network there is always an even number

of odd nodes.

Add together the node type numbers of all the

nodes in a network. The sum will be twice the

number of arcs because each arc is counted

twice, once from each end.

Page 9: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.3

Numbers of nodes

In any network there is always an even number

of odd nodes.

Add together the node type numbers of all the

nodes in a network. The sum will be twice the

number of arcs because each arc is counted

twice, once from each end.Thus the sum of

node type numbers is even for any network.

Page 10: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.4

An odd number of odd nodes cannot exist

because a sum containing an odd number of

odd numbers would be odd. Thus any network

must have an even number of odd nodes (if it

has any odd nodes).

Page 11: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.5

Traversability

A network is said to be traversable (or

Eulerian) if you can draw it without removing

your pen from the paper and without retracing

the same arc twice.

Page 12: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.5

Traversability

A network is said to be traversable (or

Eulerian) if you can draw it without removing

your pen from the paper and without retracing

the same arc twice. For a network to be

traversable it must have 0 or 2 odd nodes

Page 13: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.5

Traversability

A network is said to be traversable (or

Eulerian) if you can draw it without removing

your pen from the paper and without retracing

the same arc twice. For a network to be

traversable it must have 0 or 2 odd nodes and if

we are able to start and finish at the same

node it must have no odd nodes.

Page 14: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.6

Chinese Postman ProblemChinese Postman Problem

The Chinese postman problem concerns a

postman who has to deliver mail to houses

along each of the streets in a particular

housing estate,

Page 15: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.6

Chinese Postman ProblemChinese Postman Problem

The Chinese postman problem concerns a

postman who has to deliver mail to houses

along each of the streets in a particular

housing estate, and wants to minimse the

distance he has to walk.

Page 16: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.6

Chinese Postman ProblemChinese Postman Problem

The Chinese postman problem concerns a

postman who has to deliver mail to houses

along each of the streets in a particular

housing estate, and wants to minimse the

distance he has to walk.

The problem was first considered by the

chinese mathematician Mei-ko Kwan in the

1960s, hence its name.

Page 17: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.7

How does this problem differ from the problem

of the travelling salesman?

Page 18: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.7

How does this problem differ from the problem

of the travelling salesman?

The travelling salesman needs to visit every

node (or vertex) whereas the Postman needs

to travel along each arc (or edge).

Page 19: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.7

How does this problem differ from the problem

of the travelling salesman?

The travelling salesman needs to visit every

node (or vertex) whereas the Postman needs

to travel along each arc (or edge).

Therefore it is required that the network is

traversable (Eulerian).

Page 20: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.8

The problem is therefore to obtain “a closed

trail of minimum weight containing every arc”.

Page 21: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.8

The problem is therefore to obtain “a closed

trail of minimum weight containing every arc”.

Or put another way, “find a route of minimum

weight which traverses every edge at least

once, returning to the start vertex”.

Page 22: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.8

The problem is therefore to obtain “a closed

trail of minimum weight containing every arc”.

Or put another way, “find a route of minimum

weight which traverses every edge at least

once, returning to the start vertex”.

We first deal with traversability (the closed

trail), then consider the mimimum weight

condition (shortest distance).

Page 23: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.9

Recall the result about traversability

Page 24: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.9

Recall the result about traversability

For a network to be traversable it must have 0

or 2 odd nodes

Page 25: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.9

Recall the result about traversability

For a network to be traversable it must have 0

or 2 odd nodes and if we are able to start and

finish at the same node it must have no odd

nodes.

Page 26: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.9

Recall the result about traversability

For a network to be traversable it must have 0

or 2 odd nodes and if we are able to start and

finish at the same node it must have no odd

nodes.

And consider its implications for the postman

problem.

Page 27: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.10

If there are no odd nodes in the network, the

network is certainly traversable.

Page 28: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.10

If there are no odd nodes in the network, the

network is certainly traversable.

The minimum distance is the sum of the arc

distances and any Eulerian trail is an

acceptable shortest route, so the problem is

trivial.

Page 29: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.11

We now consider the general situation where

there are an even number of odd nodes.

Page 30: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.11

We now consider the general situation where

there are an even number of odd nodes.

In such a case the network can be made

traversable by linking together pairs of odd

nodes with additional arcs.

Page 31: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.11

We now consider the general situation where

there are an even number of odd nodes.

In such a case the network can be made

traversable by linking together pairs of odd

nodes with additional arcs. The effect of adding

these extra arcs is to make all nodes even and

hence the network becomes traversable.

Page 32: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.11

We now consider the general situation where

there are an even number of odd nodes.

In such a case the network can be made

traversable by linking together pairs of odd

nodes with additional arcs. The effect of adding

these extra arcs is to make all nodes even and

hence the network becomes traversable.

Note that this is always possible because the

number of odd nodes is always even.

Page 33: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.12

Example

5

104 10

8

6

118

411 4

12

8

ZB

C

A

D G

E F

Page 34: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.12

Example

5

104 10

8

6

118

411 4

12

8

ZB

C

A

D G

E F

Page 35: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.12

Example

5

104 10

8

6

118

411 4

12

8

ZB

C

A

D G

E F

Page 36: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.13

The length of the shortest possible route is the

sum of all the arc lengths

Page 37: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.13

The length of the shortest possible route is the

sum of all the arc lengths plus the lengths of

the additional arcs (ZB, AE, DF ).

Page 38: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.13

The length of the shortest possible route is the

sum of all the arc lengths plus the lengths of

the additional arcs (ZB, AE, DF ).

Shortest route = 101 + 5 + 4 + 4

= 114

Page 39: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.13

The length of the shortest possible route is the

sum of all the arc lengths plus the lengths of

the additional arcs (ZB, AE, DF ).

Shortest route = 101 + 5 + 4 + 4

= 114

There are many possible routes around the

network.

Page 40: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.13

The length of the shortest possible route is the

sum of all the arc lengths plus the lengths of

the additional arcs (ZB, AE, DF ).

Shortest route = 101 + 5 + 4 + 4

= 114

There are many possible routes around the

network. Since all nodes are of even order the

postman can start at any node and he finishes

there.

Page 41: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.14

The additional arcs to join pairs of odd nodes

were chosen to minimise the additional

distance required to make the network

traversable.

Page 42: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.14

The additional arcs to join pairs of odd nodes

were chosen to minimise the additional

distance required to make the network

traversable.

In the example this was done by inspection

Page 43: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.14

The additional arcs to join pairs of odd nodes

were chosen to minimise the additional

distance required to make the network

traversable.

In the example this was done by inspection but

in more complex examples an algorithm is

required.

Page 44: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.14

The additional arcs to join pairs of odd nodes

were chosen to minimise the additional

distance required to make the network

traversable.

In the example this was done by inspection but

in more complex examples an algorithm is

required.

What algorithm can be used to find a shortest

path?

Page 45: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.14

The additional arcs to join pairs of odd nodes

were chosen to minimise the additional

distance required to make the network

traversable.

In the example this was done by inspection but

in more complex examples an algorithm is

required.

What algorithm can be used to find a shortest

path? Dijkstra’s algorithm.

Page 46: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.15

It should also be noted that it is not sufficient to

only consider one set of pairings of odd nodes,

Page 47: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.15

It should also be noted that it is not sufficient to

only consider one set of pairings of odd nodes,

all such parings must be considered.

Page 48: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.15

It should also be noted that it is not sufficient to

only consider one set of pairings of odd nodes,

all such parings must be considered.

So we have the Chinese Postman Algorithm...

Page 49: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.16

• Find all nodes of odd order

Page 50: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.16

• Find all nodes of odd order

• For every pair of odd nodes find the

connecting path of minimum weight

Page 51: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.16

• Find all nodes of odd order

• For every pair of odd nodes find the

connecting path of minimum weight

• Pair up all the odd nodes so that the sum of

weights of connecting paths is minimised

Page 52: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.16

• Find all nodes of odd order

• For every pair of odd nodes find the

connecting path of minimum weight

• Pair up all the odd nodes so that the sum of

weights of connecting paths is minimised

• Duplicate the minimum weight paths

Page 53: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.16

• Find all nodes of odd order

• For every pair of odd nodes find the

connecting path of minimum weight

• Pair up all the odd nodes so that the sum of

weights of connecting paths is minimised

• Duplicate the minimum weight paths

• Find a trail containing every arc for the new

(Eulerian) graph.

Page 54: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.17

• Work through example 5.2.1 (page 59) and

example 5.2.2 of OCR D1

Page 55: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.17

• Work through example 5.2.1 (page 59) and

example 5.2.2 of OCR D1

• Practise exercise 5 (page 61) - Yr 12.

Page 56: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

0.17

• Work through example 5.2.1 (page 59) and

example 5.2.2 of OCR D1

• Practise exercise 5 (page 61) - Yr 12.

• Practise exercise 3C (page 93) - Yr 13.

Page 57: Route Inspection ProblemTitle Route Inspection Problem Author A G Martin Subject Discrete Mathematics Keywords A level Mathematics

Click here to go back. Click here to close, or here to exit.

0.18

Go to..

mymathsteacher.comfor more maths help.

http://www.mymathsteacher.comPresentation produced using LATEX and the Utopia Presentation Bundle

A. G. Martin. December 31, 2001