UNIT-4 Graphs and Graph Terminology

Slides:



Advertisements
Similar presentations
Decision Maths Networks Kruskals Algorithm Wiltshire Networks A Network is a weighted graph, which just means there is a number associated with each.
Advertisements

Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Introduction to Graphs
Minimum Spanning Tree Sarah Brubaker Tuesday 4/22/8.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
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.
BY: MIKE BASHAM, Math in Scheduling. The Bridges of Konigsberg.
Euler Circuits and Paths
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
§ Graphs and Graph Terminology “Liesez Euler, Liesez Euler, c’est notre maître à tous.” - Pierre Laplace.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
Homework collection Thursday 3/29 Read Pages 160 – 174 Page 185: 1, 3, 6, 7, 8, 9, 12 a-f, 15 – 20.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Algorithms on graphs In Decision Mathematics, a graph consists of points (called vertices or nodes) which are connected by lines (edges or arcs). Eg in.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Graphs and Euler cycles Let Maths take you Further…
Discrete Math Round, Round, Get Around… I Get Around Mathematics of Getting Around.
GRAPH Learning Outcomes Students should be able to:
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Greedy methods Prudence Wong
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Graph Theory Topics to be covered:
5.1  Routing Problems: planning and design of delivery routes.  Euler Circuit Problems: Type of routing problem also known as transversability problem.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
CS 200 Algorithms and Data Structures
5.4 Graph Models (part I – simple graphs). Graph is the tool for describing real-life situation. The process of using mathematical concept to solve real-life.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Aim: Graph Theory – Paths & Circuits Course: Math Literacy Do Now: Aim: What are Circuits and Paths? Can you draw this figure without retracing any of.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Minimum Spanning Trees Text Read Weiss, §9.5 Prim’s Algorithm Weiss §9.5.1 Similar to Dijkstra’s Algorithm Kruskal’s Algorithm Weiss §9.5.2 Focuses on.
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,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
Graphs Chapter 20.
CSNB 143 Discrete Mathematical Structures
Çizge Algoritmaları.
COMP108 Algorithmic Foundations Greedy methods
Graph theory Definitions Trees, cycles, directed graphs.
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
EECS 203 Lecture 20 More Graphs.
Discrete Maths 9. Graphs Objective
Can you draw this picture without lifting up your pen/pencil?
Euler Circuits and Paths
Graph Theory.
Graphs Chapter 13.
Minimum Spanning Trees
Graphs.
Excursions in Modern Mathematics Sixth Edition
Konigsberg- in days past.
Representing Graphs Wade Trappe.
Euler Circuits and Paths
Networks Kruskal’s Algorithm
5 The Mathematics of Getting Around
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Section 14.1 Graphs, Paths, and Circuits
Kruskal’s Algorithm AQR.
CHAPTER 15 Graph Theory.
Graphs, Paths, and Circuits
Concepts of Computation
5 The Mathematics of Getting Around
Minimum Spanning Trees
Presentation transcript:

UNIT-4 Graphs and Graph Terminology

points called vertices lines called edges Edges connect two vertices. Graphs consist of points called vertices lines called edges Edges connect two vertices. Edges only intersect at vertices. Edges joining a vertex to itself are called loops. Example 1: The following picture is a graph. List its vertices and edges. A D C E B

Example 2: This is also a graph. The vertices just happen to have people’s names. Such a graph could represent friendships (or any kind of relationship). Flexo Bender Leela Zoidberg Fry Amy Farnsworth

Now check out the graph below. What can we say about it in comparison to the previous figure? Leela Fry Flexo Amy Bender Zoidberg Farnsworth

Moral of the Story One graph may be drawn in (infinitely) many ways, but it always provides us with the same information. Graphs are a structure for describing relationships between objects. (The vertices denote the objects and the edges represent the relationship.)

Graph Terminology

Graph Terminology (ie - all the math-y jargon one could ask for) Adjacent Vertices are two vertices that are joined by an edge. Adjacent Edges are two edges that intersect at a vertex. The degree of a vertex is the number of edges at that vertex.

Graph Terminology A loop counts twice toward the degree. An odd vertex is a vertex of odd degree. An even vertex is a vertex of even degree.

