Chapter 2 Methods For Finding A Hamiltonian Circuit Complete Graph - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Chapter 2 Methods For Finding A Hamiltonian Circuit Complete Graph

Description:

Find to obtain total # of different paths. Pick vertex & create tree diagram (delete duplicate paths) ... Traveling Salesman Problem ... – PowerPoint PPT presentation

Number of Views:177
Avg rating:3.0/5.0
Slides: 12
Provided by: richard319
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2 Methods For Finding A Hamiltonian Circuit Complete Graph


1
Chapter 2Methods For Finding A Hamiltonian
Circuit(Complete Graph)
  • I. Brute Force Method
  • II. Nearest Neighbor Algorithm
  • III. Sorted Edges Algorithm

2
Credits
  • COMAP, For All Practical Purposes, 5th ed.

3
I. Brute Force Method
  • Use Fundamental Counting Principle to obtain
    number of possible paths, K
  • Find to obtain total of
    different paths
  • Pick vertex create tree diagram (delete
    duplicate paths)
  • Add distances of each different path, choose path
    with smallest total
  • Always gives optimal solution

4
(No Transcript)
5
Using graph on left, draw the tree diagram
6
Add up distances. Pick shortest path
1985
2040
1877
7
II. Nearest Neighbor Algorithm
  • Select a starting vertex
  • Select the edge with the shortest path to the
    next vertex
  • Continue sequentially in this manner until you
    reach the original vertex and you have covered
    all vertices in the graph.
  • Remember If your selection will create a
    subcircuit, select an alternate shortest edge to
    the next vertex.

8
We will begin with vertex CFollow the path to
the nearest vertexRemember you cant form
subcircuit
9
III. Sorted Edges Algorithm
  • Sort the distances in increasing order 1,2,3,
  • Select the edge with distance 1
  • Select the next edge with distance 2 (unless that
    edge leads to a subcircuit or to a vertex with 3
    edges)then skip edge with distance 2 and select
    edge with distance 3
  • Continue until you return to starting point

10
Sort graphs edges 300,349,425,541,562,774Begin
with shortest edge, continue sequentiallyCant
form subcircuit, or 3 edges into a vertex
11
Traveling Salesman Problem
  • Find a minimum-cost Hamiltonian circuit in a
    complete graph where each edge has been assigned
    a cost or weight.
  • Can use any of the three methods described
    previously.
Write a Comment
User Comments (0)
About PowerShow.com