Warm -Up. 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices?

Similar documents
Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Chapter 14 Section 3 - Slide 1

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

Finite Math A Chapter 6 Notes Hamilton Circuits

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

Chapter 6. The Traveling-Salesman Problem. Section 1. Hamilton circuits and Hamilton paths.

14 Graph Theory. Exercise Set 14-1

6.2 Initial Problem. Section 6.2 Network Problems. 6.2 Initial Problem, cont d. Weighted Graphs. Weighted Graphs, cont d. Weighted Graphs, cont d

1. Read each problem carefully and follow the instructions.

Circuits and Paths. April 13, 2014

The Traveling Salesman Problem

Simple Graph. General Graph

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Undirected Network Summary

Mathematical Thinking

Lesson 5.2. The Traveling Salesperson Problem. Explore This

IE 102 Spring Routing Through Networks - 1

Study Guide Mods: Date:

PATH FINDING AND GRAPH TRAVERSAL

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

08. First and second degree equations

Notes for Recitation 9

MATH 103: Contemporary Mathematics Study Guide for Chapter 6: Hamilton Circuits and the TSP

A path that visits every vertex exactly once is a Hamiltonian path. A circuit that visits every vertex exactly once is a Hamiltonian circuit.

(Refer Slide Time: 01:00)

Math for Liberal Arts MAT 110: Chapter 13 Notes

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

Travel Every Edge 3. Example (Travel Every Edge 3) In the graphs above, can you find a circuit that hits every edge without repeating any edges?

Sec 2. Euler Circuits, cont.

Unit 7 Day 6. Section 5.2 Traveling Salesman Problem & Section 5.3 Finding the Shortest Route

EECS 203 Lecture 20. More Graphs

Module 2: NETWORKS AND DECISION MATHEMATICS

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Note that there are questions printed on both sides of each page!

Exercise 1. D-ary Tree

Majority and Friendship Paradoxes

MTH-129 Review for Test 4 Luczak

1. The Highway Inspector s Problem

CS 440 Theory of Algorithms /

Topic 10 Part 2 [474 marks]

A region is each individual area or separate piece of the plane that is divided up by the network.

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS

NP-Hard (A) (B) (C) (D) 3 n 2 n TSP-Min any Instance V, E Question: Hamiltonian Cycle TSP V, n 22 n E u, v V H

Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz

Graphs II: Trailblazing

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

WUCT121. Discrete Mathematics. Graphs

CPSC 320: Intermediate Algorithm Design and Analysis. Tutorial: Week 3

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Lecture 1: An Introduction to Graph Theory

Graph Theory II. Po-Shen Loh. June edges each. Solution: Spread the n vertices around a circle. Take parallel classes.

Euler and Hamilton circuits. Euler paths and circuits

2-2 Adding Integers. Warm Up Problem of the Day Lesson Presentation Lesson Quizzes

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1

CSC 8301 Design and Analysis of Algorithms: Exhaustive Search

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

6.2. Paths and Cycles

GRAPH THEORY: AN INTRODUCTION

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)

Applications. 72 Variables and Patterns

Questions... How does one show the first problem is NP-complete? What goes on in a reduction? How hard are NP-complete problems?

With your construction team, create a list of the 10 most important necessities for completing the development of the island:

MA 111 Review for Exam 3

Sarah Will Math 490 December 2, 2009

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

#30: Graph theory May 25, 2009

Sections 5.2, 5.3. & 5.4

SIM Camp Instructor Application Summer 2017 Submission 4 12/31/ :19:35 A.M.

Math 110 Graph Theory II: Circuits and Paths


Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1

ASSIGNMENT 4 SOLUTIONS

Chapter 8 Topics in Graph Theory

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

Street-Routing Problems

Discrete mathematics

Optimal tour along pubs in the UK

Approximation Algorithms

Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

1. trees does the network shown in figure (a) have? (b) How many different spanning. trees does the network shown in figure (b) have?

CSE 417 Branch & Bound (pt 4) Branch & Bound

On Two Short Proofs About List Coloring Graphs

An Interactive Introduction to Graph Theory

Coping with the Limitations of Algorithm Power Exact Solution Strategies Backtracking Backtracking : A Scenario

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

MEI Further Mathematics Support Programme

Solving Quadratics Algebraically Investigation

Chapter 3: Paths and Cycles

21-110: Problem Solving in Recreational Mathematics

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

A COMPARATIVE STUDY OF BRUTE FORCE METHOD, NEAREST NEIGHBOUR AND GREEDY ALGORITHMS TO SOLVE THE TRAVELLING SALESMAN PROBLEM

11-5 Networks. Königsberg Bridge Problem

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

Transcription:

Warm -Up 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices? 1. Is this graph a. traceable? b. Eulerian? 3. Eulerize this graph.

Warm-Up Eulerize this graph. Remember: you cannot create NEW edges, only duplicate old ones. A C D B E

