The Traveling-Salesman Problem. Born August 4, 1805 in Dublin, Ireland Died September 2, 1865 in Dublin, Ireland Made many contributions to the Physics.

Slides:



Advertisements
Similar presentations
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Advertisements

Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
6.8 The Cheapest-Link Algorithm. The Cheapest-Link Algorithm Pick the edge with the smallest weight and mark it Pick the next edge with the smallest weight.
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
AMDM UNIT 7: Networks and Graphs
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
Homework collection Read Pages 175 – 184 Page 188: 21 – 26, 29 – 36, 41 – 44, 47 – 49, 51, 52, 59, 62, 63.
§ Algorithms, Algorithms, Algorithms Recall that an algorithm is a set of procedures or rules that, when followed, lead to a ‘solution’ to.
A traveling salesman has customers in 5 cities which we will call A, B, C, D, and E. The salesman needs to travel to all 5 cities with his trip starting.
Traveling Salesman Problems Repetitive Nearest-Neighbor and Cheapest-Link Algorithms Chapter: 6.
§ Hamiltonian Circuits and Paths; Complete Graphs A sample-return mission sent to discover signs of microbial life on Mars is scheduled to be launched.
Traveling-Salesman Problems
Finding The Total Number Of Hamilton Circuits. The Traveling Salesman Problem is one of the most intensely studied problems in computational mathematics.
Math for Liberal Studies.  Here is a map of the parking meters in a small neighborhood  Our goal is to start at an intersection, check the meters, and.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
GRAPH Learning Outcomes Students should be able to:
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Graph Theory Hamilton Paths and Hamilton Circuits.
UNIT 3 THINKING MATHEMATICALLY BY BLITZER Hamilton Paths and Hamilton Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Discrete Math Unit 6 Set Theory Number Theory Graph Theory.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
© 2010 Pearson Prentice Hall. All rights reserved. 1 §15.3, Hamilton Paths and Circuits.
CSNB143 – Discrete Structure Topic 9 – Graph. Learning Outcomes Student should be able to identify graphs and its components. Students should know how.
Spring 2015 Mathematics in Management Science Traveling Salesman Problem Approximate solutions for TSP NNA, RNN, SEA Greedy Heuristic Algorithms.
Copyright © 2014, 2010, 2007 Pearson Education, Inc. Section 4.2, Slide 1 4 Graph Theory (Networks) The Mathematics of Relationships 4.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Page 714 #1-10 ANSWERS Lesson Reflection for Chapter 14 Section 7.
6.4: The Brute-Force Algorithms
 Graphs  Paths  Circuits  Euler. Traveling Salesman Problems.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
6.1 Hamilton Circuits and Hamilton Path
Mathematics in Management Science
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Graph Theory Hamilton Paths Hamilton Circuits and.
Associated Matrices of Vertex Edge Graphs Euler Paths and Circuits Block Days April 30, May 1 and May
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
The Traveling Salesman Starring: Mr. Brute Force Co Starring: Mrs. Sorted Edge Lord Nearest Neighbor.
1 Euler and Hamilton paths Jorge A. Cobb The University of Texas at Dallas.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
Weighted Graphs and traveling Salesperson problem
CSNB 143 Discrete Mathematical Structures
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Routing Through Networks - 1
HAMILTONIAN CIRCUIT ALGORITHMS
Chapter 2: Business Efficiency Lesson Plan
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
6.1 Hamilton Circuits and Hamilton Path
Cheapest-Link Algorithm/Sorted Edges (Unit 10) SOL: DM.2
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Classwork Worksheet Homework (day 67) worksheet
Hamilton Paths and Hamilton Circuits
Presentation transcript:

The Traveling-Salesman Problem

Born August 4, 1805 in Dublin, Ireland Died September 2, 1865 in Dublin, Ireland Made many contributions to the Physics field including advancements in the study of optics and dynamics Introductions to the Mathematics Field formed the study of quaternion an extension of complex numbers that allows work in the 3 rd and 4 th dimensions (symbolized by a bold H) invented the Icosian Game (now called Hamilton’s Puzzle) solved by using Icosian Calculus and these solutions developed into what are now called Hamilton Paths and Hamilton Circuits

Hamilton Path: a path touching every vertex exactly once  every edge does NOT have to be used F B A C D ADEBCF Hamilton Path Examples DABEGF EBADEG G C F NOT a Hamilton Path (Example) C E G

