Skip to content
Back to exploration
Mathematical modeling / English

Minimum Spanning Tree - Intro to Theoretical Computer Science

Udacity · YouTube · 1:47

Open original
READ & KEEP

The explanation, unpacked.

Reviewed learning material · Video analysis · English
Read the full overview

This whiteboard clip introduces minimum spanning trees by building on the prior notion of a spanning tree. The speaker draws a weighted graph, explains that each edge carries a number, and shows how to compute the weight of a spanning tree by summing the labels on its edges. Two example spanning trees are compared, with weights 20 and 21, motivating the definition of a minimum spanning tree as a spanning tree whose total edge sum is as small as possible. The clip also states that a graph may have more than one minimum spanning tree.

Use the learning inspector for key ideas and moments, or open the reading tabs for the complete notes.

Chapters

0:00From spanning trees to minimum spanning trees0:08Need for a weighted graph0:35Example spanning tree of weight 201:10Another spanning tree of weight 211:23Definition of minimum spanning tree1:37Multiple minimum spanning trees

Learning script

Generated from the video's visuals and explanation; not verbatim speech.

The clip opens by assuming the viewer already knows what a spanning tree is, then announces a refinement of that idea: the minimum spanning tree.

The speaker explains that a minimum spanning tree is still a spanning tree, but now the underlying graph must be weighted: every edge carries a number. The example under the heading "SHORTEST TOUR" is reused only structurally; the numbers need not be distances.

A concrete weighted graph is drawn, and one spanning tree is selected from it. The method is to add the labels on exactly the edges in that tree, producing 2+4+3+2+3+6=202+4+3+2+3+6=20. This total is called the weight of the spanning tree.

A second spanning tree of the same graph is chosen and its edges are summed in the same way, giving 3+4+3+2+3+6=213+4+3+2+3+6=21. The comparison shows that different spanning trees can have different total weights.

From these examples, the definition is stated directly: a minimum spanning tree is a spanning tree whose total edge sum is the smallest possible among all spanning trees of the graph.

The final point is that the minimum spanning tree need not be unique. A graph may have several minimum spanning trees, but each one must attain the same lowest possible total edge weight.

Knowledge cards

01

Minimum spanning tree definition

A minimum spanning tree is a spanning tree of a weighted graph whose total edge weight is as small as possible among all spanning trees of that graph.

02

Weighted graph requirement

Before discussing minimum spanning trees, the graph must have a numerical value attached to every edge. These values may be distances in one application, but they can also be other quantities.

03

Weight of a spanning tree

To find the weight of a spanning tree, select the tree and add the numbers on all of its edges. In the first example, the chosen tree has weight 2+4+3+2+3+6=202+4+3+2+3+6=20.

2+4+3+2+3+6=202+4+3+2+3+6=20
04

Comparing two spanning trees

A second spanning tree of the same graph is weighted by 3+4+3+2+3+6=213+4+3+2+3+6=21. Since 20<2120<21, the example illustrates why one seeks the spanning tree of minimum total weight.

3+4+3+2+3+6=213+4+3+2+3+6=21
05

Minimum spanning trees need not be unique

The video explicitly states that a graph can have more than one minimum spanning tree. What matters is that every minimum spanning tree has the lowest possible sum of edge values.

Detailed learning notes

Explore conditions, steps and evidence. Supplementary explanations are labeled separately from content shown in the video.

Symbols · 3

weighted graph

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says a minimum spanning tree is still a spanning tree on a graph, and that the graph must have numbers attached to its edges.

  2. Diagram
    Observation

    A hand draws a graph with purple vertices and blue edges, then writes red numbers beside the edges.

Symbol

weighted graph

Meaning

A graph whose edges each carry an assigned numerical value.

Domain

Graph theory; finite undirected graphs with edge weights.

edge number / edge value

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "all of the edges have a certain number assigned to them" and "each edge must have a certain value attached to it".

  2. Diagram
    Observation

    Red numerals are written next to individual edges of the drawn graph.

Uncertainties
  1. The video does not state whether negative or zero weights are allowed.

Symbol

edge number / edge value

Meaning