Graph Theory: Hamilton Circuits and the Traveling Salesperson Intro: Traveling Salesperson Example (TSP) Danielle is a regional sales manager for a publishing company, lives in Philadelphia, and must make visits next week to branch offices in New York City, Cleveland, Atlanta, and Memphis. In order to find the cheapest trip, she has found the prices of flights between each pair of cities. How should she travel between the cities to keep her costs at the lowest value? Model Danielle s trip with a graph:

Flight Prices NYC > Cleveland $350 NYC > Memphis $310 NYC > Philadelphia $210 NYC > Atlanta $250 Cleveland > Philadelphia $420 Cleveland > Atlanta $290 Cleveland > Memphis $240 Memphis > Philadelphia $280 Memphis > Atlanta $170 Atlanta > Philadelphia $230

Find 2 paths that Danielle could take if she leaves from Philadelphia and must return there by the end of the week. A that path crosses through all of the vertices exactly once is called a Hamilton path. If a Hamilton path begins and ends at the same vertex it is called a Hamilton Circuit. Hmm the definition of a Hamilton path sounds very similar to the definition of an Euler path. What is the difference between an Euler path and a Hamilton path??? Euler path: ALL EDGES ONCE Hamilton path: ALL VERTICES ONCE

Examples: Find a Hamilton Path in each graph shown. (all vertices once) A Is the path also a Hamilton circuit? (begins and ends at the same vertex) C D A C E F B E B D BACDGEF BACFEGD ABCFDGEA Circuit G

pair A complete graph is one in which every of is joined by an. A complete graph with n vertices is denoted. vertices edge Kn A A D B A C B C B C E D Observations: What do you notice about the degree at each vertex in relation to the number of vertices n?

Can you come up with a formula for the number of edges in a complete graph with n vertices? n (vertices) # of edges 0 0 1 0 2 1 3 3 4 6 5 10 n?

Often, we will need to find ALL of the Hamilton circuits in a graph (such as in the traveling salesperson example!). Hints: Always start with vertex A. (It doesn t matter, but let s just use A to be consistent) Make a tree-diagram Do you notice any other pattern? Example: Find all of the Hamilton circuits in K 4.

Note: Hamilton circuits occur in. pairs If you find one Hamilton circuit, reverse the, order and you have a new one

What would the tree-diagram for K 5 look like?

Can you figure out the formula for the number of Hamilton Circuits in K n? Vertices (n) # of Hamilton Cir. 3 2 4 6 5 24 6 120 n

The # of Hamilton circuits in K n : K n has (n-1) (n-2) (n-3) (n-4).. (3) (2) (1). This number is written (n 1)! and is called (n-1). factorial 5 Vertices: = (5 1)! = 4! = 4 3 2 1 = 24 Hamilton Circuits

When we assign numbers to the edges of a graph, the graph is called a weighted graph and the numbers on the edges are called weights. The weight of a path in a weighted graph is the sum of the weights on the of the path. edges Let s go back and solve the Traveling Salesperson Example. Figure 4.7 A weighted graph of the TSP example. The weights represent money.

The Brute-Force Algorithm 1. List all Hamilton Circuits in the graph 1. Find the weights of each circuit from Step 1 3. The circuits with the smallest weight give the solutions to the TSP.

Circuit Weight ($) PACMNP PACNMP PAMCNP PAMNCP PANCMP PANMCP PCAMNP PCANMP PCMANP PCNAMP PMACNP PMCANP C 240 M Why do we only need to list 12 circuits? 350 170 P N 250 A

Was this method reliable? Was YES! this method fast? NO! What if Danielle had to visit 15 cities?!?!?!? Let s say we could examine 1 circuit per minute. How many years would this take? 15 Vertices: = (15 1)! = 14! = 87,178,291,200 Hamilton Circuits 87,178,291,200/60 = 1,452,971,520 hours 1,452,971,520/24 = 60,540,480 Days 60,540,480/365 = 165,864 YEARS!

The Nearest-Neighbor Algorithm 1. Start at any vertex x. 2. Choose the edge connected to x that has the smallest weight. 3. Choose subsequent new vertices as you did in step 2. 4. Close the circuit by returning to the starting vertex. Example: Use the Nearest-Neighbor Algorithm to schedule Danielle s trip. P N A M C P $210 + $250 + $170 + $240 + $420 = $1290 C M 350 P N 240 250 170 A

Pros and cons of Nearest- Neighbor compared with Brute- Force Algorithm?

The Best-Edge Algorithm 1. Begin by choosing any edge with the smallest weight. 2. Choose any remaining edge in the graph with the smallest weight. 3. Keep repeating Step 2; Do not close a circuit until all vertices have been joined. C M 350 N 240 250 170 P A Example: Use the Best-Edge Algorithm to schedule Danielle s trip. P N C M A P P A M C N P $1200

How does this result compare to the Brute- Force Algorithm? Do you think this result is guaranteed every time with this method?