Math for Liberal Arts MAT 110: Chapter 13 Notes Networks and Euler - - PowerPoint PPT Presentation

math for liberal arts mat 110 chapter 13 notes
SMART_READER_LITE
LIVE PREVIEW

Math for Liberal Arts MAT 110: Chapter 13 Notes Networks and Euler - - PowerPoint PPT Presentation

4/15/2013 Math for Liberal Arts MAT 110: Chapter 13 Notes Networks and Euler Circuits Graph Theory David J. Gisch Network Representation Network Representation Network: A collection of points or objects that are Example 13.1: Create a


slide-1
SLIDE 1

4/15/2013 1

Math for Liberal Arts MAT 110: Chapter 13 Notes

Graph Theory David J. Gisch

Networks and Euler Circuits

Network Representation

  • Network: A collection of points or objects that are

interconnected in some way.

  • Vertex: A point to represent an object such as a

computer, phone, city, island, etc. which makes up a network.

  • Edge: Represented by a line or curve to be a connection

between two vertices.

Network Representation

Example 13.1: Create a network representation of the following situation.

slide-2
SLIDE 2

4/15/2013 2

Network Representation

Example 13.2: Create a network representation of the following situation.

Country Borders

Example 13.3: Draw a diagram where the vertices represent the countries and the edges represent shared borders.

Circuit

  • Circuit: A path that starts and stops at the same point is

a circuit.

Euler Circuits

  • An Euler circuit is a path through a network that starts

and ends at the same point and traverses (travels) every dge exactly once.

slide-3
SLIDE 3

4/15/2013 3

Order & Degree

  • The degree of a vertex is the number of distinct edges

connecting to that vertex.

  • The order of a network is the number of vertices in that

network.

  • An Euler circuit exists for a network if each vertex has an

even number of edges (i.e. the degree of each vertex is even).

Euler Circuit – Even Order

Example 13.3: State whether each of the following has an Euler circuit.

Finding the Euler Circuit

If an Euler circuit exists:

  • Begin your circuit from any vertex in the network.
  • As you choose edges to follow, never use an edge that is

the only connection to a part of the network that you have not already visited.

▫ This is known as the “burning bridge” rule.

Euler Circuit

Example 13.4: Find an Euler circuit for the bridges of Konigsberg.

slide-4
SLIDE 4

4/15/2013 4

Euler Circuit

Example 13.5: Find an Euler circuit for the computer network.

Euler Circuit

Example 13.6: Find an Euler circuit for the country border network.

Euler Circuit

Example 13.7: Find an Euler circuit for the following network.

Euler Circuit

Example 13.8: Find an Euler circuit for the following network.

slide-5
SLIDE 5

4/15/2013 5

Complete Graphs and Hamilton Circuits

Hamilton Circuit

A Ham iltonian circuit is a path that passes through every vertex of a network exactly once and returns to the starting vertex. The paths indicated by arrows in (a) and (b) are Hamiltonian circuits, while (c) has no Hamiltonian circuits.

Complete network

  • Com plete network is a network where every vertex is

directly connected to every other vertex.

  • The number of Hamilton Circuits in a complete network

with order is 1 ! 2

Factorial

  • 5! 5 4 3 2 1
  • 6! 6 5 4 3 2 1
  • 20! 20 19 18 ⋯ 2 1
  • Most calculators have factorial

button.

▫ Look under the PRB button for it.

slide-6
SLIDE 6

4/15/2013 6

Complete Network

The twelve Hamiltonian circuits for a complete network of order 5.

5 and therefore there are

!

  • 12 possible

Hamilton circuits.

Traveling S alesman

  • A Hamilton circuit is very practical.
  • The solution to a traveling salesman problem is the

shortest path (smallest total of the lengths) that starts and ends in the same place and visits each city once.

Travel S alesman

  • We want to visit each park once on our route. Below are

two ways to do that.

  • The route on the left has us traveling 664 miles, while

the route on the right has us traveling 499 miles.

  • Is the one on the right the shortest router or is there

another?

Finding the S hortest Hamilton Circuit

  • Unfortunately the only way to guarantee you can find the

shortest Hamilton circuit is to check the length of each possible route.

  • PROBLEM!

▫ If the graph only has 15 vertices then it has 15 1 ! 2 44 Possible Hamilton circuits.

slide-7
SLIDE 7

4/15/2013 7