Example 3: A Find the degree of each vertex. Is A adjacent to B? Is D adjacent to A? Is E adjacent to itself? Is C adjacent to itself? Is AB adjacent to BC? Is CE adjacent to BD? D C E B

Graph Terminology A path is a sequence of vertices such that each vertex is adjacent to the next. In a path, each edge can be traveled only once. The length of a path is the number of edges in that path.

Graph Terminology A path that starts and ends at the same vertex is called a circuit. A graph is connected if any two vertices can be joined by a path. If this is not possible then the graph is disconnected.

Graph Terminology The connected parts of a disconnected graph are called components. A bridge is an edge in a connected graph whose removal makes it disconnected.

Example 4: Find a path from B to K passing through W but not S. Find a path from H to J of length 4. Find a circuit of length 5. Find a circuit of length 1. Find a bridge. J S B W H K Example 5: Draw a picture of a graph that satisfies the following: Vertices: A, B, C, D Edges: AB, AC, AD, B is adjacent to D.

Graph Terminology An Euler Path is a path that travels through every edge of the graph (once and only once). An Euler Circuit is a circuit that travels through every edge of a graph.

Example 6: The graph on the left has no Euler paths, but the one on the right has several. D D A A L L

§5.4 - 5.5 Graph Models and Euler’s Theorems “Now I will have less distraction.” - Leonhard Euler after losing sight in his right eye.

Königsberg’s Bridges II (The rare sequel that is not entirely gratuitous.) Recall from Tuesday the puzzle that the residents of Königsburg had been unable to solve until Euler’s arrival: Is there a way to cross all seven bridges exactly once and return to your starting point? Is there even a way to cross all seven bridges exactly once? R A A D L A stylized (i.e. - inaccurate) map of Königsberg’s Bridges.

What Euler realized was that most of the information on the maps had no impact on the answers to the two questions. R R D D A A A L L By thinking of each bank and island as a vertex and each bridge as an edge joining them Euler was able to model the situation using the graph on the right. Hence, the Königsberg puzzle is the same as asking if the graph has an Euler path or Euler circuit.

Example: Slay-age The Scooby Gang needs to patrol the following section of town starting at Sunnydale High (labeled G). Draw a graph that models this situation, assuming that each side of the street must be checked except for those along the park. (Map is from p. 206)

Example 2: (Exercise 21, pg 207) The map to the right of downtown Kingsburg, shows the Kings River running through the downtown area and the three islands (A, B, and C) connected to each other and both banks by seven bridges. The Chamber of Commerce wants to design a walking tour that crosses all the bridges. Draw a graph that models the layout of Kingsburg.