Hamilton Circuit: a circuit touching every vertex exactly once  every edge does NOT have to be used F D B A C E ADBCFE Hamilton Circuit Examples DAEFCB EFDABC A D F NOT a Hamilton Circuit (Example) E

Weight: a numerical value assigned to each edge of the graph Total Weight: the sum of the edges’ weights used to complete the Hamilton Circuit or Path Hamilton Circuit Examples A E B C D ABCDEA AEBCDA Hamilton Path Examples ABCDE AEBCD

Complete Graph: a graph with N vertices with edges connecting every pair of vertices  each vertex has a degree of (no loops)  denoted by the symbol K N  vertices can be named in any order for Hamilton Circuits Formula for the Number of Hamilton Circuits: Complete Graph Examples A CB AB CD A E B CD A G C D B F H E K 3 2 HC’s K 4 6 HC’s K 5 24 HC’s K 8 5,040 HC’s

 Name originates from the classic problem of a traveling-salesman needing to find the cheapest circuit that will allow him to visit multiple clients by traveling to each city just 1 time. the acronym TSP is used to identify this type of problem  TSPs are used to identify any type of problem that wants to find the cheapest route while touching every vertex exactly 1 time. Other Examples of TSPs: Package Deliveries School Bus Routes Fabricating Circuit Boards Scheduling Jobs on a Machine Running Errands Around Town

Brute-Force Algorithm a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. Nearest-Neighbor Algorithm a) Pick a Starting Vertex. b) Travel to The Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. Repetitive Nearest-Neighbor Algorithm a) Pick a Starting Vertex. b) Follow the Steps for the Nearest-Neighbor Algorithm (above). c) Repeat the process until EVERY vertex has become the starting/ending vertex. Cheapest-Link Algorithm a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Jerry is the Managing Partner of the “You’re Not Guilty” Law Firm. Part of managing one of the top law firms in the country is having to travel to all 5 of their major offices each month to meet with the partners. While Jerry lives in Dallas, he must visit Chicago, Los Angeles, Miami, and New York. Traveling obviously costs money and in order for clients not to feel like they are being overcharged, Jerry has to make sure that he travels to all 5 cities for as little as possible. We must find the most cost effective means for him to travel between these cities and end back home in Dallas. The cost of flights from each city is found on the following slides. Los Angeles Dallas Chicago Miami New York

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a DALLASn/a LOS ANGELES n/a MIAMIn/a NEW YORK n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLASn/a LOS ANGELES n/a MIAMIn/a NEW YORK n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES n/a MIAMIn/a NEW YORK n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMIn/a NEW YORK n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $937 $907 $787 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $937 $1,147 $787 $864 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $818 $907 $864 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $818 $799 $787 $864 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $1,094 $907 $1,147 $864 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $952 $1,094 $907 $799 $787 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $1,094 $787 $1,147 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–MIA–NY–LA–CHI–DAL = $799 + $937 + $1,094 + $787 + $1,147 = $4,764 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $818 $907 $1,094 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–MIA–NY–LA–CHI–DAL = $799 + $937 + $1,094 + $787 + $1,147 = $4,764 DAL–MIA–CHI–NY–LA–DAL = $799 + $907 + $818 + $1,094 + $779 = $4,397 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $1,147 $864 $818 $1,094 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–MIA–NY–LA–CHI–DAL = $799 + $937 + $1,094 + $787 + $1,147 = $4,764 DAL–MIA–CHI–NY–LA–DAL = $799 + $907 + $818 + $1,094 + $779 = $4,397 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539 DAL–MIA–LA–NY–CHI–DAL = $799 + $864 + $1,094 + $818 + $1,147 = $4,722

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $1,147 $937 $818 $864 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–MIA–NY–LA–CHI–DAL = $799 + $937 + $1,094 + $787 + $1,147 = $4,764 DAL–MIA–CHI–NY–LA–DAL = $799 + $907 + $818 + $1,094 + $779 = $4,397 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539 DAL–CHI–NY–MIA–LA–DAL = $1,147 + $818 + $937 + $864 + $779 = $4,545 DAL–MIA–LA–NY–CHI–DAL = $799 + $864 + $1,094 + $818 + $1,147 = $4,722

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $1,147 $937 $907 $1,094 $779 Brute-Force

