SlideServe
Menu
Préférences
© SlideServe · v2026

Christofides Algorithm Implementation

lane-gillespie avatar
18 diapositives · 499 Views · Nov 16, 2014

Christofides Algorithm Implementation. Speaker : Jae Sung Choi. Development Circumstance. Java version :j2sdk1.4.1 Platform : Window XP Java Applet Relative Application : IE 5.0. Steps for Implementation. 1. Insert Basic Information. 2. Find Minimum Spanning Tree

Christofides Algorithm Implementation - slide 1
01 / 18Christofides Algorithm Implementation
1 / 17

Télécharger la présentation

Christofides Algorithm Implementation
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Christofides Algorithm Implementation Speaker : Jae Sung Choi

  2. Development Circumstance • Java version :j2sdk1.4.1 • Platform : Window XP • Java Applet • Relative Application : IE 5.0

  3. Steps for Implementation • 1. Insert Basic Information. • 2. Find Minimum Spanning Tree • 3. Find Odd degree vertices • 4. Minimum Weight Matching • 5. Find Euler Cycle Path • 6. Find TSP Cycle Path

  4. Insert Basic Information • Input vertex information - Clicking on the Applet window by user. • Edge Information : - Distance : Distance between each two vertices. - Each edge has start point and end point.

  5. class Nodes extends Object { int vId; Point xy; boolean startFlag; boolean oddFlag; } class Edges extends Object{ int eId; int start; int end; double distance; boolean passed; } Insert Basic Information(2)

  6. Insert Basic Information(3) • Example of insert vertex information

  7. Find Minimum Spanning Tree • Used Kruskal’s Algorithm for MST - Running Time : O(n log n) - Prim’s algorithm has longer running time such as O(n2)

  8. Find Minimum Spanning Tree • Calculate all edge’s distance. • Quick Sort for each edge’s distance • Choose Edge which has shortest distance. • Avoid cycle.

  9. Find Minimum Spanning Tree

  10. Find Odd degree vertices • In MST, there are odd degree vertices. • Find odd degree vertices. • How to find? - Each vertex is connected with at least one edge. - Count edge number which is connected to the chose vertex. - Every end vertex in MST is odd degree vertex.

  11. Find Odd degree vertices

  12. Minimum Weight Matching • Matching with minimum weight in set of odd degree vertices. - Calculate all distances between each odd degree vertices in the MST. - Choose shortest (closest) distance for matching. - Not Optimization.

  13. Minimum Weight Matching • Matching step is most important step for find shortest Travel Salesman Path.

  14. Minimum Weight Matching

  15. Find Euler Cycle Path • After combine the Matching graph and MST graph… • Find a path through the combined graph which starts and ends at the same vertex • Every edge can be visited exactly once.

  16. Find TSP Cycle Path • Using a short-cut concept, we visit each vertex exactly once. - Follow sequence of found Euler Cycle path. - If the sequence violates TSP rule, find next vertex which is not visited=>Short-Cut - Then continue follow the Euler Cycle path until we find start point.

  17. Find TSP Cycle Path Short Cut

  18. Run Chistofides Algorithm • http://student.uta.edu/js/jsc6567/demo/christofides.htm • Source : http://student.uta.edu/js/jsc6567/demo/christofides.java