The numerical quantity assigned to an edge; in this clip the examples use positive integers such as 1, 2, 3, 4, and 6.

Domain

Edge labels of the displayed weighted graph.

weight of a spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "for each spanning tree, you can sum up those numbers" and "this spanning tree here has a weight of 20".

  2. Formula
    Observation

    The board shows 2+4+3+2+3+6=202+4+3+2+3+6=20 for one highlighted spanning tree.

Symbol

weight of a spanning tree

Meaning

The sum of the numerical values on all edges belonging to that spanning tree.

Domain

Applies to any chosen spanning tree of a weighted graph.

Knowledge points · 5

Minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker introduces "the concept of a minimum spanning tree" and later defines it as the spanning tree whose total edge sum is the smallest possible one.

  2. Caption evidence
    Observation

    The title written on the board is "Minimum Spanning Tree".

Definition
Explanation

In this clip, a minimum spanning tree is presented as a spanning tree of a weighted graph whose total weight, meaning the sum of the numbers on its edges, is as small as possible among all spanning trees of that graph.

Formula
Conditions
  1. The underlying object must be a graph.

  2. Each edge must have a numerical value attached to it.

  3. The comparison is made over spanning trees of the same graph.

Prerequisites
  1. Spanning tree (assumed prior concept)
  2. Weighted graph input for minimum spanning trees

Spanning tree (assumed prior concept)

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "So now that you know what a spanning tree is, I would like to introduce to you the concept of a minimum spanning tree."

  2. Caption evidence
    Observation

    The phrase "Spanning Tree" is written before being expanded to "Minimum Spanning Tree".

Uncertainties
  1. This clip assumes the definition of spanning tree from earlier material and does not restate it fully.

Definition
Explanation

The video treats "spanning tree" as already known and uses it as the base notion that is refined into a minimum spanning tree by adding weights and minimization.

Formula
Conditions
  1. Prior knowledge of spanning trees is assumed.

Weighted graph input for minimum spanning trees

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    To find a minimum spanning tree, one needs a special kind of graph where all edges have a certain number assigned to them.

  2. Diagram
    Observation

    Vertices and edges are drawn first, then red numbers are added to the edges.

Uncertainties
  1. The clip does not formally define the broader class of weighted graphs beyond saying each edge has a number attached.

Definition
Explanation

The speaker states that a minimum spanning tree is defined on a graph whose edges carry numerical labels. In the shortest-tour context these labels were distances, but here they may be other values as well.

Formula
Conditions
  1. Every edge must have a numerical value attached to it.

Prerequisites
  1. Spanning tree (assumed prior concept)

Weight of a spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "for each spanning tree, you can sum up those numbers" followed by "this spanning tree here has a weight of 20".

  2. Formula
    Observation

    The displayed sum is 2+4+3+2+3+6=202+4+3+2+3+6=20.

  3. Animation
    Observation

    Selected edges of the graph are traced in green while their labels are added.

Method
Explanation

Given a weighted graph, choose any spanning tree and add together the numerical values on exactly the edges included in that tree. The resulting sum is called the weight of that spanning tree.

Formula
2+4+3+2+3+6=202+4+3+2+3+6=20
Conditions
  1. The graph must have numerical values on its edges.

  2. Only the edges belonging to the selected spanning tree are summed.

Prerequisites
  1. Spanning tree (assumed prior concept)
  2. Weighted graph input for minimum spanning trees

Non-uniqueness of minimum spanning trees

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "A graph can have more than one minimum spanning tree, but every minimum spanning tree has to have the property that the sum of the edges is as low as possible."

Definition
Explanation

The video explicitly notes that a graph may possess multiple minimum spanning trees. What is required is not uniqueness of the tree itself, but that each minimum spanning tree attains the lowest possible total edge sum.

Formula
Conditions
  1. Applies to weighted graphs discussed in this clip.

Prerequisites
  1. Minimum spanning tree
Claims and conditions · 2

Characterization of a minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "A minimum spanning tree is the spanning tree for the graph for which the total weight, the sum of all of the edge numbers, is the smallest possible one."

Proposition
Statement