Steps for Solving the 5 Cities Example a) Make a list of ALL possible Hamilton Circuits. b) Calculate the Total Weight of EVERY Hamilton Circuit & Find the Cheapest One. DAL–MIA–NY–CHI–LA–DAL = $799 + $937 + $818 + $787 + $779 = $4,120 DAL–MIA–NY–LA–CHI–DAL = $799 + $937 + $1,094 + $787 + $1,147 = $4,764 DAL–MIA–CHI–NY–LA–DAL = $799 + $907 + $818 + $1,094 + $779 = $4,397 DAL–NY–MIA–CHI–LA–DAL = $952 + $937 + $907 + $787 + $779 = $4,362 DAL–NY–MIA–LA–CHI–DAL = $952 + $937 + $864 + $787 + $1,147 = $4,687 DAL–NY–CHI–MIA–LA–DAL = $952 + $818 + $907 + $864 + $779 = $4,320 DAL–NY–CHI–LA–MIA–DAL = $952 + $818 + $787 + $864 + $799 = $4,220 DAL–NY–LA–MIA–CHI–DAL = $952 + $1,094 + $864 + $907 + $1,147 = $4,964 DAL–NY–LA–CHI–MIA–DAL = $952 + $1,094 + $787 + $907 + $799 = $4,539 DAL–CHI–NY–MIA–LA–DAL = $1,147 + $818 + $937 + $864 + $779 = $4,545 DAL–CHI–MIA–NY–LA–DAL = $1,147 + $907 + $937 + $1,094 + $779 = $4,864 DAL–MIA–LA–NY–CHI–DAL = $799 + $864 + $1,094 + $818 + $1,147 = $4,722

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Since each circuit can be traveled in 2 directions, we only had to look at 12 circuits to cover all 24 possibilities. This circuit can be traveled in either direction

Steps for the Nearest-Neighbor Algorithm a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. a) Once you get to the last vertex, connect it back to the starting vertex. While the Brute-Force Algorithm will ALWAYS find the cheapest method, it is not very time friendly. The Nearest-Neighbor Algorithm is a method that allows you to find the “cheapest” circuit without having to analyze every possible circuit.

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147 $ 779 $ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787$ 779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 $ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907 $ 818 DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 937

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 937

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 937 (4)

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI $799 NEW YORK $ 937 (4)

Steps for Solving the 5 Cities Example a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 907$ 818 (3) DALLAS$ 1,147$ 779 (1)$ 799$ 952 LOS ANGELES $ 787 (2)$ 864$ 1,094 MIAMI$799 (5) NEW YORK $ 937 (4)

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Nearest-Neighbor

Steps for the Repetitive Nearest-Neighbor Algorithm a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. d) Repeat the process until EVERY vertex has become the starting/ending vertex. If Jerry applied the Nearest-Neighbor Algorithm to his flight plans, he would have been able to find the cheapest route without as much work. The question that follows is, “Why ever use the Brute-Force Method if the Nearest-Neighbor Algorithm works?” Lets look at the same 5 City Example, but this time find out if the Nearest-Neighbor Algorithm works no matter what city Jerry lives in.

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 $ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $779$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $779 $ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS $ 799 $ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI $ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 937 (4) NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 937 (4) NEW YORK $ 818

Steps for Solving the 5 Cities Example – Home: Chicago a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (1)$ 907$ 818 DALLAS$ 799 (3)$ 952 LOS ANGELES $779 (2)$ 864$ 1,094 MIAMI$ 937 (4) NEW YORK $ 818 (5)

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Nearest-Neighbor

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787 $779 $ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147 $ 799 $ 952 LOS ANGELES $ 787$779 (1)$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 799 (2)$ 952 LOS ANGELES $ 787$779 (1)$ 864$ 1,094 MIAMI $ 907 $ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO $ 818 DALLAS$ 1,147$ 799 (2)$ 952 LOS ANGELES $ 787$779 (1)$ 864$ 1,094 MIAMI$ 907 (3)$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 818 (4) DALLAS$ 1,147$ 799 (2)$ 952 LOS ANGELES $ 787$779 (1)$ 864$ 1,094 MIAMI$ 907 (3)$ 937 NEW YORK $ 1,094