Nearest Neighbor Method

  • To find the quickest approximation we can use the

nearest neighbor method.

  • Beginning at any vertex, travel to the nearest vertex that

has not yet been visited. Continue this process of visiting “nearest neighbors” until the circuit is complete.

  • This method does not guarantee you the shortest route

but generally gets you a path close to the shortest amount.

The Nearest Neighbor Method and the Traveling S alesman Problem

Courtesy of Bill Cook, David Applegate and Robert Bixby, Rice University and Vasek Chvatal, Rutgers University.

The near-optimal solution to finding the shortest path among 13,509 cities with populations over 500.

Hamilton Circuit

Example 13.9: Use the nearest neighbor method to find a good approximation for the shortest route.

Hamilton Circuit

Example 13.10: The following table show thee distances between pairs of towns in a rural county. Create a network showing the five towns and distances between them and find the shortest route by checking each possibility.

slide-8
SLIDE 8

4/15/2013 8

Spanning Tree and Optimization

  • Tree is a network in which all of the vertices are

connected and no circuits appear.

Tree Hamilton Circuit

Example 13.11: Which if the following are trees? Why or why not?

S panning Tree

  • A spanning tree is a tree within any network.

Original Network

slide-9
SLIDE 9

4/15/2013 9

Minimum S panning tree

  • If we have a network with weighted edges, the spanning

tree with the least “weight” or total value is called the m inim um spanning tree. This is very similar to the nearest neighbor idea with Hamilton circuits but with spanning trees we do not want a circuit. A map of seven towns (capital letters) and the routes between them along which telephone lines could be strung, along with the network representation.

Minimum Cost S panning Tree

Two spanning networks. The total cost of each spanning network is the sum of the individual costs on its edges. The total cost for spanning network (a) is much higher than the total cost for spanning network (b).

Minimum Cost S panning Tree Kruskal’s Algorithm

slide-10
SLIDE 10

4/15/2013 10

Find the Minimum Cost S panning Tree

Find the Minimum Cost Network Terminology Review

Circuit A path within a network that begins and ends at the same vertex. Complete network Every vertex is directly connected to every other vertex. Tree A network in which all of the vertices are connected and no circuits appear. Order The number of vertices in a network. Degree of vertex The number of edges connected to the vertex.

Scheduling Problems

slide-11
SLIDE 11

4/15/2013 11

A House Building Proj ect

  • Each edge is labeled with the number of months needed

to complete the task.

  • In some phases of the project, only one task can be

undertaken at a time.

  • During other phases, two or more tasks can be carried
  • ut concurrently.

Limiting Tasks and Critical Path

  • When two (or more) tasks can occur at the same time

between two stages of the project, the task that requires the most time is called the lim iting ta sk.

  • The critica l p a th through the network is the path that

includes all the limiting tasks. The length of the critical path is the completion time for the project.

Finding Earliest S tart and Finish Times

  • The ea rliest sta rt tim e (EST) of a task leaving a

particular vertex is the largest of the earliest finish times

  • f the tasks entering that vertex.
  • The ea rliest finish tim e (EFT) of a task is the earliest

start time of that task plus the time required for the task. That is,

EFT = EST + time for task.

Finding Latest S tart and Finish Times

  • The la test finish tim e (LFT) of a task entering a

particular vertex is the sm allest of the latest start times

  • f the tasks leaving that vertex.
  • The la test sta rt tim e (LST) of a task is the latest finish

time of that task m inus the time required for the task. That is,

LST = LFT  time for task

slide-12
SLIDE 12

4/15/2013 12

Examples

  • What is the limiting task between C and F?

Examples

  • What is the limiting task between F and H?

Examples

  • What is the critical path and therefore the completion

time?

Examples

  • What is earliest start time (EST) for ordering appliances?
  • What is earliest start time (EST) for trim work?
slide-13
SLIDE 13

4/15/2013 13

Examples

  • What is earliest finish time (EFT) for ordering

appliances?

  • What is earliest finish time (EFT) for construction?

S lack Time

  • Sla ck tim e is the longest you can delay a task without

disrupting the earliest finish time.

  • What is slack time for construction?
  • What is slack time for ordering appliances?

Examples

  • What is latest start time (LST) for ordering appliances?
  • What is latest start time (LST) for construction?

“ Homework”

  • Check out page 778 #21-28
  • We will not hand this in. You will have problems very

similar to these on your final.