For a weighted graph, a spanning tree is a minimum spanning tree exactly when its total edge sum is the smallest possible among the spanning trees of that graph.

Hypotheses
  1. The graph has numerical values attached to its edges.

  2. The object under consideration is a spanning tree of that graph.

Quantifiers

For a given weighted graph and for all of its spanning trees, the minimum spanning trees are those attaining the minimum total edge sum.

Existence of multiple minimum spanning trees

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "A graph can have more than one minimum spanning tree, but every minimum spanning tree has to have the property that the sum of the edges is as low as possible."

Proposition
Statement

A graph may have more than one minimum spanning tree, and each such tree must have the lowest possible total edge sum.

Hypotheses
  1. The graph is a weighted graph of the type described in the clip.

Quantifiers

There exist weighted graphs with more than one minimum spanning tree; for every minimum spanning tree of such a graph, its edge sum is minimal.

Derivations and proofs · 1

Motivating the minimum-spanning-tree idea by comparing two spanning trees

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker first takes one spanning tree, computes its weight as 20, then takes another spanning tree and computes its weight as 21, and finally uses this comparison to motivate the definition of a minimum spanning tree.

  2. Formula
    Observation

    Two sums are shown: 2+4+3+2+3+6=202+4+3+2+3+6=20 and 3+4+3+2+3+6=213+4+3+2+3+6=21.

  3. Animation
    Observation

    Different sets of edges are traced in green to indicate different spanning trees.

Uncertainties
  1. The clip does not prove that no other spanning tree has weight below 20; it only illustrates how to compare weights and motivates the definition.

Intuitive argument
Steps
  1. Expression
    Explanation

    Start with a weighted graph and choose one spanning tree from it.

    Justification

    The speaker says, "let's take any spanning tree for this graph here."

    Shown in the video
  2. Expression
    2+4+3+2+3+6=202+4+3+2+3+6=20
    Explanation

    Add the numerical labels on the edges of that chosen spanning tree to obtain its total weight.

    Justification

    By the stated method, the weight of a spanning tree is the sum of the numbers on its edges.

    Shown in the video
  3. Expression
    Explanation

    Choose a different spanning tree of the same graph.

    Justification

    The speaker explicitly says, "Now if you choose another spanning tree, for example this one here."

    Shown in the video
  4. Expression
    3+4+3+2+3+6=213+4+3+2+3+6=21
    Explanation

    Sum the edge labels of the second spanning tree to get its total weight.

    Justification

    The same summation rule is applied to the second selected tree.

    Shown in the video
  5. Expression
    20<2120 < 21
    Explanation

    Compare the two totals and observe that the first spanning tree has smaller weight than the second.

    Justification

    Direct arithmetic comparison of the displayed sums.

    Derived from the video
  6. Expression
    Explanation

    Use this comparison to motivate the definition: the minimum spanning tree is the spanning tree whose total weight is smallest possible.

    Justification

    The speaker transitions from the example to the general definition immediately after the comparison.

    Shown in the video
Conclusion

The example shows how spanning-tree weights are computed and compared, leading to the definition of a minimum spanning tree as a spanning tree of minimum total weight.

Worked examples · 2

Computing the weight of one spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker selects a spanning tree and says its weight is 20.

  2. Formula
    Observation

    The board displays 2+4+3+2+3+6=202+4+3+2+3+6=20.

  3. Animation
    Observation

    A subset of edges is traced in green to mark the chosen spanning tree.

Uncertainties
  1. The exact vertex names are not labeled, so the selected edges are identified only by their displayed weights and relative positions.

Problem

Given the drawn weighted graph, choose one spanning tree and compute its total weight.

Given
  1. A weighted graph is drawn with numerical labels on its edges.

  2. One spanning tree is selected from that graph.

Goal

Find the weight of the selected spanning tree.

