Presentation is loading. Please wait.

Presentation is loading. Please wait.

* Hamiltonian Circuits introduction

Similar presentations


Presentation on theme: "* Hamiltonian Circuits introduction"— Presentation transcript:

1 * Hamiltonian Circuits introduction
07/16/96 Management Science Hamiltonian Circuits introduction *

2 What’s the difference? Euler Circuit Problems: Problems where travel
* 07/16/96 What’s the difference? Euler Circuit Problems: Problems where travel along every EDGE was required *

3 What’s the difference? Hamiltonian Circuit Problems:
* 07/16/96 What’s the difference? Hamiltonian Circuit Problems: Problems that require travel To every VERTEX *

4 Ch 6: Vocabulary Hamilton Path: path that passes through every vertex of the graph Hamilton Circuit: circuit that visits each vertex only once (except where it returns to the starting vertex) Note – Hamilton Paths and circuits are NOT mutually exclusive of one another!

5 Ch 6: Vocabulary Complete Graph: every pair of vertices is joined by exactly one edge. Each of the N vertices has degree N-1 Total number of edges KN = N(N-1)/2 KN has the most edges of any graph of N vertices as long as there are no loops or multiple edges.

6 Ch 6: Vocabulary Weighted Graph: a graph whose edges have numbers attached to them. Weights – numbers could represent time, money, or distance.

7 Euler Circuits & Paths 2 4, 6, 8, …. 1, 3, 5 …..
Number of Odd Vertices Conclusion  Euler Circuit 2  Euler Path 4, 6, 8, ….  Neither 1, 3, 5 …..

8 Hamilton Circuits Dirac’s Theorem – If a connected graph has N vertices (N>2) and all of them have degree bigger than or equal to N/2, then the graph has a Hamilton Circuit.

9 Hamilton’s Circuits If a graph is complete it has a Hamilton Circuit.

10 Number of Hamilton Circuits in KN
There are (N – 1)! Distinct Hamilton Circuits in KN Example: D C B A Is this graph complete? N = 4, every vertex degree → 3  # of Hamilton circuits? (4-1)! = 6 Find Them

11 Are you finding more than expected?
Lets take a look at why our numbers aren’t matching up. CADBC BCADB D C B A D C B A

12 Distinct Hamilton Circuits in KN
There are (N – 1)! Distinct Hamilton Circuits in KN If it is the same circuit, but different reference point, It is not distinct

13 Find all 6 DISTINCT HC’s Mirror images ABCDA ABDCA ACBDA ACDBA ADBCA
ADCBA Mirror images

14 Mirror images ABCDA ADCBA ABDCA ACDBA ACBDA ADBCA
# of distinct HC, disregarding mirror images 𝑁−1 ! 2

15 Factorials N 1 2 Remember…… 3 (6)! = 4 6 x 5 x 4 x 3 x 2 x 1 5 6 7 8 9
10 Remember…… (6)! = 6 x 5 x 4 x 3 x 2 x 1

16 Factorial Examples 20! 10! 11! 10! (9!+11!) 10! How many edges in K21?

17 EXAMPLES OF HAMILTONIAN CIRCUIT PROBLEMS
* 07/16/96 EXAMPLES OF HAMILTONIAN CIRCUIT PROBLEMS The traveling salesman City bus routes (pick ups at a specific stop) Tour bus routes (to specific sites) Field trip routes (to specific displays/exhibits/areas of interest) *

18 Hamiltonian Circuit Application
* 07/16/96 Hamiltonian Circuit Application Fred is really quite lazy. He has to deliver flowers to 3 different houses, and really doesn’t enjoy the walk. He wants to figure out the shortest route (# of blocks) that will take him to each of the 3 houses one time, and get him back to the greenhouse. *

19 The GRAPHIC interpretations of the solutions to the “Fred is lazy” problem...
Route #1 G B R O Route #2 The original “map” can be drawn in this way... To simplify the look of the problem. There are only 3 distinct routes that could be used... G B R O Route #3

20 Hamiltonian SUBGRAPHS...
Route #1 G B R O Route #2 G B R O Route #3 You should notice that these 3 figures represent the ONLY possible routes Fred could take. Each figure is called a SUBGRAPH of the original graph. Each figure can be used to describe a number of routes depending on the starting point.

21 Using Hamiltonian subgraphs to find hamiltonian circuits...
Route #1 G B R O Route #2 G B R O Route #3 ROUTE #1: Two possible circuits that could be drawn on this subgraph are: G-B-O-R-G or G-R-O-B-G, if the greenhouse must be the starting and ending point. Notice that these circuits are “mirror images” of one another. ROUTE #2: could be described G-R-B-O-G or its mirror image circuit. ROUTE #3: G-B-R-O-G or its mirror image circuit.

22 The “lazy Fred” application
If you are given the total number of blocks from one house to another, you can examine the three subgraphs to determine the most efficient route Fred could take. In this case, the OPTIMAL solution will be the one that covers the fewest blocks. 3 2 1 4 G B R O The numbers on the edges of the graph represent the # of blocks from one house to the other along a given edge. We will call these values the WEIGHTS of the edges.

23 The OPTIMAL ROUTE?... G B R O G B R O G B R O
For ROUTE #1, the total WEIGHT is: = 13 blocks ROUTE #2: wt. = = 10 blocks ROUTE #3: wt.= = 9 blocks Making route #3 Fred’s most efficient way to deliver the flowers.


Download ppt "* Hamiltonian Circuits introduction"

Similar presentations


Ads by Google