Steps for Solving the 5 Cities Example – Home: Los Angeles a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 818 (4) DALLAS$ 1,147$ 799 (2)$ 952 LOS ANGELES $ 787$779 (1)$ 864$ 1,094 MIAMI$ 907 (3)$ 937 NEW YORK $ 1,094 (5)

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $907 $818 $1,094 $779 Nearest-Neighbor

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907 $799 $ 864$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147 $ 779 $ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799 (1)$ 864$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779 (2)$ 952 LOS ANGELES $ 787 $ 1,094 MIAMI$ 907$799 (1)$ 864$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO $ 818 DALLAS$ 1,147$ 779 (2)$ 952 LOS ANGELES $ 787 (3)$ 1,094 MIAMI$ 907$799 (1)$ 864$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 818 (4) DALLAS$ 1,147$ 779 (2)$ 952 LOS ANGELES $ 787 (3)$ 1,094 MIAMI$ 907$799 (1)$ 864$ 937 NEW YORK $ 937

Steps for Solving the 5 Cities Example – Home: Miami a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 818 (4) DALLAS$ 1,147$ 779 (2)$ 952 LOS ANGELES $ 787 (3)$ 1,094 MIAMI$ 907$799 (1)$ 864$ 937 NEW YORK $ 937 (5)

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Nearest-Neighbor

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818 $952$ 1,094$ 937

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 $ 907 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818 (1)$952$ 1,094$ 937

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (2)$ 907 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $779 $ 864 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818 (1)$952$ 1,094$ 937

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (2)$ 907 DALLAS $ 799 LOS ANGELES $779 (3)$ 864 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818 (1)$952$ 1,094$ 937

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (2)$ 907 DALLAS$ 799 (4) LOS ANGELES $779 (3)$ 864 MIAMI $ 937 NEW YORK $ 818 (1)$952$ 1,094$ 937

Steps for Solving the 5 Cities Example – Home: New York a) Pick a Starting Vertex. b) Travel to the Closest (Cheapest) Vertex. Repeat until ALL vertices are used 1 time. c) Once you get to the last vertex, connect it back to the starting vertex. CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787 (2)$ 907 DALLAS$ 799 (4) LOS ANGELES $779 (3)$ 864 MIAMI$ 937 (5) NEW YORK $ 818 (1)$952$ 1,094$ 937

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4, $799 $937 $818 $787 $779 Nearest-Neighbor

Conclusion for the 5 Cities Example HOME CITYCOST OF CIRCUIT Chicago$ 4,120 Dallas$ 4,120 Los Angeles$ 4,397 Miami$ 4,120 New York$ 4,120 This shows us that if Jerry lived in Los Angeles, it would not have been beneficial for him to trust the Nearest-Neighbor Algorithm. This does not mean he should not live in Los Angeles. It just shows that if using the Nearest-Neighbor Algorithm, you must check it from all the possible vertices to guarantee your answer is the cheapest.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGOn/a$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147n/a$ 779$ 799$ 952 LOS ANGELES $ 787$779n/a$ 864$ 1,094 MIAMI$ 907$799$ 864n/a$ 937 NEW YORK $ 818$952$ 1,094$ 937n/a Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787$ 907$ 818 DALLAS$ 1,147$ 779$ 799$ 952 LOS ANGELES $ 787$779$ 864$ 1,094 MIAMI$ 907$799$ 864$ 937 NEW YORK $ 818$952$ 1,094$ 937 Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787$ 907$ 818 DALLAS$ 779$ 799$ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787$ 907$ 818 DALLAS $ 779 $ 799$ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147$ 787$ 907$ 818 DALLAS $ 779 (1) $ 799$ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 $ 907$ 818 DALLAS $ 779 (1) $ 799$ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link $787

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907$ 818 DALLAS $ 779 (1) $ 799$ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907$ 818 DALLAS $ 779 (1) $ 799 $ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link $787 $799

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907$ 818 DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link $787 $799 $818

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 864$ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 864 $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link $787 $799 $818 $864

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 864 $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $779 Cheapest-Link $787 $799 $818 $907

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2) $ 907 $ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2)$ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 1,094 MIAMI$ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

CITIESCHICAGODALLAS LOS ANGELES MIAMI NEW YORK CHICAGO$ 1,147 $ 787 (2)$ 818 (4) DALLAS $ 779 (1)$ 799 (3) $ 952 LOS ANGELES $ 1,094 MIAMI $ 937 NEW YORK Steps for Solving the 5 Cities Example a) Pick the edge with the smallest weight first. (if a tie, randomly choose one) b) Pick the next smallest edge. (make sure you mark each edge used – only use once) c) Repeat the process until EVERY vertex has been linked. (using each vertex once) d) Once every vertex has been used, link the last vertex back to the starting vertex.

Los Angeles Dallas Chicago Miami New York TOTAL COST: $ 4,120 $779 Cheapest-Link $787 $799 $818 $937

You Now Know All About