Top Banner
Chapter 2: Business Efficiency Lesson Plan Business Efficiency Visiting Vertices-Graph Theory Problem Hamiltonian Circuits Vacation Planning Problem Minimum Cost-Hamiltonian Circuit Method of Trees Fundamental Principle of Counting Traveling Salesman Problem Helping Traveling Salesmen Nearest Neighbor and Sorted Edges Algorithms Minimum-Cost Spanning Trees Kruskal’s Algorithm Critical-Path Analysis Mathematical Literacy in Today’s World, 8th ed. For All Practical Purposes
40

Chapter 2: Business Efficiency Lesson Plan

Dec 30, 2015

Download

Documents

travis-hodges

For All Practical Purposes. Chapter 2: Business Efficiency Lesson Plan. Business Efficiency Visiting Vertices-Graph Theory Problem Hamiltonian Circuits Vacation Planning Problem Minimum Cost-Hamiltonian Circuit Method of Trees Fundamental Principle of Counting Traveling Salesman Problem - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyLesson Plan Business Efficiency

Visiting Vertices-Graph Theory Problem

Hamiltonian Circuits Vacation Planning Problem

Minimum Cost-Hamiltonian Circuit Method of Trees

Fundamental Principle of Counting

Traveling Salesman Problem

Helping Traveling Salesmen Nearest Neighbor and Sorted Edges Algorithms Minimum-Cost Spanning Trees

Kruskal’s Algorithm

Critical-Path Analysis

Mathematical Literacy in Today’s World, 8th

ed.

For All Practical Purposes

Page 2: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyBusiness Efficiency

Visiting Vertices In some graph theory problems, it is only necessary to visit

specific locations (using the travel routes, or streets available). Problem: Find an efficient route along distinct edges of a graph

that visits each vertex only once in a simple circuit.

Applications: Salesman visiting

particular cities Delivering mail to

drop-off boxes Route taken by a

snowplow Pharmaceutical

representative visiting doctors

Page 3: Chapter 2:  Business Efficiency Lesson Plan

Hamiltonian CircuitA tour that starts and ends at the same

vertex (circuit definition).Visits each vertex once. (Vertices cannot

be reused or revisited.)Circuits can start at any location. Use wiggly edges to show the circuit.

Chapter 2: Business EfficiencyHamiltonian Circuit

Page 4: Chapter 2:  Business Efficiency Lesson Plan

Starting at vertex A, the tour can be written as ABDGIHFECA, or starting at E, it would be EFHIGDBACE.

Chapter 2: Business EfficiencyBusiness Efficiency

Page 5: Chapter 2:  Business Efficiency Lesson Plan

A different circuit visiting each vertex once and only once would be CDBIGFEHAC (starting at vertex C).

Chapter 2: Business EfficiencyBusiness Efficiency

Page 6: Chapter 2:  Business Efficiency Lesson Plan

Euler circuit – A circuit that traverses each edge of a graph exactly once and starts and stops at the same point.

Chapter 2: Business EfficiencyHamiltonian Circuit vs. Euler Circuits

Page 7: Chapter 2:  Business Efficiency Lesson Plan

Hamiltonian circuit – A tour (showed by wiggly edges) that

starts at a vertex of a graph and visits each vertex once and only once, returning to where it started.

Chapter 2: Business EfficiencyHamiltonian Circuit vs. Euler Circuits

Page 8: Chapter 2:  Business Efficiency Lesson Plan

Hamiltonian vs. Euler CircuitsSimilarities

Both forbid re-use.Hamiltonian do not reuse vertices.Euler do not reuse edges.

Chapter 2: Business EfficiencyHamiltonian Circuit vs. Euler Circuits

Page 9: Chapter 2:  Business Efficiency Lesson Plan

DifferencesHamiltonian is a circuit of vertices.Euler is a circuit of edges.Euler graphs are easy to spot (connectedness and even valence).Hamiltonian circuits are NOT as easy to determine upon inspection.Some certain family of graphs can be known to have or not have Hamiltonian circuits.