Steps
  1. Expression
    Explanation

    Identify the edges included in the chosen spanning tree.

    Justification

    The speaker traces a set of edges in green to indicate the selected tree.

    Shown in the video
  2. Expression
    2+4+3+2+3+62+4+3+2+3+6
    Explanation

    Read off the numerical labels on those selected edges and list them for addition.

    Justification

    The weight of a spanning tree is obtained by summing the numbers attached to its edges.

    Shown in the video
  3. Expression
    2+4+3+2+3+6=202+4+3+2+3+6=20
    Explanation

    Perform the addition to obtain the total weight.

    Justification

    Arithmetic evaluation of the displayed sum.

    Shown in the video
Answer

The selected spanning tree has weight 20.

Verification

The displayed equation on the board matches the spoken result: the sum equals 20.

Computing the weight of a second spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker chooses another spanning tree and states its total weight is 21.

  2. Formula
    Observation

    The board displays 3+4+3+2+3+6=213+4+3+2+3+6=21.

  3. Animation
    Observation

    A different subset of edges is traced in green.

Uncertainties
  1. As in the previous example, the vertices are unlabeled, so the chosen edges are specified only visually and by their weights.

Problem

Choose a different spanning tree of the same weighted graph and compute its total weight.

Given
  1. The same weighted graph is used.

  2. A second spanning tree is selected.

Goal

Find the weight of the second spanning tree.

Steps
  1. Expression
    Explanation

    Select another spanning tree of the graph.

    Justification

    The speaker explicitly introduces a second example spanning tree.

    Shown in the video
  2. Expression
    3+4+3+2+3+63+4+3+2+3+6
    Explanation

    Collect the edge labels belonging to this second spanning tree.

    Justification

    Apply the same summation rule used for spanning-tree weight.

    Shown in the video
  3. Expression
    3+4+3+2+3+6=213+4+3+2+3+6=21
    Explanation

    Add the collected numbers to get the total weight.

    Justification

    Arithmetic evaluation of the displayed sum.

    Shown in the video
Answer

The second spanning tree has weight 21.

Verification

The board equation and the spoken conclusion agree that the total is 21.

Visual events · 3

Construction of the example weighted graph

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    Purple dots are placed as vertices, blue lines are drawn as edges, and red numbers are written next to the edges.

  2. Audio
    Observation

    The speaker explains that the graph must have numbers attached to all edges.

Uncertainties
  1. The exact graph layout is hand-drawn and some edge endpoints are visually approximate rather than formally labeled.

Objects
  1. Purple vertices

  2. Blue edges

  3. Red numerical edge labels

Changes
  1. Vertices appear first.

  2. Edges are then drawn between vertices.

  3. Numerical labels are added to the edges last.

Invariants
  1. The graph remains the same object throughout the clip once completed.

  2. Each edge keeps one associated number.

Interpretation

The drawing establishes the setting needed for minimum spanning trees: a graph whose edges carry weights.

First spanning tree highlighted in green

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    A subset of edges is traced in green while the formula 2+4+3+2+3+6=202+4+3+2+3+6=20 is written.

  2. Audio
    Observation

    The speaker says this is one spanning tree and computes its weight.

Objects
  1. Original weighted graph

  2. Green-traced selected edges

  3. Formula 2+4+3+2+3+6=202+4+3+2+3+6=20

Changes
  1. Selected edges are recolored or overdrawn in green.

  2. Their labels are summed on the right side of the board.

Invariants
  1. The underlying graph and all edge weights remain unchanged.

  2. Only the chosen subset of edges is emphasized.

Interpretation

The visual emphasis distinguishes one spanning tree from the full graph and shows how its weight is calculated.

Second spanning tree highlighted in green

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    A different subset of edges is traced in green while the formula 3+4+3+2+3+6=213+4+3+2+3+6=21 is written.

  2. Audio
    Observation

    The speaker introduces another spanning tree and computes its weight.

Objects
  1. Same weighted graph

  2. Another green-traced subset of edges

  3. Formula 3+4+3+2+3+6=213+4+3+2+3+6=21

Changes
  1. A new set of edges is highlighted.

  2. A second total weight is written beside the graph.

Invariants
  1. The graph structure and edge labels do not change.

  2. The comparison is between different spanning trees of the same graph.

Interpretation

The second highlighting demonstrates that different spanning trees can have different total weights.

Misconceptions · 2