Example 3: The Kevin Bacon Game (http://www.cs.virginia.edu/oracle/)

Euler’s Theorems Euler’s Theorem 1 (a) If a graph has any odd vertices, then it cannot have an Euler circuit. (b) If a graph is connected and every vertex is even, then it has at least one Euler circuit.

Euler’s Theorem 2 (a) If a graph has more than two odd vertices, then it cannot have an Euler path. (b) If a connected graph has exactly two odd vertices then it has at least one Euler path starting at one odd vertex and ending at another odd vertex.

Example 4: Königsburg’s Bridges III (The Search For More Money) Let us consider again the Königsburg Brdige puzzle as represented by the graph below: R D A L We have already seen that the puzzle boils down to whether this graph has an Euler path and/or an Euler circuit. Does this graph have either?

Example 5: (Exercise 60, pg 214) Refer to Example 2 Example 5: (Exercise 60, pg 214) Refer to Example 2. Is it possible to take a walk such that you cross each bridge exactly once? Explain why or why not. N A B C S

Example 6: Unicursal Tracings Recall the routing problems presented on Tuesday: “Do these drawings have unicursal tracings? If so, are they open or closed?” How might we answer these queries? Well, if we add vertices to the corners of the tracings we can reduce the questions to asking whether the following graphs have Euler paths (open tracing) and/or Euler circuits (closed tracing). (a) (b) (c)

Euler’s Theorem 3 (a) The sum of the degrees of all the vertices of a graph equals twice the number of edges. (b) A graph always has an even number of odd vertices.

A quick summary . . . Number of odd vertices Conclusion Graph has Euler circuit(s) 2 Graph has Euler path(s) but no Euler circuit 4, 6, 8, . . . Graph has no Euler path and no Euler circuit 1, 3, 5, . . . Impossible!

§5.6 Fleury’s Algorithm

Euler’s Theorems give us a simple way to see whether an Euler circuit or an Euler path exists in a given graph, but how do we find the actual circuit or path? We could use a “guess-and-check” method, but for a large graph this could lead to many wasted hours--and not wasted in a particularly fun way!

Algorithms An algorithm is a set of procedures/rules that, when followed, will always lead to a solution* to a given problem. Some algorithms are formula driven--they arrive at answers by taking data and ‘plugging-in’ to some equation or function. Other algorithms are directive driven--they arrive at answers by following a given set of directions.

Fleury’s Algorithm The Idea: “Don’t burn your bridges behind you.” (“bridges”: graph-theory bridges, not real world) When trying to find an Euler path or an Euler circuit, bridges are the last edges we should travel. Subtle point: Once we have traversed an edge we no longer care about it--so by “bridges” we mean the bridges of the part of the graph that we haven’t traveled yet.

Example 1: Does this graph have an Euler circuit? If so, find one. B D C E F

Fleury’s Algorithm Ensure the graph is connected and all the vertices are even*. Pick any vertex as the starting point. When you have a choice, always travel along an edge that is not a bridge of the yet-to-be-traveled part of the graph. Label the edges in the order which you travel. When you can’t travel anymore, stop. * - This works when we have an Euler circuit. If we only have a path, we must start at one of (two) the odd vertices.

Example 2: Do the following drawings have unicursal tracings Example 2: Do the following drawings have unicursal tracings? If so, label the edges 1, 2, 3, . . . In the order in which they can be traced.

Example 3: (Exercise 60, pg 214) The map to the right of downtown Kingsburg, shows the Kings River running through the downtown area and the three islands (A, B, and C) connected to each other and both banks by seven bridges. The Chamber of Commerce wants to design a walking tour that crosses all the bridges. Draw a graph that models the layout of Kingsburg. It was shown yesterday that it was possible to take a walk in such that you cross each bridge exactly once. Show how. N A B C S

Example: Slay-age The Scooby Gang needs to patrol the following section of town starting at Sunnydale High (labeled G). Suppose that they must check each side of the street except for those along the park. Find an optimal route for our intrepid demon hunters to take.

Quiz 1, problem 2 North Bank (N) B A C South Bank (S)

Mathematics and the Arts? One of Euler’s 800+ publications included a treatise on music theory. Book was too math-y for most composers--too music-y for most mathematicians

Mathematics and the Arts? While Euler’s theories did not catch on, a relationship between mathematics and music composition does exist in what is called the golden ratio.

Fibonacci Numbers The Fibonacci Numbers are those that comprise the sequence: 1, 1, 2, 3, 5, 8, 13, 21, . . . The sequence can be defined by: F1=1, F2=1; Fn=Fn-1+Fn-2 These numbers can be used to draw a series of ‘golden’ rectangles like those to the right.

Fibonacci Numbers The sequence of Fibonacci Ratios - fractions like 3/5, 5/8, 8/13 approach a number called the Golden Ratio (≈0.61803398…)

The Golden Ratio Several of Mozart’s piano sonatas make use of this ratio. At the time such pieces regularly employed a division into two parts 1. Exposition and Development 2. Recapitulation In Piano Sonata No. 1 the change between parts occurs at measure 38 of 100. (which means that part 2 is 62 ≈ 0.618 x 100)

The Golden Ratio Another example in music is in the ‘Hallelujah’ chorus in Handel’s Messiah. The piece is 94 measures long. Important events in piece: 1. Entrance of trumpets - “King of Kings” occurs in measures 57-58 ≈ (8/13) x 94 2. “The kingdom of glory…” occurs in meas. 34-35 ≈ (8/13) x 57 etc, etc. . .

The Golden Ratio in Art H Approx. = 0.618 x H

The Golden Ratio in Art H Approx. = 0.618 x H

The Golden Ratio in Art

The Golden Ratio in Art .618 x Ht. 0.618 x Width

The Golden Ratio in Art .618 x Ht. 0.618 x Width

Minimum Spanning Trees Prim’s Algorithm Kruskal’s Algorithm

Definition A Minimum Spanning Tree (MST) is a subgraph of an undirected graph such that the subgraph spans (includes) all nodes, is connected, is acyclic, and has minimum total edge weight

Algorithm Characteristics Both Prim’s and Kruskal’s Algorithms work with undirected graphs Both work with weighted and unweighted graphs but are more interesting when edges are weighted Both are greedy algorithms that produce optimal solutions

Prim’s Algorithm Similar to Dijkstra’s Algorithm except that dv records edge weights, not path lengths

Walk-Through F C A B D H G E Initialize array K dv pv A F   B C D E 2 Initialize array 3 F C K dv pv A F   B C D E G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Start with any node, say D K dv pv A B C D T  E F G H 2 Start with any node, say D 3 F C K dv pv A B C D T  E F G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes K dv pv 2 3 F C K dv pv A B C 3 D T  E 25 F 18 G 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Select node with minimum distance K dv pv A B C 3 D T 2 3 F C K dv pv A B C 3 D T  E 25 F 18 G 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes K dv pv 2 3 F C K dv pv A B C 3 D T  E 7 G F 18 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Select node with minimum distance K dv pv A B C T 3 D 2 3 F C K dv pv A B C T 3 D  E 7 G F 18 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes K dv pv 2 3 F C K dv pv A B 4 C T 3 D  E 7 G F 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Select node with minimum distance K dv pv A B 4 C T 3 2 3 F C K dv pv A B 4 C T 3 D  E 7 G F 2 H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes K dv pv 2 3 F C K dv pv A 10 F B 4 C T 3 D  E 2 G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Select node with minimum distance K dv pv A 10 F B 4 C 2 3 F C K dv pv A 10 F B 4 C T 3 D  E 2 G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes 2 3 F C K dv pv A 10 F B 4 C T 3 D  E 2 G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7 Table entries unchanged

F C A B D H G E Select node with minimum distance K dv pv A 10 F B 4 C 2 3 F C K dv pv A 10 F B 4 C T 3 D  E 2 G H 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes K dv pv 2 3 F C K dv pv A 4 H B C T 3 D  E 2 F G 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Select node with minimum distance K dv pv A T 4 H B C 2 3 F C K dv pv A T 4 H B C 3 D  E 2 F G 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Update distances of adjacent, unselected nodes 2 3 F C K dv pv A T 4 H B C 3 D  E 2 F G 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7 Table entries unchanged

F C A B D H G E Select node with minimum distance K dv pv A T 4 H B C 2 3 F C K dv pv A T 4 H B C 3 D  E 2 F G 10 A 7 3 8 4 18 4 B D 9 H 10 25 2 3 G E 7

F C A B D H G E Done Cost of Minimum Spanning Tree =  dv = 21 K dv pv 3 F C K dv pv A T 4 H B C 3 D  E 2 F G A 3 4 4 B D H 2 3 G E Done

Kruskal’s Algorithm Work with edges, rather than nodes Two steps: Sort edges by increasing edge weight Select the first |V| – 1 edges that do not generate a cycle

Walk-Through F C A B D H G E Consider an undirected, weight graph 3 10 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Sort the edges by increasing edge weight edge dv (D,E) 3 F C edge dv (D,E) 1 (D,G) 2 (E,G) 3 (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3 (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3 (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3 Accepting edge (E,G) would create a cycle

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4 (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4  (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4  (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4  (B,F) (B,H) (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

F C A B D H G E Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4  (B,F) (B,H) (A,H) 5  (D,F) 6 (A,B) 8 (A,F) 10 10 A 4 3 8 4 6 5 B D 4 H 4 1 2 3 G E 3

Select first |V|–1 edges which do not generate a cycle 3 F C edge dv (D,E) 1  (D,G) 2 (E,G) 3  (C,D) (G,H) (C,F) (B,C) 4 edge dv (B,E) 4  (B,F) (B,H) (A,H) 5  (D,F) 6 (A,B) 8 (A,F) 10 A 3 4 5 B D H 1 2 } 3 G E not considered Done Total Cost =  dv = 21