Chapter 2: Business EfficiencyHamiltonian Circuit vs. Euler Circuits

Page 10: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Example 1

Vacation Planning Problem

Page 11: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Let’s imagine that you are a college student in Chicago. During spring break you and a group of friends have decided to take a car trip to visit other friends in Minneapolis, Cleveland, and St. Louis. There are many choices as to the order of visiting cities and returning to Chicago, but you want to design a route that minimizes the distance you have to travel. This will also cut costs because of the cost of gasoline for the trip.

Page 12: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Similar problems with complications would arise for bus, railroad, or airplane trips.

Now the local automobile club has provided you with the inter-city driving distances between Chicago, Minneapolis, Cleveland, and St. Louis.

We can construct a graph model with this information, representing each city by a vertex and the legs of the journey between cities by edges joining the vertices.

To complete the model, we add a number called a weight to each graph edge.

Page 13: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Road mileage between four cities

Page 14: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Hamiltonian circuit concept is used to find the best route that minimizes the total distance traveled to visit friends in different cities. (assume less mileage less gas minimizes costs)

Page 15: Chapter 2:  Business Efficiency Lesson Plan

Hamiltonian circuit with weighted edges Edges of the graph are given weights, or in

this case mileage or distance between cities. As you travel from vertex to vertex, add the

numbers (mileage in this case). Each Hamiltonian circuit will produce a

particular sum.

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 16: Chapter 2:  Business Efficiency Lesson Plan

Minimum-Cost Hamiltonian Circuit A Hamiltonian circuit with the lowest

possible sum of the weights of its edges.

Chapter 2: Business EfficiencyHamiltonian Circuit

Algorithm is a step-by-step description of how to solve a problem.

Page 17: Chapter 2:  Business Efficiency Lesson Plan

Algorithm (step-by-step process) for Solving This Problem

1. Generate all possible Hamiltonian tours (starting with Chicago).

2. Add up the distances on the edges of each tour.

3. Choose the tour of minimum distance.

Chapter 2: Business EfficiencyHamiltonian Circuit

Page 18: Chapter 2:  Business Efficiency Lesson Plan

Steps 2 and 3 of the algorithm are straightforward. Thus, we need worry only about Step 1, generating all the possible Hamiltonian circuits in a systematic way.

Chapter 2: Business EfficiencyHamiltonian Circuit

To find the Hamiltonian tours, we will use the method of trees. In this step we disregard the distances.

Page 19: Chapter 2:  Business Efficiency Lesson Plan

1st Stage

Chapter 2: Business EfficiencyHamiltonian Circuit

This stage is where you select a starting vertex, say Chicago, and making a tree-diagram showing the next possible locations.

Page 20: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuit

Page 21: Chapter 2:  Business Efficiency Lesson Plan

2nd Stage

Chapter 2: Business EfficiencyHamiltonian Circuit

At each subsequent stage down, there will be one less choice .

Page 22: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuit

22

Page 23: Chapter 2:  Business Efficiency Lesson Plan

3rd Stage

Chapter 2: Business EfficiencyHamiltonian Circuit

At each subsequent stage down, there will be one less choice .

Page 24: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 25: Chapter 2:  Business Efficiency Lesson Plan

Notice that 1 and 6 are the same tour, 2 and 4 are the same tour, and 3 and 5 are the same tour.So there are only three are unique circuits.Find the total distance for each unique circuit.

Name the 6 tours from the tree.

Chapter 2: Business EfficiencyHamiltonian Circuits

1. C-M-S-CL-C

2. C-M-CL-S-C

3. C-S-M-CL-C

4. C-S-CL-M-C

5. C-CL-M-S-C

6. C-CL-S-M-C

Page 26: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

The three Hamiltonian circuits’ sums of the tours

The optimal tour is Chicago, Minneapolis, St. Louis, Cleveland, Chicago.

These graphs are called complete graphs.

Page 27: Chapter 2:  Business Efficiency Lesson Plan

CHAPTER 2: BUSINESS EFFICIENCYHAMILTONIAN CIRCUITS