Assuming the minimum spanning tree is unique

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "A graph can have more than one minimum spanning tree..."

Misconception

One might think a graph has only one minimum spanning tree.

Clarification

The video explicitly states that a graph can have more than one minimum spanning tree; what is required is that each has the lowest possible total edge sum.

Thinking edge numbers must represent distances

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "in the case of shortest tour those were distances, but it can be other values as well. That doesn't really matter."

Misconception

Because the topic is introduced under "SHORTEST TOUR," one may assume the edge numbers must always be distances.

Clarification

The speaker says the numbers may be distances in the shortest-tour setting, but they can also be other values; the essential requirement is just that each edge has a number attached.

Concept relations · 5

Spanning tree (assumed prior concept) → Minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker begins by referring to the previously known concept of a spanning tree and then introduces the minimum spanning tree.

Prerequisite
Explanation

Understanding spanning trees is treated as prior knowledge needed before defining minimum spanning trees.

Weighted graph input for minimum spanning trees → Minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    To find a minimum spanning tree, one needs a graph where all edges have numbers attached.

Prerequisite
Explanation

The existence of numerical edge values is required before the notion of minimizing total spanning-tree weight makes sense.

Minimum spanning tree → Spanning tree (assumed prior concept)

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    "a minimum spanning tree is still a spanning tree on a graph" and later the definition as the spanning tree with smallest total weight.

Special case
Explanation

A minimum spanning tree is a particular kind of spanning tree, namely one whose total edge weight is minimal.

Weight of a spanning tree → Minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker first explains how to sum edge numbers for a spanning tree and then defines the minimum spanning tree using that total weight.

Proof dependency
Explanation

The definition of a minimum spanning tree depends on first having a way to measure the weight of any spanning tree by summing its edge values.

Weighted graph input for minimum spanning trees → Minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker compares the needed graph to the input for shortest tour, noting that there the numbers were distances but here they can be other values.

  2. Caption evidence
    Observation

    The heading "SHORTEST TOUR" remains visible above the new topic.

Contrast
Explanation

The clip contrasts the shortest-tour setting, where edge numbers were distances, with the more general weighted-graph setting used for minimum spanning trees.

Find an answer · 5

What is a minimum spanning tree?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker gives the definition of a minimum spanning tree in words.

Knowledge points
  1. Minimum spanning tree
  2. Characterization of a minimum spanning tree

How do you compute the weight of a spanning tree in a weighted graph?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board shows 2+4+3+2+3+6=202+4+3+2+3+6=20 for a selected spanning tree.

  2. Audio
    Observation

    The speaker explains that one sums the numbers on the edges of the spanning tree.

Knowledge points
  1. Weight of a spanning tree
  2. Computing the weight of one spanning tree

Can a graph have more than one minimum spanning tree?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says a graph can have more than one minimum spanning tree.

Knowledge points
  1. Non-uniqueness of minimum spanning trees
  2. Existence of multiple minimum spanning trees

Why does the video compare spanning-tree weights 20 and 21 before defining a minimum spanning tree?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Two spanning-tree weights are computed: 20 and 21.

  2. Audio
    Observation

    After the comparison, the speaker defines the minimum spanning tree as the one with smallest total weight.

Knowledge points
  1. Motivating the minimum-spanning-tree idea by comparing two spanning trees
  2. Minimum spanning tree

Do the numbers on the edges have to be distances for a minimum spanning tree?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says the numbers were distances in shortest tour but can be other values as well.

Knowledge points
  1. Weighted graph input for minimum spanning trees
  2. Thinking edge numbers must represent distances
Coverage and review notes

Covered · Opening transition from previously discussed spanning trees to the new topic.

Covered · Introduction of minimum spanning trees and the requirement that edges carry numerical values.

Covered · First worked example: selecting a spanning tree and computing its weight as 20.

Covered · Second worked example: another spanning tree has weight 21.

Covered · General definition of minimum spanning tree and note that multiple minimum spanning trees may exist.

Covered · Final trailing moment with no additional mathematical content beyond the completed explanation.

Explore the knowledge in this video

Reviewed subject paths