Breakfast Bytes: Pigeons, Holes, Bridges and Computers
description
Transcript of Breakfast Bytes: Pigeons, Holes, Bridges and Computers
![Page 1: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/1.jpg)
Breakfast Bytes:Pigeons, Holes, Bridges and
Computers
Alan Kaylor ClineNovember 24, 2009
![Page 2: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/2.jpg)
Bridges
![Page 3: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/3.jpg)
Königsberg
![Page 4: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/4.jpg)
How did you say that?
![Page 5: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/5.jpg)
How did you say that?
Königsberg
![Page 6: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/6.jpg)
Did you have to write it with the funny o?
![Page 7: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/7.jpg)
Did you have to write it with the funny o?
Nope. You can write this with “oe” instead of “ö ”.
![Page 8: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/8.jpg)
Did you have to write it with the funny o?
Koenigsberg
Nope. You can write this with “oe” instead of “ö ”.
![Page 9: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/9.jpg)
Did you have to write it with the funny o?
Koenigsberg
Nope. You can write this with “oe” instead of “ö ”.
That looks familiar
![Page 10: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/10.jpg)
Koenig+s+berg
Koenig
![Page 11: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/11.jpg)
Don’t we have a street in Austin with that name?
Koenig+s+berg
Koenig
![Page 12: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/12.jpg)
Don’t we have a street in Austin with that name?
Koenig+s+berg
Koenig
![Page 13: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/13.jpg)
Don’t we have a street in Austin with that name?
Koenig+s+berg
Koenig
Yes, and another way of pronouncing “oe” in German is long A.
![Page 14: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/14.jpg)
KoenigSo, we could pronounce:
as KAY-nig?
![Page 15: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/15.jpg)
KoenigSo, we could pronounce:
as KAY-nig?
YUP
![Page 16: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/16.jpg)
Does this have anything to do with computer science?
![Page 17: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/17.jpg)
Does this have anything to do with computer science?
NOPE
![Page 18: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/18.jpg)
Back to Königsberg
Back to Königsberg
![Page 19: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/19.jpg)
Notice the seven bridges
Back to Königsberg
![Page 20: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/20.jpg)
Notice the seven bridges
1 2 3
4 56
7
![Page 21: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/21.jpg)
Leonard Euler asked: Can you start someplace and return there having crossed each bridge exactly once.
1 2 3
4 56
7
![Page 22: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/22.jpg)
You try it.
![Page 23: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/23.jpg)
Couldn’t do it, could you?
1 2 3
4 56
7
![Page 24: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/24.jpg)
Couldn’t do it, could you?Can we make this easier to consider?
1 2 3
4 56
7
![Page 25: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/25.jpg)
Let’s introduce some dots for the land areas:
1 2 3
4 56
7
![Page 26: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/26.jpg)
Let’s introduce some dots for the land areas:
1 2 3
4 56
7
![Page 27: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/27.jpg)
… and some lines for the bridges:
1 2 3
4 56
7
![Page 28: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/28.jpg)
… and some lines for the bridges:
1 2 3
4 56
7
![Page 29: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/29.jpg)
… and remove the picture:
1 2 3
4 56
7
![Page 30: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/30.jpg)
… and remove the picture:
1
2
3
4 56
7
![Page 31: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/31.jpg)
Do we gain anything by doing this?
1
2
3
4 56
7
![Page 32: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/32.jpg)
Do we gain anything by doing this?Sure. It’s easier to concentrate on what
matters.
1
2
3
4 56
7
![Page 33: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/33.jpg)
The lesson here is that sometimes it’s better to work with a model of the problem that captures just what’s important and no
more.
1
2
3
4 56
7
![Page 34: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/34.jpg)
The lesson here is that sometimes it’s better to work with a model of the problem that captures just what’s important and no
more. We call this abstraction.
1
2
3
4 56
7
![Page 35: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/35.jpg)
Can you see from the abstract model why there is no solution to the Seven Bridges of
Königsberg Problem?
1
2
3
4 56
7
![Page 36: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/36.jpg)
This is a general truth:
In any graph, there is a circuit containing every edge exactly once if and only if
every node touches an even number of edges.
![Page 37: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/37.jpg)
In the Seven Bridges of Königsberg Problem all four of the nodes have an odd
number of edges touching them.
1
2
3
4 56
7
5
3
3
3
![Page 38: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/38.jpg)
In the Seven Bridges of Königsberg Problem all four of the nodes have an odd
number of edges touching them.So there is no solution.
1
2
3
4 56
7
5
3
3
3
![Page 39: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/39.jpg)
In the Seven Bridges of Königsberg Problem all four of the nodes have an odd
number of edges touching them.So there is no solution.
1
2
3
4 56
7
![Page 40: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/40.jpg)
Now you try this one
![Page 41: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/41.jpg)
Pigeons and Holes
![Page 42: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/42.jpg)
The Pigeonhole Principle
![Page 43: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/43.jpg)
The Pigeonhole Principle
“If you have more pigeons than pigeonholes, you can’t stuff the pigeons into the holes without having at least two pigeons in
the same hole.”
![Page 44: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/44.jpg)
The Pigeonhole PrincipleExample 1:
Twelve people are on an elevator and they exit on ten
different floors. At least two got off on the same floor.
![Page 45: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/45.jpg)
The Pigeonhole PrincipleExample 2:
My house is burning down, it’s dark, and I need a pair of matched socks.
If I have socks of 4 colors, how many socks must I take from the drawer to
be certain I have a matched pair.
![Page 46: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/46.jpg)
The Pigeonhole PrincipleExample 3:
Let’s everybody select a favorite number between 1 and _.
![Page 47: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/47.jpg)
The Pigeonhole PrincipleExample 4:
Please divide 5 by 7 and obtain at least 13 decimal places.
![Page 48: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/48.jpg)
Let’s divide 5 by 7 and see what happens. .7
7|5.0 4 9 1
![Page 49: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/49.jpg)
Let’s divide 5 by 7 and see what happens. .71
7|5.00 4 9 10 7 3
![Page 50: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/50.jpg)
Let’s divide 5 by 7 and see what happens. .714
7|5.000 4 9 10 7 30 28 2
![Page 51: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/51.jpg)
Let’s divide 5 by 7 and see what happens. .7142
7|5.0000 4 9 10 7 30 28 20 14 6
![Page 52: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/52.jpg)
Let’s divide 5 by 7 and see what happens. .71428
7|5.00000 4 9 10 7 30 28 20 14 60 56 4
![Page 53: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/53.jpg)
Let’s divide 5 by 7 and see what happens. .714285
7|5.000000 4 9 10 7 30 28 20 14 60 56 40 35 5
![Page 54: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/54.jpg)
Let’s divide 5 by 7 and see what happens. .7142857
7|5.0000000 4 9 10 7 30 28 20 14 60 56 40 35 50 49 1
![Page 55: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/55.jpg)
Let’s divide 5 by 7 and see what happens. .7142857142857…
7|5.0000000000000 4 9 10 7 30 28 20 14 60 56 40 35 50 49 1
Same remainder!
Thus, the process must repeat.
![Page 56: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/56.jpg)
And this must happen whenever we divide whole numbers.
.3333333333333…3|1.0000000000000
.81818181818181…11|9.00000000000000
.075949367088607594936708860759494…237|18.000000000000000000000000000000000
.5000000000000…4|2.0000000000000
![Page 57: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/57.jpg)
planar Graphs
![Page 58: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/58.jpg)
This doesn’t look planar...
![Page 59: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/59.jpg)
but it is.
![Page 60: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/60.jpg)
but it is.
All that matters is that there is some planar representation.
![Page 61: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/61.jpg)
How about this problem:
![Page 62: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/62.jpg)
How about this problem:
You are given three houses…
H1 H3H2
![Page 63: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/63.jpg)
How about this problem:
You are given three houses…
and three utilities
H1 H3H2
Gas WaterElec.
![Page 64: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/64.jpg)
How about this problem:
You are given three houses…
and three utilities
H1 H3H2
Gas WaterElec.
Can you connect each of the houses to each of the utilities without crossing any
lines?
![Page 65: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/65.jpg)
Here’s how NOT to do it
H1 H2 H3
WaterElec.Gas
![Page 66: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/66.jpg)
Here’s how NOT to do it
H1 H2 H3
WaterElec.Gas
Remember: No crossing lines.
![Page 67: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/67.jpg)
Now you try.H1 H3H2
Gas WaterElec.
![Page 68: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/68.jpg)
Here’s another problem:
![Page 69: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/69.jpg)
Here’s another problem:
You are given five nodes…
1
3
2
4
5
![Page 70: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/70.jpg)
Here’s another problem:
You are given five nodes…
Can you connect each node to the others without crossing lines?
1
3
2
4
5
![Page 71: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/71.jpg)
This is NOT a solution:
2
34
5
1
![Page 72: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/72.jpg)
1
3
2
4
5
Now you try.
![Page 73: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/73.jpg)
You could not solve either problem.
What’s interesting is that those two problems are the ONLY ones
that cannot be solved.
![Page 74: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/74.jpg)
You could not solve either problem.
What’s interesting is that those two problems are the ONLY ones
that cannot be solved.
This is the result:A graph is nonplanar if and
only if it contains as subgraphs either the utility graph or the
complete five node graph.
![Page 75: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/75.jpg)
Can you say that again?
![Page 76: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/76.jpg)
Can you say that again?1. Look at all subgraphs with five or six nodes.
![Page 77: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/77.jpg)
Can you say that again?1. Look at all subgraphs with five or six nodes.
2. If you find an occurance of the utility graph or the complete graph with five nodes, it’s nonplanar.
![Page 78: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/78.jpg)
Can you say that again?1. Look at all subgraphs with five or six nodes.
2. If you find an occurance of the utility graph or the complete graph with five nodes, it’s nonplanar.
3. If you don’t find those, it’s planar.
![Page 79: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/79.jpg)
So using that, tell me if this graph is planar:
6
2
3
4
87
5
1
![Page 80: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/80.jpg)
You can find this subgraph, so it’s not planar
6
2
3
4
87
5
1
![Page 81: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/81.jpg)
Hamiltonian Circuits
![Page 82: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/82.jpg)
Back when we were looking at the Seven Bridges of Königsberg Problem, we wanted
a circuit that used every edge. Now let’s see is we can find a circuit that visits every
node once. 1
2
3
4 56
7
![Page 83: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/83.jpg)
That was simple. Try this one:
![Page 84: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/84.jpg)
Here’s the solution:
![Page 85: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/85.jpg)
Here’s another one:
![Page 86: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/86.jpg)
And here’s its solution:
![Page 87: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/87.jpg)
Traveling Salesman Problem
![Page 88: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/88.jpg)
Here we are given some nodes and we try to create a circuit that has
minimum total length.
![Page 89: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/89.jpg)
This is a 10 node problem to try.
![Page 90: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/90.jpg)
Here’s the solution.
![Page 91: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/91.jpg)
This is a 13 node problem to try.
![Page 92: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/92.jpg)
Here’s the solution.
![Page 93: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/93.jpg)
Why could a solution never have a crossing?
![Page 94: Breakfast Bytes: Pigeons, Holes, Bridges and Computers](https://reader035.fdocuments.us/reader035/viewer/2022070420/56815e0d550346895dcc6c18/html5/thumbnails/94.jpg)
Because you can always remove the crossing and get a shorter path.