2nd Day

Page 28: Chapter 2:  Business Efficiency Lesson Plan

Complete graph – A graph in which every pair of vertices is joined by an edge.

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 29: Chapter 2:  Business Efficiency Lesson Plan

Suppose instead of going to 4 cities you had to plan a minimum cost circuit for 100 cities.

Making a tree would take an incredible amount of time.

There is a better way.

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 30: Chapter 2:  Business Efficiency Lesson Plan

Fundamental Principle of Counting

If there are “a” ways of choosing one thing, “b” ways of choosing a second after the first is chosen, “c” ways of choosing a third after the second is chosen…, and so on…, and “z” ways of choosing the last item after the earlier choices, then the total number of choice patterns is a × b × c × … × z.

Example:

Jack has 9 shirts and 4 pairs of pants. He can wear 9 × 4 = 36 shirt-pant outfits.

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 31: Chapter 2:  Business Efficiency Lesson Plan

1. In a restaurant there are 4 kinds of soup, 12 entrees, 6 desserts, and 3 drinks. How many different four-course meals can a patron choose?

4 x 12 x 6 x 3 = 864 possible meals

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 32: Chapter 2:  Business Efficiency Lesson Plan

2. In a state lottery a contestant gets to pick a four-digit number that does not contain a zero followed by an uppercase or lowercase letter. How many such sequences of digits and a letter are there?

Each of the four digits can be chosen 9 ways (that is, 1, 2, …, 9), and the letter can be chosen in 52 ways (that is, A, B, …, Z plus a, b, …, z).

So 9 x 9 x 9 x 9 x 52 = 341, 172

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 33: Chapter 2:  Business Efficiency Lesson Plan

3. A corporation is planning a musical logo consisting of four different ordered notes from the scale C, D, E, F, G, A, and B.

a. How many logos are there to choose from if no letter can be reused?

The 1st note can be chosen in 7 ways, but because reuse is not allowed, the next note can be chosen in only 6 ways. The remaining two notes can be chosen in 5 and 4 ways, respectively.

So 7 x 6 x 5 x 4 = 840 musical logos

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 34: Chapter 2:  Business Efficiency Lesson Plan

b. How many logos are there to choose from if letters can be reused?

7 x 7 x 7 x 7 = 2401 musical logos

Chapter 2: Business EfficiencyHamiltonian Circuits

Page 35: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Let’s use the Fundamental Counting Principal on the spring break trip.

Stage 1 = 3 cities

Stage 2 = 2 cities

Stage 3 = 1 city

Page 36: Chapter 2:  Business Efficiency Lesson Plan

Notice that 1 and 6 are the same tour, 2 and 4 are the same tour, and 3 and 5 are the same tour.So there are only three are unique circuits.

So 3 x 2 x 1 = 6 tours

Chapter 2: Business EfficiencyHamiltonian Circuits

1. C-M-S-CL-C

2. C-M-CL-S-C

3. C-S-M-CL-C

4. C-S-CL-M-C

5. C-CL-M-S-C

6. C-CL-S-M-C

Page 37: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuit Principle of Counting for Hamiltonian Circuits

For a complete graph of n vertices, there are (n - 1)! possible routes.

Half of these routes are repeats, the result is:

Possible unique Hamiltonian circuits are

(n - 1)! / 2

Page 38: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuits

Road mileage between four cities

There are 4 vertices. So there are (4 – 1)! possibilities.

3! = (3)(2)(1) = 6

3!/2 = 6/2 = 3 circuits

Page 39: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuit

Examples:

1. How many different tours could there be with six cities?

(6 – 1)!/2 = 5!/2 = 60 different tours

2. How many different tours could there be with ten cities.

(10 – 1)!/2 = 9!/2 = 181,440 different tours

Page 40: Chapter 2:  Business Efficiency Lesson Plan

Chapter 2: Business EfficiencyHamiltonian Circuit

This method is good for small circuits but as you saw the number of different tours can rather large very quickly.

That is why this method is called a brute force method.