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

In summary, the matrix describes the costs of connecting any two cities by telephone lines. The costs for connecting cities A, B, C, and D are 3 million, 5 million, 4 million, and 6 million dollars, respectively. A minimal spanning tree is a graph that is connected, but has no loops.
  • #1
slain4ever
63
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
  • #2
bump?
 
  • #3
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:
  • #4
Note that the wiki-link I gave you on spanning trees also hyperlinks to minimal spanning trees. Links to algorithms are supplied therein.
 
  • #5
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?
 

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

1. What is a matrix?

A matrix is a rectangular array of numbers or symbols, arranged in rows and columns. It is used to represent data or perform mathematical operations.

2. How are matrices used in science?

Matrices are used in various scientific fields such as physics, engineering, and computer science. They are used to model complex systems, solve equations, and analyze data.

3. What is a spanning tree in graph theory?

A spanning tree is a subgraph of a connected graph that includes all of the vertices and is also a tree. It is the smallest possible connected subgraph of a graph that includes all of its vertices.

4. How are spanning trees used in network design?

Spanning trees are used in network design to ensure there is only one path between any two nodes in a network. This helps to prevent loops and ensures efficient communication between nodes.

5. What are some real-world applications of matrices and spanning trees?

Matrices and spanning trees have various real-world applications, such as in computer graphics, data compression, and image processing. They are also used in transportation and logistics to optimize routes and minimize costs.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
552
  • Calculus and Beyond Homework Help
Replies
2
Views
447
  • Calculus and Beyond Homework Help
Replies
3
Views
594
  • Calculus and Beyond Homework Help
Replies
2
Views
583
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
32
Views
779
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
Back
Top