What is a minimal spanning tree and how do I find it for a given cost matrix?

  • Thread starter Thread starter slain4ever
  • Start date Start date
  • Tags Tags
    Matrices Trees
Click For Summary

Homework Help Overview

The problem involves understanding the concept of a minimal spanning tree in the context of a cost matrix representing the costs of connecting four cities (A, B, C, and D) by telephone lines. The original poster expresses confusion about the question's requirements and the concept of minimal spanning trees.

Discussion Character

  • Exploratory, Conceptual clarification

Approaches and Questions Raised

  • The original poster attempts to interpret the problem by suggesting a bar graph representation of costs, questioning if this is the correct approach. Other participants provide clarifications about the nature of graphs and minimal spanning trees, referencing established algorithms and properties of trees.

Discussion Status

The discussion is ongoing, with participants providing insights into the definitions and properties of graphs and minimal spanning trees. Some guidance has been offered regarding the structure of trees and the need for connectivity, but there is no consensus on a specific method to solve the problem.

Contextual Notes

The original poster indicates uncertainty about the problem's requirements and the concept of minimal spanning trees, which may reflect a lack of foundational knowledge in graph theory. There are no explicit constraints mentioned, but the nature of homework implies adherence to academic integrity in problem-solving.

slain4ever
Messages
63
Reaction score
0

Homework Statement


The costs (in millions of dollars) of connecting any two of the four cities A,B,C and D by telephone lines are given in the following matrix:

0 3 5 4
3 0 2 3
5 2 0 6
4 3 6 0

a) Draw a diagram of the complete graph
b) find a minimal spanning tree

The Attempt at a Solution



I honestly have no idea what the question is even asking.

my best guess is that I need to draw a cost vs city bar graph so 2-6 million dollars on the y axis, then fill in for A-B, A-C etc.
is that right?

And I am not 100% sure about minimal spanning trees either. Would you draw 4 vertices labelled A to D then on the connecting lines fill in the proper cost values?
 
Physics news on Phys.org
bump?
 
A graph is a collection of vertices and edges. Your matrix describes the http://en.wikipedia.org/wiki/Graph_%28mathematics%29" . Algorithms for calculating spanning trees are well known and can be found in any introductory book on graph theory.
 
Last edited by a moderator:
Note that the wiki-link I gave you on spanning trees also hyperlinks to minimal spanning trees. Links to algorithms are supplied therein.
 
Notice that trees satisfy the relation V=E+1 , where V,E are the number of vertices, edges
resp in the tree. First, make sure your tree is connected (A tree is a graph that is
connected, but has no loops. You need to find a subset of your graph that goes
thru every vertex, but has no loops).

So start at any vertex v , and join v to some edge v1 so that v1 is " 1 away" from
v, i.e., there is a path vev1 of length 1 from v to v1 . Then you have a subgraph
{v,v1,e} , with 2 vertices and 1 edge, i.e., a tree. Continue with the idea until the
tree spans, i.e., until the graph uses all the vertices (again, make sure your graph is
connected.) Can you take it from there?
 

Similar threads

Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
2
Views
2K
Replies
3
Views
2K
Replies
9
Views
2K
Replies
6
Views
2K