Skip to content
Back to exploration
Mathematical modeling / English

Kruskal's Algorithm for Minimum Spanning Trees (MST) | Graph Theory

Wrath of Math · YouTube · 5:50

Open original
READ & KEEP

The explanation, unpacked.

Saves 0

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

This 120-second whiteboard lesson introduces Kruskal's algorithm for finding a minimum spanning tree in a connected weighted graph. It first fixes notation: G is a connected weighted graph of order n, and T is the resulting minimum spanning tree. The narrator explains that a spanning tree on n vertices has n-1 edges, so the algorithm stops once that many edges are selected. The method is then written as four steps: choose a minimum-weight edge, choose another minimum-weight remaining edge, then repeatedly choose a minimum-weight remaining edge that does not form a cycle with the edges already selected, continuing until n-1 edges are obtained. In the last part, the video switches to a concrete five-vertex weighted example graph with vertices u, v, w, x, y, while reminding viewers that a spanning tree must contain all vertices of the original graph. The clip ends before the example is actually solved. This 120-second whiteboard clip demonstrates Kruskal's algorithm on a weighted graph with vertices u, v, w, x, y. The board lists four steps: choose a minimum-weight edge, choose another minimum-weight remaining edge, then keep choosing minimum-weight remaining edges that do not form cycles until n-1 edges are selected. The presenter applies the method in order, adding uv (weight 1), yx (weight 2), and wv (weight 3) to a duplicate vertex set on the right. He then explains that a spanning tree on 5 vertices needs 5−1=45-1=4 edges. In the final step, two remaining edges both have weight 4, but uw is rejected because it would create a cycle, so ux is chosen instead. The clip ends just after that fourth edge is selected. This clip teaches Kruskal's algorithm for finding a minimum spanning tree in a connected weighted graph. It states the rule to keep selecting minimum-weight edges that do not form cycles until n-1 edges are chosen, defines the tree weight W(T)W(T) as the sum of edge weights, and works through two examples with answers 10 and 21. It also notes that tied edge weights can lead to different minimum spanning trees even though the minimum total weight is unique, and says the correctness proof is deferred to a later video.

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

Chapters

0:00Kruskal's algorithm in a connected weighted graph0:16Notation G, n, T and the n-1 edge rule0:43Step 1: pick a minimum-weight edge0:58Step 2: pick the next minimum-weight remaining edge1:06Step 3: avoid cycles when adding further edges1:24Step 4: repeat until n-1 edges are selected1:32Concrete five-vertex example graph introduced2:00Board setup and algorithm statement2:14Step 1: choose the minimum-weight edge uv2:31Step 2: choose yx and note why no cycle check is needed yet2:51Step 3: choose wv with cycle avoidance3:14Stopping rule: n-1 edges, here 5−1=45-1=43:36Tie among weight-4 edges: reject uw, select ux4:00Stopping after n-1 edges4:06Weight of the spanning tree4:19Why 10 is minimal in the first example4:28Second practice graph4:35Answer W(T)=21W(T)=214:48Ties and non-unique trees5:07Formal summary of Kruskal's algorithm5:20Relation to Prim's algorithm and outro

Learning script

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

The clip opens by stating the problem class: Kruskal's algorithm is used on a connected weighted graph to produce a minimum spanning tree. The board text and narration align on this setup, so the viewer first learns the input type and the desired output object.

Next the notation is fixed. Let GG be a connected weighted graph of order nn, meaning GG has nn vertices. The video then records a basic spanning-tree fact: a spanning tree on nn vertices has n−1n-1 edges. This is not just background; it immediately determines the stopping rule for the algorithm.

With TT denoting the minimum spanning tree to be found, the procedure is written as four ordered steps. Step 1 says to select an edge of GG of minimum weight. The narration adds the tie-breaking detail that if several edges share the minimum weight, any one of them may be chosen as the first edge of the tree.

Step 2 continues the greedy process by selecting another remaining edge of minimum weight, which becomes the second edge of the spanning tree. At this stage the video has not yet imposed a cycle test, because with only one or two chosen edges the main issue is still just choosing cheap edges.

Step 3 introduces the essential restriction. Once two edges are already selected, any further edge might close a loop, and a tree cannot contain cycles. Therefore the algorithm now selects any remaining edge of minimum weight subject to the condition that it does not form a cycle with the previously selected edges. This is the central rule that distinguishes Kruskal's method from simply taking the cheapest edges indiscriminately.

Step 4 tells the viewer to repeat step 3 until n−1n-1 edges have been selected. The connection back to the earlier fact is explicit: because a spanning tree on nn vertices has exactly n−1n-1 edges, reaching that count means the construction is complete and the result is a minimum spanning tree.

The final portion turns from abstract procedure to a concrete example. A five-vertex weighted graph with labels u,v,w,x,yu,v,w,x,y appears on the left, while the same five vertices are shown isolated on the right as the place where the spanning tree will be assembled. The algorithm steps are pasted above for reference. Before starting the selection, the narrator reminds the viewer that a spanning tree must contain all vertices of the original graph, so the task is to choose edges of minimum total weight without omitting any vertex and without creating cycles. The clip ends here, before any edge is actually chosen in the example.

The clip opens on a black digital whiteboard with three zones: the algorithm text across the top, a weighted graph G on the left, and a duplicate set of vertices on the right for building the answer. The speaker explains that chosen edges will be highlighted on the left and then redrawn on the right, and that edge weights are the green numbers beside the edges.

Step 1 is applied first. Scanning all visible edge weights, the minimum is 1 on the edge between u and v. That edge is highlighted on the left and copied to the right-side tree, establishing the first edge of the spanning tree.

Step 2 asks for a remaining minimum-weight edge. The next smallest visible weight is 2 on the edge between y and x. The speaker notes that no cycle check is needed yet because two edges alone cannot form a cycle in this construction, so yx is added directly to the right-side tree.

Step 3 introduces the crucial restriction: among remaining edges, choose a minimum-weight edge only if it does not create a cycle with edges already selected. The edge wv of weight 3 satisfies this condition, so it is highlighted on the left and drawn on the right as the third tree edge.

The presenter then explains the stopping rule written as step 4. A spanning tree on n vertices is complete once n-1 edges have been selected. Since this graph has 5 vertices, the target count is 5−1=45-1=4, and the board shows that three edges are already present, so exactly one more edge is needed.

For the fourth edge, the remaining minimum weight is 4, shared by two candidate edges. The edge uw is rejected because adding it would close a cycle with the already chosen edges. The only valid minimum-weight choice is therefore ux, which is selected and added to the right-side tree. The clip ends immediately after this fourth edge is chosen.

The clip opens on the tail end of a worked example. The on-screen algorithm says to repeat the cycle-avoiding selection step until n-1 edges have been chosen, and the narrator immediately applies that rule to a 5-vertex graph: since n=5n=5, the algorithm stops after 5−1=45-1=4 edges, and the selected edges form a minimum spanning tree.

The next concept is the weight of the resulting tree. Calling the tree T, the video defines W(T)W(T) as the sum of the weights of the edges in T. For the displayed tree, the edge weights are 2, 4, 1, and 3, so the calculation is W(T)=2+4+1+3=10W(T)=2+4+1+3=10.

The narrator then emphasizes the minimality property: the graph has many spanning trees, but none has total weight below 10. This is presented as the key payoff of Kruskal's algorithm in the example.

A second graph is introduced as a practice problem. The same algorithm is to be applied: keep choosing minimum-weight remaining edges that do not create a cycle until the tree is complete.

For this second example, the video states that the minimum spanning tree weight is 21. The narrator adds that the viewer's answer should match because the minimum total weight is unique, even if the tree shape need not always be unique.

The clip then clarifies a subtle point about uniqueness. When several edges are tied for minimum weight, Kruskal's algorithm may require an arbitrary choice, so different minimum spanning trees can result from the same graph. The narrator says this particular second graph does not create that issue, so the displayed tree is the expected one.

The final instructional segment restates the method formally: for a connected weighted graph G of order n, Kruskal's algorithm selects a minimum-weight edge, then another minimum-weight remaining edge, then continues selecting minimum-weight remaining edges that do not form cycles with previously chosen edges, repeating until n-1 edges have been selected.

The closing remarks say that the correctness proof is postponed to a later video and mention Prim's algorithm as another, slightly more complicated method for finding minimum spanning trees. After that, the mathematics ends and the clip moves into outro music and end-card visuals.

Knowledge cards

01

Kruskal's algorithm acts on connected weighted graphs

The video states that Kruskal's algorithm finds a minimum spanning tree in a connected weighted graph. Thus the input is not an arbitrary graph but one that is both connected and equipped with edge weights, and the output is a spanning tree of minimum total weight.

02

A spanning tree on n vertices has n-1 edges

If a graph has order nn, meaning nn vertices, then any spanning tree of that graph contains exactly n−1n-1 edges. The video uses this fact to justify the stopping condition in Kruskal's algorithm.

∣E(T)∣=n−1|E(T)| = n - 1
03

Kruskal step 1: choose a minimum-weight edge

The first step is to select an edge of the graph with minimum weight. If several edges tie for minimum weight, the video says to choose any one of them; that chosen edge becomes the first edge of the spanning tree.

04

Kruskal step 2: choose the next minimum-weight remaining edge

After the first edge is chosen, the algorithm selects another edge of minimum weight from the remaining edges. This becomes the second edge of the spanning tree.

05

Kruskal step 3: add only edges that do not create cycles

From the third edge onward, the algorithm chooses a remaining edge of minimum weight subject to the condition that adding it does not form a cycle with the edges already selected. The video explains this by noting that trees cannot have cycles.

06

Kruskal step 4: repeat until n-1 edges are selected

The algorithm repeats the cycle-avoiding minimum-weight selection until exactly n−1n-1 edges have been chosen. At that point the selected edges form a minimum spanning tree.

07

A spanning tree must contain all vertices of the original graph

Before the worked example begins, the video explicitly reminds the viewer that a spanning tree by definition contains all vertices of the original graph. Therefore Kruskal's algorithm is not choosing a subset of vertices; it is choosing a subset of edges that connects all vertices with minimum total weight and no cycles.

08

Worked example setup for Kruskal's algorithm

The clip introduces a concrete example graph with vertices u,v,w,x,yu,v,w,x,y and visible edge weights including uv=1uv=1, vx=2vx=2, wy=3wy=3, uw=4uw=4, ux=4ux=4, xy=5xy=5, yv=5yv=5, xw=6xw=6, vw=7vw=7, and yx=7yx=7. The same five vertices are also drawn isolated on the right as the future location of the spanning tree. The algorithm steps are pasted above the example. No edge selection is completed before the clip ends.

09

Kruskal's algorithm as written on the board

The video states the method in four steps: select a minimum-weight edge of G; select a remaining minimum-weight edge; then repeatedly select a remaining minimum-weight edge that does not form a cycle with previously selected edges; stop when n-1 edges have been chosen. This is the procedural backbone of the whole clip.

1. Select an edge of G of minimum weight2. Select a remaining edge of G of minimum weight3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges4. Repeat 3 until n−1 edges have been selected1.\ \text{Select an edge of }G\text{ of minimum weight} 2.\ \text{Select a remaining edge of }G\text{ of minimum weight} 3.\ \text{Select any remaining edge of }G\text{ of minimum weight that does not form a cycle with the previously selected edges} 4.\ \text{Repeat 3 until }n-1\text{ edges have been selected}
10

Why the second edge needs no cycle test

After the first edge is chosen, the speaker explicitly says the second minimum-weight edge can be taken directly because it is impossible to create a cycle with just two edges. This distinguishes step 2 from step 3, where the no-cycle condition becomes necessary.

11

Cycle-aware selection begins at step 3

From the third edge onward, the algorithm only accepts a minimum-weight remaining edge if it does not create a cycle with the edges already in the tree. In the example, wv of weight 3 is accepted because it connects a new vertex without closing a loop.

12

Spanning tree edge count n-1

The clip uses the fact that a spanning tree on n vertices has n-1 edges. Here the graph has 5 vertices, so the algorithm must stop after 4 edges. The board makes this concrete with the written calculation 5−1=45-1=4.

n−1,5−1=4n-1,\quad 5-1=4
13

Tie-breaking by cycle avoidance

When two remaining edges both have minimum weight 4, the algorithm does not choose arbitrarily. The edge uw is rejected because it would form a cycle, while ux is accepted. This card captures the central decision rule in the last part of the clip.

14

Worked example result

Running the algorithm on the displayed graph produces the edge set {uv, yx, wv, ux}. These are exactly the edges drawn on the duplicated vertex set at the right by the end of the segment.

{uv, yx, wv, ux}\{uv,\ yx,\ wv,\ ux\}
15

Kruskal's algorithm: core procedure

For a connected weighted graph G of order n, Kruskal's algorithm builds a minimum spanning tree by repeatedly choosing a remaining edge of minimum weight that does not create a cycle with the edges already chosen. The process stops once n-1 edges have been selected.

1. Select an edge of G of minimum weight2. Select a remaining edge of G of minimum weight3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges4. Repeat 3. until n−1 edges have been selected\begin{aligned} &\text{1. Select an edge of }G\text{ of minimum weight}\\ &\text{2. Select a remaining edge of }G\text{ of minimum weight}\\ &\text{3. Select any remaining edge of }G\text{ of minimum weight that does not form a cycle with the previously selected edges}\\ &\text{4. Repeat 3. until }n-1\text{ edges have been selected} \end{aligned}
16

Why stop at n-1 edges

A spanning tree on n vertices has exactly n-1 edges. The video uses this fact directly in the first example: with 5 vertices, it computes 5−1=45-1=4 and stops after four selected edges.

Stop when n−1 edges have been selected\text{Stop when } n-1 \text{ edges have been selected}
17

Weight of a spanning tree W(T)W(T)

If T is the spanning tree produced by the algorithm, its weight W(T)W(T) is the sum of the weights of all edges in T. In the first example, the displayed tree has edge weights 2, 4, 1, and 3, so W(T)=2+4+1+3=10W(T)=2+4+1+3=10.

W(T)=∑e∈E(T)w(e)W(T)=\sum_{e\in E(T)} w(e)
18

First worked example: minimum weight is 10

Applying Kruskal's algorithm to the first 5-vertex graph yields a tree with four edges. The narrator states that although the graph has many spanning trees, none has weight less than 10, so the computed tree is minimum.

W(T)=10W(T)=10
19

Second worked example: minimum weight is 21

The video presents a larger 6-vertex graph as practice. After applying the same algorithm, the narrator gives the minimum spanning tree weight as 21 and says the viewer's total should match because the minimum weight itself is unique.

W(T)=21W(T)=21
20

Unique weight versus possibly non-unique tree

The clip distinguishes two ideas. The minimum total weight is unique, but the actual tree need not be unique if there are ties among minimum-weight edges. In such cases Kruskal's algorithm may require an arbitrary choice, producing different valid minimum spanning trees from the same graph.

21

Scope of this lesson

This segment explains and illustrates Kruskal's algorithm but does not prove its correctness. The narrator explicitly says a later video will prove that the algorithm works, and also mentions Prim's algorithm as a different method for minimum spanning trees.

Detailed learning notes

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

Symbols · 14

G

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    The board states "Let G be a connected weighted graph of order n."

  2. Audio
    Observation

    The narrator says, "Let G be a connected weighted graph of order n."

Symbol

G

Meaning

A connected weighted graph on which Kruskal's algorithm is run.

Domain

connected weighted graph

n

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    The board uses "order n" in the setup sentence.

  2. Audio
    Observation

    The narrator explains that this means the graph has n vertices.

Symbol

n

Meaning

The order of the graph, i.e. the number of vertices.

Domain

positive integer vertex count

T

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    The board states "Kruskal's Algorithm finds a minimum spanning tree T in the following manner."

  2. Audio
    Observation

    The narrator says the algorithm finds a minimum spanning tree, say T.

Symbol

T

Meaning

The minimum spanning tree produced by Kruskal's algorithm.

Domain

subgraph of G

n-1

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says a spanning tree of a graph with n vertices will have n minus 1 edges.

  2. Caption evidence
    Observation

    Step 4 on the board reads "Repeat 3. until n-1 edges have been selected".

Symbol

n-1

Meaning

The number of edges in any spanning tree of an n-vertex graph, and therefore the stopping count for the algorithm.

Domain

integer edge count

u, v, w, x, y

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The worked example graph shows five labeled vertices u, v, w, x, y.

  2. Audio
    Observation

    The narrator introduces "this graph here" as the example for running the algorithm.

Symbol

u, v, w, x, y

Meaning

Vertex labels in the example graph used to demonstrate Kruskal's algorithm.

Domain

vertices of the example graph

G

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The written algorithm repeatedly refers to edges of G.

  2. Audio
    Observation

    The speaker says to select an edge of G of minimum weight.

Symbol

G

Meaning

the weighted graph on which Kruskal's algorithm is being demonstrated

Domain

weighted undirected graph with vertices u, v, w, x, y

u, v, w, x, y

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The left graph and the duplicated right-side vertex set are labeled u, v, w, x, y.

  2. Audio
    Observation

    The speaker names edges joining u and v, y and x, w and v, u and w, and u and x.

Symbol

u, v, w, x, y

Meaning

the five vertices of the example graph

Domain

vertex set of G

n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 4 is written as Repeat 3 until n-1 edges have been selected.

  2. Audio
    Observation

    The speaker explains that n is the number of vertices of the graph.

Symbol

n

Meaning

the number of vertices in the graph

Domain

positive integer; here n=5n=5

edge weight

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    Green numbers are placed next to edges in the left graph.

  2. Audio
    Observation

    The speaker says the weight of each edge is written next to it in green.

Symbol

edge weight

Meaning

numeric cost assigned to each edge, used to choose minimum-weight edges

Domain

visible values include 1, 2, 3, 4, 5, 6, 7

G

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The written algorithm text repeatedly uses G in phrases such as "Select an edge of G" and later "Let G be a connected weighted graph of order n."

Symbol

G

Meaning

A connected weighted graph to which Kruskal's algorithm is applied.

Domain

connected weighted graph

n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The algorithm text says "Repeat 3. until n-1 edges have been selected".

  2. Formula
    Observation

    At 67.5 s the screen states "Let G be a connected weighted graph of order n."

Symbol

n

Meaning

The order of G, i.e. the number of vertices in the graph.

Domain

positive integer

T

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "If we call this tree T, then W of T, the weight of the spanning tree, is equal to 10."

  2. Formula
    Observation

    The screen shows W(T)=10W(T)=10 for the first worked example and later W(T)=21W(T)=21 for the second worked example.

Symbol

T

Meaning

The minimum spanning tree produced by Kruskal's algorithm in the worked examples.

Domain

tree subgraph of G

Knowledge points · 13

Scope of Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    Top text reads "Kruskal's Algorithm finds a minimum spanning tree in a connected weighted graph."

  2. Audio
    Observation

    The narrator repeats that Kruskal's algorithm finds a minimum spanning tree in a connected weighted graph.

Definition
Explanation

The video defines the setting for Kruskal's algorithm as a connected weighted graph, and states that the algorithm's output is a minimum spanning tree for that graph.

Formula
Conditions
  1. The input graph is connected.

  2. The input graph is weighted.

  3. The desired output is a minimum spanning tree.

Edge count of a spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says a spanning tree of a graph with n vertices will have n minus 1 edges.

  2. Caption evidence
    Observation

    Later step 4 explicitly uses "until n-1 edges have been selected".

Formula
Explanation

For a graph of order n, any spanning tree contains exactly n-1 edges. The video uses this fact to justify when Kruskal's algorithm can stop.

Formula
∣E(T)∣=n−1|E(T)| = n - 1
Conditions
  1. T is a spanning tree of a graph with n vertices.

Prerequisites
  1. Scope of Kruskal's algorithm

Spanning tree must contain all vertices

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "Remember that a spanning tree by definition contains all the vertices of the original graph."

Definition
Explanation

Before applying the algorithm to the example, the video reminds the viewer that a spanning tree includes every vertex of the original graph; the algorithm only chooses which edges to keep so that total weight is minimized.

Formula
Conditions
  1. The chosen subgraph is a spanning tree of the original graph.

Prerequisites
  1. Scope of Kruskal's algorithm

Kruskal step 1: choose a minimum-weight edge

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    Step 1 on the board reads "Select an edge of G of minimum weight".

  2. Audio
    Observation

    The narrator explains that if several edges tie for minimum weight, one of them is selected as the first edge of the spanning tree.

Method
Explanation

The first step of Kruskal's algorithm is to select an edge of the graph with minimum weight. If multiple edges share that minimum weight, any one of them may be chosen as the first edge of the spanning tree.

Formula
Conditions
  1. Work in a connected weighted graph G.

  2. Choose an edge attaining the minimum weight among all edges of G.

Prerequisites
  1. Scope of Kruskal's algorithm

Kruskal step 2: choose the next minimum-weight remaining edge

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    Step 2 on the board reads "Select a remaining edge of G of minimum weight".

  2. Audio
    Observation

    The narrator says to select another remaining edge of minimum weight as the second edge of the spanning tree.

Method
Explanation

After the first edge is chosen, the algorithm selects from the remaining edges another edge of minimum weight. This becomes the second edge of the spanning tree.

Formula
Conditions
  1. One edge has already been selected.

  2. Choose a minimum-weight edge among the edges not yet selected.

Prerequisites
  1. Kruskal step 1: choose a minimum-weight edge

Kruskal step 3: add minimum-weight edge only if it avoids a cycle

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    Step 3 on the board reads "Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges".

  2. Audio
    Observation

    The narrator explains that once two edges are present, any additional edge could create a cycle, and trees cannot have cycles.

Method
Explanation

From the third edge onward, the algorithm repeatedly chooses a remaining edge of minimum weight subject to the condition that adding it does not create a cycle with the edges already selected. The cycle restriction is justified because a tree cannot contain cycles.

Formula
Conditions
  1. At least two edges have already been selected.

  2. Among remaining edges, choose one of minimum weight that does not complete a cycle with the current selected set.

Prerequisites
  1. Kruskal step 2: choose the next minimum-weight remaining edge
  2. Edge count of a spanning tree

Kruskal step 4: repeat until n-1 edges are selected

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    Step 4 on the board reads "Repeat 3. until n-1 edges have been selected".

  2. Audio
    Observation

    The narrator says to repeat step 3 until n minus 1 edges have been selected, yielding a minimum spanning tree.

Method
Explanation

The final procedural instruction is to keep repeating the cycle-avoiding minimum-weight selection until the algorithm has accumulated n-1 edges. At that point the selected edges form a minimum spanning tree.

Formula
Conditions
  1. Continue applying step 3.

  2. Stop when exactly n-1 edges have been selected.

Prerequisites
  1. Kruskal step 3: add minimum-weight edge only if it avoids a cycle
  2. Edge count of a spanning tree

Kruskal's algorithm procedure shown on the board

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board lists four steps: 1. Select an edge of G of minimum weight. 2. Select a remaining edge of G of minimum weight. 3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges. 4. Repeat 3 until n-1 edges have been selected.

  2. Audio
    Observation

    The speaker reads and applies these steps in order while constructing the spanning tree.

Method
Explanation

The clip presents Kruskal's algorithm as a greedy edge-selection method. First take a globally minimum-weight edge, then take another minimum-weight edge from the remainder, then continue choosing minimum-weight remaining edges only if they do not create a cycle with already chosen edges, repeating until n-1 edges are selected.

Formula
Repeat step 3 until n−1 edges have been selected\text{Repeat step 3 until } n-1 \text{ edges have been selected}
Conditions
  1. The graph G is weighted.

  2. Edges are considered in nondecreasing weight order among remaining candidates.

  3. A candidate edge is rejected if it forms a cycle with previously selected edges.

  4. The process stops after n-1 edges have been selected.

A spanning tree on n vertices has n-1 edges

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 4 explicitly states n-1 edges.

  2. Audio
    Observation

    The speaker says one less edge than we have vertices because at that point we will have completed our spanning tree.

  3. Formula
    Observation

    The speaker writes 5−1=45-1=4 for this example.

Formula
Explanation

The video uses the fact that once n-1 edges have been selected without forming cycles, the spanning tree is complete. For the displayed graph with five vertices, this means exactly four edges are needed.

Formula
n−1n-1
Conditions
  1. The selected edges form a spanning tree of a graph with n vertices.

  2. In this example n=5n=5, so the target number of edges is 4.

Prerequisites
  1. Kruskal's algorithm procedure shown on the board

Stopping rule for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The screen lists step 4: "Repeat 3. until n-1 edges have been selected".

  2. Audio
    Observation

    The narrator says, "Have n minus one or four edges, we can stop and we have a minimum spanning tree."

Method
Explanation

Kruskal's algorithm stops once n-1 edges have been selected; at that point the chosen edges form a minimum spanning tree of the connected weighted graph.

Formula
Stop when n−1 edges have been selected\text{Stop when } n-1 \text{ edges have been selected}
Conditions
  1. G is a connected weighted graph

  2. n is the number of vertices of G

Prerequisites
  1. Kruskal's algorithm for a minimum spanning tree

Weight of a spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "If we call this tree T, then W of T, the weight of the spanning tree, is equal to 10. That's just the sum of the weights of the edges, 2 plus 4 plus 1 plus 3."

  2. Formula
    Observation

    The screen writes W(T)=10W(T)=10 next to the extracted tree.

Definition
Explanation

The weight of a spanning tree T is the sum of the weights of all edges belonging to T. In the first example, the displayed tree has edge weights 2, 4, 1, and 3, so its total weight is 10.

Formula
W(T)=∑e∈E(T)w(e)W(T)=\sum_{e\in E(T)} w(e)
Conditions
  1. T is a spanning tree of a weighted graph

  2. w(e)w(e) denotes the weight of edge e

Prerequisites
  1. Kruskal's algorithm for a minimum spanning tree

Kruskal's algorithm for a minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The screen shows the full algorithm text: "Kruskal's Algorithm finds a minimum spanning tree in a connected weighted graph. Let G be a connected weighted graph of order n. Kruskal's Algorithm finds a minimum spanning tree T in the following manner. 1. Select an edge of G of minimum weight 2. Select a remaining edge of G of minimum weight 3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges 4. Repeat 3. until n-1 edges have been selected".

  2. Audio
    Observation

    The narrator summarizes, "So that's Kruskal's algorithm for finding a minimum spanning tree."

Method
Explanation

Kruskal's algorithm constructs a minimum spanning tree by repeatedly choosing a remaining edge of minimum weight that does not create a cycle with the edges already chosen, continuing until n-1 edges have been selected.

Formula
1. Select an edge of G of minimum weight2. Select a remaining edge of G of minimum weight3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges4. Repeat 3. until n−1 edges have been selected\begin{aligned} &\text{1. Select an edge of }G\text{ of minimum weight}\\ &\text{2. Select a remaining edge of }G\text{ of minimum weight}\\ &\text{3. Select any remaining edge of }G\text{ of minimum weight that does not form a cycle with the previously selected edges}\\ &\text{4. Repeat 3. until }n-1\text{ edges have been selected} \end{aligned}
Conditions
  1. G is a connected weighted graph

  2. n is the order of G

Claims and conditions · 7

Stopping criterion for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator states that a spanning tree of a graph with n vertices will have n minus 1 edges, so the algorithm can stop once n minus 1 edges have been selected.

  2. Caption evidence
    Observation

    The later written step 4 uses the same stopping criterion.

Proposition
Statement

In a graph of order n, Kruskal's algorithm can stop once n-1 edges have been selected because a spanning tree on n vertices has exactly n-1 edges.

Hypotheses
  1. The graph has n vertices.

  2. The selected edges are intended to form a spanning tree.

Quantifiers

For a connected weighted graph of order n.

Two selected edges cannot form a cycle in this demonstration

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says that at this point we can select any edge of minimum weight because it's impossible that we'll create a cycle with just two edges.

Proposition
Statement

After selecting the first edge, the second minimum-weight edge can be chosen without checking for a cycle because two edges alone cannot create a cycle in the presented construction.

Hypotheses
  1. Only two edges have been selected so far.

  2. The graph is treated as a simple undirected graph in the demonstration.

Quantifiers

for the current stage of the example after step 1 and before step 3

Stopping condition for the algorithm

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 4 on the board says Repeat 3 until n-1 edges have been selected.

  2. Audio
    Observation

    The speaker explains that this is when the spanning tree is completed.

Proposition
Statement

The algorithm repeats the cycle-avoiding selection step until n-1 edges have been selected, at which point the spanning tree is complete.

Hypotheses
  1. n is the number of vertices of the graph.

  2. Selected edges have been chosen by the stated minimum-weight, no-cycle rule.

Quantifiers

for the graph G in the example and for the general procedure written on the board

First worked example has minimum spanning tree weight 10

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says the tree weight is 10 and explains it as 2+4+1+32+4+1+3.

  2. Formula
    Observation

    The screen writes W(T)=10W(T)=10.

Proposition
Statement

For the first displayed 5-vertex weighted graph, the tree extracted by Kruskal's algorithm has total weight W(T)=10W(T)=10, and no spanning tree of that graph has smaller weight.

Hypotheses
  1. The graph shown on the left is the input graph

  2. The right-hand tree is the output of Kruskal's algorithm

  3. Edge weights are those labeled on the diagram

Quantifiers

For the specific graph shown in the first example.

Second worked example has minimum spanning tree weight 21

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator asks, "What's the weight of your tree? The weight of mine is 21, and of course that should be the weight of yours because there's only one minimum weight."

  2. Formula
    Observation

    The screen writes W(T)=21W(T)=21.

Proposition
Statement

For the second displayed 6-vertex weighted graph, the minimum spanning tree found by Kruskal's algorithm has total weight W(T)=21W(T)=21.

Hypotheses
  1. The graph shown is the second worked example

  2. The algorithm is applied as stated on screen

Quantifiers

For the specific graph shown in the second example.

Tie-breaking can yield different minimum spanning trees

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "Remember that this algorithm can produce different minimum spanning trees from the same graph since at times it is necessary to make an arbitrary choice among edges that are tied for the minimum weight. However, you won't encounter such a thing with this graph, so your minimum spanning tree should look like this."

Proposition
Statement

Kruskal's algorithm may produce different minimum spanning trees from the same graph when there are ties among minimum-weight candidate edges, but the second example graph has no such tie issue, so the resulting tree is uniquely determined up to the displayed structure.

Hypotheses
  1. The graph is weighted

  2. Edges may have equal minimum weights during selection

Quantifiers

There exist weighted graphs for which different valid tie choices lead to different minimum spanning trees; for the second example graph shown, the video states this situation does not arise.

Correctness proof is deferred to a later video

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "In a later video, we'll actually prove that the algorithm works, so we can be 100% sure it does what it's supposed to."

Proposition
Statement

The video does not prove Kruskal's algorithm here; it states that a later video will prove that the algorithm works.

Hypotheses
  1. This clip is part of a series

Quantifiers

For the algorithm presented in this clip.

Derivations and proofs · 4

Why cycle checking begins at step 3

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says that after two edges are selected, any additional edge could possibly create a cycle, and trees cannot have cycles.

  2. Caption evidence
    Observation

    Step 3 is written as selecting a remaining minimum-weight edge that does not form a cycle with previously selected edges.

Intuitive argument
Steps
  1. Expression
    Explanation

    The algorithm first selects one minimum-weight edge and then a second minimum-weight remaining edge.

    Justification

    These are steps 1 and 2 as written on the board and spoken aloud.

    Shown in the video
  2. Expression
    Explanation

    Once two edges are already chosen, a third edge might close a loop with them.

    Justification

    This is the narrator's stated reason for introducing a new restriction after the first two selections.

    Shown in the video
  3. Expression
    Explanation

    Because a tree cannot contain cycles, the algorithm must reject any candidate edge that would create one.

    Justification

    This follows from the definition of a tree and is explicitly invoked in the narration.

    Shown in the video
Conclusion

Therefore step 3 adds the rule that each subsequent minimum-weight edge is accepted only if it does not form a cycle with the previously selected edges.

Worked execution of Kruskal's algorithm on the displayed graph

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker narrates each choice: edge uv of weight 1, edge yx of weight 2, edge wv of weight 3, rejects uw of weight 4 because it would create a cycle, and selects ux of weight 4.

  2. Diagram
    Observation

    The right-side duplicated vertices accumulate the chosen edges in the same order.

  3. Formula
    Observation

    The board shows the stopping count 5−1=45-1=4.

Visual argument
Steps
  1. Expression
    Explanation

    Apply step 1 by scanning all edges and choosing the minimum-weight edge.

    Justification

    The board states: Select an edge of G of minimum weight.

    Shown in the video
  2. Expression
    uv,w(uv)=1uv,\quad w(uv)=1
    Explanation

    The chosen first edge is the edge joining u and v with weight 1, and it is added to the spanning tree on the right.

    Justification

    This is the smallest visible edge weight in the graph.

    Shown in the video
  3. Expression
    Explanation

    Apply step 2 by choosing a remaining minimum-weight edge.

    Justification

    The board states: Select a remaining edge of G of minimum weight.

    Shown in the video
  4. Expression
    yx,w(yx)=2yx,\quad w(yx)=2
    Explanation

    The second chosen edge is the edge joining y and x with weight 2, and it is added to the right-side tree.

    Justification

    It is the smallest remaining visible edge weight, and the speaker notes that a cycle cannot yet be formed with only two edges.

    Shown in the video
  5. Expression
    Explanation

    Apply step 3 by choosing a remaining minimum-weight edge that does not form a cycle with previously selected edges.

    Justification

    The board states: Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges.

    Shown in the video
  6. Expression
    wv,w(wv)=3wv,\quad w(wv)=3
    Explanation

    The third chosen edge is the edge joining w and v with weight 3, and it is added to the right-side tree.

    Justification

    The speaker explicitly says it does not create a cycle with the previous edges.

    Shown in the video
  7. Expression
    5−1=45-1=4
    Explanation

    Compute how many total edges are required for the spanning tree.

    Justification

    The graph has n=5n=5 vertices, and the algorithm stops after n-1 edges.

    Shown in the video
  8. Expression
    Explanation

    Check the remaining minimum-weight candidates for the fourth edge.

    Justification

    Step 3 must be repeated until four edges have been selected.

    Shown in the video
  9. Expression
    uw,w(uw)=4uw,\quad w(uw)=4
    Explanation

    The edge joining u and w has weight 4 but is rejected.

    Justification

    The speaker says choosing it would create a cycle with the already selected edges.

    Shown in the video
  10. Expression
    ux,w(ux)=4ux,\quad w(ux)=4
    Explanation

    The edge joining u and x has weight 4 and is selected as the fourth edge.

    Justification

    It is the only remaining minimum-weight edge that does not create a cycle.

    Shown in the video
Conclusion

For this example graph, the algorithm selects exactly four edges: uv, yx, wv, and ux, producing the spanning tree drawn on the right.

Computing the weight of the first minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator computes the weight verbally as 2 plus 4 plus 1 plus 3.

  2. Formula
    Observation

    The screen shows W(T)=10W(T)=10 beside the extracted tree.

  3. Diagram
    Observation

    The right-hand tree displays edge weights 2, 4, 1, and 3.

Numerical verification
Steps
  1. Expression
    W(T)=2+4+1+3W(T)=2+4+1+3
    Explanation

    Add the weights of the four edges in the extracted tree.

    Justification

    By definition, the weight of a spanning tree is the sum of its edge weights.

    Shown in the video
  2. Expression
    W(T)=10W(T)=10
    Explanation

    The sum evaluates to 10.

    Justification

    Arithmetic evaluation of the displayed edge weights.

    Shown in the video
Conclusion

The first example's minimum spanning tree has total weight 10.

Computing the weight of the second minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator states, "The weight of mine is 21".

  2. Formula
    Observation

    The screen writes W(T)=21W(T)=21.

  3. Diagram
    Observation

    The final tree on the right contains edges corresponding to weights 1, 2, 3, 4, and 11.

Uncertainties
  1. The intermediate addition is spoken as a final value rather than fully written out on screen.

Numerical verification
Steps
  1. Expression
    W(T)=1+2+3+4+11W(T)=1+2+3+4+11
    Explanation

    Sum the weights of the five edges in the displayed spanning tree.

    Justification

    Use the definition of spanning-tree weight as the sum of edge weights.

    Derived from the video
  2. Expression
    W(T)=21W(T)=21
    Explanation

    The total is 21, matching the value written on screen and spoken by the narrator.

    Justification

    Arithmetic evaluation.

    Shown in the video
Conclusion

The second example's minimum spanning tree has total weight 21.

Worked examples · 4

Example graph introduced for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "To make this algorithm more concrete, let's try running it on this graph here."

  2. Diagram
    Observation

    A five-vertex weighted graph appears on the left, with isolated copies of the same five vertices on the right.

  3. Caption evidence
    Observation

    The algorithm steps remain pasted above the example for reference.

Uncertainties
  1. The clip ends before any edge is actually selected or rejected, so the worked solution is not completed within this segment.

  2. Some edge weights are visually ambiguous in the sampled frames, but the clearly legible values include uv=1, vx=2, wy=3, uw=4, xy=5, yv=5, and xw=6; the remaining displayed weights are 4, 7, and 7 on edges ux, vw, and yx respectively.

Problem

Apply Kruskal's algorithm to the displayed five-vertex weighted graph with vertices u, v, w, x, y.

Given
  1. The graph has vertices u, v, w, x, y.

  2. The visible edge weights are uv=1, vx=2, wy=3, uw=4, ux=4, xy=5, yv=5, xw=6, vw=7, yx=7.

  3. The algorithm steps are pasted above the graph.

  4. The right side shows the same five vertices isolated, ready to build the spanning tree.

Goal

Begin demonstrating how Kruskal's algorithm would select edges from this graph to form a minimum spanning tree.

Steps
  1. Expression
    Explanation

    The video replaces the pure text setup with a concrete graph example while keeping the algorithm steps visible above.

    Justification

    The narrator explicitly says the example is shown to make the algorithm more concrete.

    Shown in the video
  2. Expression
    Explanation

    The left graph is the source weighted graph; the right side displays the same vertices separately as the place where the spanning tree will be assembled.

    Justification

    This is directly visible in the diagram layout.

    Shown in the video
  3. Expression
    Explanation

    Before starting the selection process, the narrator reminds the viewer that a spanning tree must contain all vertices of the original graph.

    Justification

    This is stated in the audio at the end of the clip.

    Shown in the video
Answer

No final spanning tree is produced within this clip; the segment only sets up the example and restates the algorithm before execution begins.

Verification

The clip ends while the narrator is still introducing the example, so verification of the final MST is outside the provided interval.

Minimum spanning tree example using Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A weighted graph with vertices u, v, w, x, y is shown on the left, and a duplicate vertex set on the right is used to build the spanning tree.

  2. Audio
    Observation

    The speaker walks through the algorithm on this exact graph.

  3. Formula
    Observation

    The visible edge weights include 1, 2, 3, 4, 5, 6, 7, and the stopping calculation 5−1=45-1=4 is written.

Uncertainties
  1. Some edge labels are visually ambiguous in the drawing, but the spoken narration clearly identifies the chosen edges uv, yx, wv, and ux.

  2. The full final tree is not verbally summarized before the clip ends, although the fourth edge is selected.

Problem

Run Kruskal's algorithm on the displayed weighted graph G with vertices u, v, w, x, y and construct the spanning tree on the duplicated vertex set at the right.

Given
  1. The graph G has 5 vertices: u, v, w, x, y.

  2. Edge weights are written in green next to the edges.

  3. The algorithm steps are written on the board.

  4. The right side contains a duplicate copy of the vertices for recording selected edges.

Goal

Select edges in increasing weight order while avoiding cycles until n-1 edges have been chosen.

Steps
  1. Expression
    Explanation

    Start with step 1 and find the minimum-weight edge in the whole graph.

    Justification

    The board's first instruction is to select an edge of G of minimum weight.

    Shown in the video
  2. Expression
    uv with weight 1uv\text{ with weight }1
    Explanation

    Choose the edge between u and v and draw it on the right-side tree.

    Justification

    The speaker identifies this as the edge of minimum weight.

    Shown in the video
  3. Expression
    Explanation

    Move to step 2 and choose a remaining minimum-weight edge.

    Justification

    The board's second instruction is to select a remaining edge of G of minimum weight.

    Shown in the video
  4. Expression
    yx with weight 2yx\text{ with weight }2
    Explanation

    Choose the edge between y and x and add it to the right-side tree.

    Justification

    The speaker says this is the minimum-weight remaining edge and notes that two edges cannot yet form a cycle.

    Shown in the video
  5. Expression
    Explanation

    Move to step 3 and consider only remaining minimum-weight edges that do not create a cycle.

    Justification

    The board's third instruction adds the no-cycle condition.

    Shown in the video
  6. Expression
    wv with weight 3wv\text{ with weight }3
    Explanation

    Choose the edge between w and v and add it to the right-side tree.

    Justification

    The speaker explicitly checks that it does not create a cycle with the previous edges.

    Shown in the video
  7. Expression
    5−1=45-1=4
    Explanation

    Compute the required number of edges for completion.

    Justification

    There are n=5n=5 vertices, and the algorithm stops after n-1 edges.

    Shown in the video
  8. Expression
    Explanation

    Search the remaining edges of minimum weight for the fourth choice.

    Justification

    Step 3 must be repeated until four edges are selected.

    Shown in the video
  9. Expression
    uw rejecteduw\text{ rejected}
    Explanation

    Do not choose the edge between u and w.

    Justification

    The speaker says it would create a cycle with the already selected edges.

    Shown in the video
  10. Expression
    ux with weight 4ux\text{ with weight }4
    Explanation

    Choose the edge between u and x as the final edge needed in this clip.

    Justification

    It is the only remaining minimum-weight edge that does not create a cycle.

    Shown in the video
Answer

The spanning tree built in the clip consists of the edges uv, yx, wv, and ux.

Verification

The count matches the written stopping rule 5−1=45-1=4, and the right-side drawing shows exactly these four edges added in sequence.

Worked example on a 5-vertex graph

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A 5-vertex weighted graph with vertices u, v, w, x, y is shown on the left, and the extracted tree is shown on the right.

  2. Formula
    Observation

    The screen writes 5−1=45-1=4 and W(T)=10W(T)=10.

  3. Audio
    Observation

    The narrator explains stopping after four edges and computing the tree weight as 2+4+1+32+4+1+3.

Problem

Apply Kruskal's algorithm to the displayed 5-vertex weighted graph and determine the weight of the resulting minimum spanning tree.

Given
  1. The graph has 5 vertices, so n=5n=5

  2. The algorithm requires n−1=4n-1=4 selected edges

  3. The final tree shown has edge weights 2, 4, 1, and 3

Goal

Find the minimum spanning tree and compute W(T)W(T).

Steps
  1. Expression
    5−1=45-1=4
    Explanation

    Compute how many edges must be selected.

    Justification

    Kruskal's algorithm stops after n-1 edges have been chosen.

    Shown in the video
  2. Expression
    W(T)=2+4+1+3W(T)=2+4+1+3
    Explanation

    Add the weights of the edges in the selected tree.

    Justification

    The weight of a spanning tree is the sum of its edge weights.

    Shown in the video
  3. Expression
    W(T)=10W(T)=10
    Explanation

    The resulting minimum spanning tree has total weight 10.

    Justification

    Direct arithmetic from the displayed edge weights.

    Shown in the video
Answer

The minimum spanning tree has weight 10.

Verification

The narrator states that other spanning trees exist but none has weight less than 10.

Practice example on a 6-vertex graph

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A new 6-vertex weighted graph appears with vertices u, v, w, x, y, z and edge weights including 1, 2, 3, 4, 5, 6, 7, 8, 9, and 11.

  2. Formula
    Observation

    The screen writes W(T)=21W(T)=21.

  3. Audio
    Observation

    The narrator invites the viewer to run the algorithm and then says the weight is 21.

Uncertainties
  1. The exact sequence of edge selections is not fully narrated step-by-step in this clip; only the final tree and total weight are clearly presented.

Problem

Run Kruskal's algorithm on the second displayed weighted graph and find the weight of a minimum spanning tree.

Given
  1. The graph has 6 vertices

  2. The final displayed tree has total weight 21

  3. The narrator says this graph does not force an arbitrary tie choice

Goal

Determine the minimum spanning tree weight for the second graph.

Steps
  1. Expression
    Apply Kruskal’s algorithm to the 6-vertex graph\text{Apply Kruskal's algorithm to the 6-vertex graph}
    Explanation

    Select minimum-weight edges while avoiding cycles until 5 edges are chosen.

    Justification

    This is the method stated on screen for Kruskal's algorithm.

    Shown in the video
  2. Expression
    W(T)=21W(T)=21
    Explanation

    The resulting tree weight is 21.

    Justification

    The narrator gives this value and the screen writes it explicitly.

    Shown in the video
Answer

The minimum spanning tree weight is 21.

Verification

The narrator says the viewer's tree should have the same weight because there is only one minimum weight for this graph.

Visual events · 12

Text-only introduction to Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The screen shows only typed and handwritten text on a black background, with a red pointer moving over words such as "minimum spanning tree", "connected weighted graph", "G", "n", and "T".

  2. Caption evidence
    Observation

    Visible text includes the title sentence and the setup "Let G be a connected weighted graph of order n. Kruskal's Algorithm finds a minimum spanning tree T in the following manner."

Objects
  1. Title sentence about Kruskal's algorithm

  2. Handwritten setup line defining G, n, and T

  3. Red pointer dot

Changes
  1. The red pointer moves across key terms in the title and setup sentence.

  2. Around 30 seconds, the expression n-1 is written and boxed near the setup line.

Invariants
  1. The background remains black.

  2. No graph drawing is present yet.

  3. The mathematical content stays focused on definitions and notation.

Interpretation

This visual phase establishes the problem setting and notation before the algorithm steps are written out.

Written four-step procedure for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    Four numbered handwritten steps appear beneath the setup text.

  2. Caption evidence
    Observation

    The steps read: 1. Select an edge of G of minimum weight; 2. Select a remaining edge of G of minimum weight; 3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges; 4. Repeat 3. until n-1 edges have been selected.

  3. Animation
    Observation

    The red pointer tracks along the lines as the narrator explains each step.

Objects
  1. Numbered steps 1 through 4

  2. Red pointer dot

  3. Setup text above the steps

Changes
  1. The full algorithm is revealed as four written steps.

  2. The pointer emphasizes different phrases, especially the cycle condition in step 3 and the stopping condition in step 4.

Invariants
  1. The earlier setup text remains visible above the steps.

  2. No example graph is shown during most of this interval.

Interpretation

The visual layout converts the verbal description into an explicit ordered procedure, highlighting the greedy minimum-weight rule and the acyclicity constraint.

Transition from abstract algorithm to worked example

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A weighted graph with five yellow vertices labeled u, v, w, x, y appears on the left, and five isolated yellow vertices with the same labels appear on the right.

  2. Caption evidence
    Observation

    The algorithm steps are pasted above the example graph.

  3. Animation
    Observation

    A blue circle briefly encloses the left graph around 95 seconds.

Uncertainties
  1. The clip ends before any edge is selected into the right-side tree.

  2. The exact visual emphasis sequence after the blue circle is limited by the short remaining duration.

Objects
  1. Left weighted graph on vertices u, v, w, x, y

  2. Right isolated copy of the same five vertices

  3. Pasted algorithm steps above

  4. Blue circular highlight around the left graph

Changes
  1. The screen changes from text-only explanation to a concrete graph example.

  2. The left graph is temporarily circled in blue to draw attention to it.

  3. The right-side isolated vertices are prepared as the destination for the spanning-tree construction.

Invariants
  1. The algorithm steps remain visible above the example.

  2. The vertex labels on left and right match.

  3. No edge has yet been transferred to the right side by the end of the clip.

Interpretation

This visual arrangement separates the source graph from the growing spanning tree, making the algorithm's edge-selection process easier to follow.

Persistent whiteboard layout

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The screen is divided into a left weighted graph, a right duplicate vertex set, and algorithm text across the top.

Objects
  1. left weighted graph G

  2. right duplicated vertices u, v, w, x, y

  3. top algorithm text

Invariants
  1. The left graph remains the source of candidate edges.

  2. The right side remains the place where selected edges are recorded.

  3. The algorithm text stays visible throughout.

Interpretation

The layout separates the input graph from the output spanning tree so each greedy choice can be tracked visually.

Selection of the first minimum-weight edge

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    A red pointer moves to step 1, then to the bottom edge of the left graph, which is highlighted in purple.

  2. Diagram
    Observation

    A white edge is then drawn between u and v on the right.

Objects
  1. step 1 text

  2. edge uv on the left graph

  3. right-side vertices u and v

Changes
  1. The edge uv is highlighted on the left.

  2. A corresponding edge is drawn on the right.

Invariants
  1. The other edges remain unselected at this moment.

Interpretation

This visual sequence implements the rule 'select an edge of G of minimum weight' by choosing uv with weight 1.

Selection of the second minimum-weight edge

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    The pointer moves to step 2, then to the edge between y and x, which is highlighted in purple.

  2. Diagram
    Observation

    A white edge is drawn between y and x on the right.

Objects
  1. step 2 text

  2. edge yx on the left graph

  3. right-side vertices y and x

Changes
  1. The edge yx is highlighted on the left.

  2. A corresponding edge is drawn on the right.

Invariants
  1. No cycle check is performed visually at this stage.

Interpretation

This shows the second greedy choice, with the speaker explaining that a cycle cannot yet occur with only two edges.

First cycle-aware selection

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    The pointer moves to step 3, then to the edge between w and v, which is highlighted in purple.

  2. Diagram
    Observation

    A white edge is drawn between w and v on the right.

Objects
  1. step 3 text

  2. edge wv on the left graph

  3. right-side vertices w and v

Changes
  1. The edge wv is highlighted on the left.

  2. A corresponding edge is drawn on the right.

Invariants
  1. The previously selected edges uv and yx remain in the tree.

Interpretation

This visual step demonstrates the added restriction in step 3: choose a minimum-weight remaining edge only if it does not form a cycle.

Writing the stopping condition for this example

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    Step 3 is boxed, then n-1 in step 4 is circled.

  2. Formula
    Observation

    The expression 5−1=45-1=4 is written beneath the algorithm text.

Objects
  1. boxed step 3

  2. circled n-1

  3. written equation 5−1=45-1=4

Changes
  1. The algorithm text is annotated to emphasize repetition and termination.

  2. The numeric target 4 is written explicitly.

Invariants
  1. The graph still has five vertices.

  2. The current tree still has three edges at the start of this annotation.

Interpretation

The annotations connect the general rule n-1 to the concrete example, showing that one more edge is needed.

Rejecting a cycle-forming edge and selecting the final edge

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    The pointer indicates two remaining weight-4 edges, then the edge uw is marked as unusable, and finally the edge ux is highlighted and drawn on the right.

Uncertainties
  1. The exact visual marker used to reject uw is brief, but the spoken explanation clearly identifies it as the cycle-forming edge.

Objects
  1. edge uw

  2. edge ux

  3. right-side tree

Changes
  1. uw is considered and rejected.

  2. ux is highlighted on the left and added on the right.

Invariants
  1. The earlier selected edges uv, yx, and wv remain unchanged.

Interpretation

This is the key cycle-avoidance demonstration: among equal minimum-weight candidates, the edge that would close a cycle is skipped and the other is chosen.

Visual contrast between original graph and extracted tree

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The left side shows the original 5-vertex graph with several edges highlighted in purple; the right side shows the extracted tree with four edges and weights 2, 4, 1, and 3.

  2. Animation
    Observation

    A white outline is drawn around the right-hand tree, and red dots briefly mark selected edges during the explanation.

Objects
  1. Original 5-vertex weighted graph

  2. Extracted 4-edge tree

  3. Algorithm text at top

  4. Equation 5−1=45-1=4

  5. Notation W(T)=10W(T)=10

Changes
  1. The right-hand tree is isolated visually with an outline

  2. Red markers briefly highlight edges being discussed

  3. The weight notation W(T)=10W(T)=10 is added beside the tree

Invariants
  1. The left graph remains the source graph

  2. The right tree remains the selected spanning tree

  3. The algorithm text stays visible above

Interpretation

The animation distinguishes the chosen minimum spanning tree from the full graph and visually supports the claim that the tree's total weight is 10.

Transition to a second worked example

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The screen changes to a new 6-vertex weighted graph on the left and scattered labeled vertices on the right, then to a completed tree on the right.

  2. Animation
    Observation

    Purple highlighting sweeps across parts of the left graph, and a white outline is drawn around the final tree on the right.

Uncertainties
  1. The precise order of edge additions is not fully legible from the sampled visuals alone.

Objects
  1. Second 6-vertex weighted graph

  2. Separated vertex labels on the right

  3. Final spanning tree on the right

  4. Equation W(T)=21W(T)=21

Changes
  1. The first example is replaced by a new graph

  2. The right side evolves from isolated vertices to a connected tree

  3. The final tree is outlined and its weight is written as 21

Invariants
  1. The algorithm text remains on screen

  2. The task is still to find a minimum spanning tree

Interpretation

The visual change marks a practice problem: apply the same algorithm to a larger graph and verify that the minimum total weight is 21.

Final algorithm summary slide

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The screen becomes a clean summary slide reading "Kruskal's Algorithm finds a minimum spanning tree in a connected weighted graph. Let G be a connected weighted graph of order n. Kruskal's Algorithm finds a minimum spanning tree T in the following manner. 1. Select an edge of G of minimum weight 2. Select a remaining edge of G of minimum weight 3. Select any remaining edge of G of minimum weight that does not form a cycle with the previously selected edges 4. Repeat 3. until n-1 edges have been selected".

Objects
  1. Text-only summary of Kruskal's algorithm

  2. Definitions of G, n, and T

Changes
  1. Worked diagrams disappear

  2. Only the formal algorithm statement remains

Invariants
  1. The algorithm steps are unchanged from earlier on-screen text

Interpretation

The clip closes by restating the method in compact formal form before mentioning future proof and related algorithms.

Misconceptions · 6

Forgetting that trees cannot contain cycles

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says that once two edges are selected, any additional edge could possibly create a cycle, and trees can't have cycles.

Misconception

One might think any extra low-weight edge can be added freely while building a spanning tree.

Clarification

The video explicitly rules this out: after the first two edges, each new edge must be checked so that it does not form a cycle, because a tree cannot have cycles.

Thinking a spanning tree can omit some vertices

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator reminds the viewer that a spanning tree by definition contains all the vertices of the original graph.

Misconception

One might confuse a minimum-weight subgraph with a spanning tree and imagine that some vertices could be left out.

Clarification

The video states that a spanning tree must contain all vertices of the original graph; Kruskal's algorithm only chooses edges to minimize total weight.

Thinking the second edge also needs a cycle check

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says that at this point we can select any edge of minimum weight because it's impossible that we'll create a cycle with just two edges.

Misconception

One might assume every selected edge, including the second one, must be tested for cycle creation.

Clarification

The video explicitly states that with only two edges selected, a cycle cannot yet be formed, so the second minimum-weight edge can be taken directly.

Assuming equal minimum weight means either edge is always valid

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker notes that the edges of minimum weight are these two that both have weight 4, but one cannot be picked because it would create a cycle.

Misconception

When several remaining edges share the same minimum weight, one might think any of them may be chosen freely.

Clarification

The example shows that even among equal-weight candidates, the no-cycle condition still decides: uw is rejected and ux is selected.

Unique minimum weight does not always mean a unique tree

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "there's only one minimum weight" and then clarifies, "this algorithm can produce different minimum spanning trees from the same graph since at times it is necessary to make an arbitrary choice among edges that are tied for the minimum weight."

Misconception

Because the minimum spanning tree weight is unique, one might think the tree itself must always be unique.

Clarification

The video distinguishes the two ideas: the minimum total weight is unique, but different minimum spanning trees can arise when tied minimum-weight edges force arbitrary choices.

This clip demonstrates the method rather than proving correctness

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says, "In a later video, we'll actually prove that the algorithm works".

Misconception

One might assume the video has already established why Kruskal's algorithm always returns a minimum spanning tree.

Clarification

The clip explicitly defers the correctness proof to a later video; here the algorithm is presented and illustrated by examples.

Concept relations · 10

Edge count of a spanning tree → Kruskal step 4: repeat until n-1 edges are selected

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator links the edge count n-1 to the stopping rule of the algorithm.

  2. Caption evidence
    Observation

    Step 4 uses n-1 as the termination condition.

Proof dependency
Explanation

The stopping rule in Kruskal's step 4 depends on the fact that a spanning tree on n vertices has exactly n-1 edges.

Kruskal step 3: add minimum-weight edge only if it avoids a cycle → Forgetting that trees cannot contain cycles

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator justifies step 3 by saying trees can't have cycles.

Contrast
Explanation

Step 3 is defined precisely to prevent the mistaken idea that extra edges may be added without regard to cycles.

Kruskal step 4: repeat until n-1 edges are selected → Example graph introduced for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says the example is introduced to make the algorithm more concrete.

  2. Diagram
    Observation

    The algorithm steps are pasted above the example graph.

Application
Explanation

The worked example is presented as a direct application of the previously stated Kruskal procedure.

Spanning tree must contain all vertices → Example graph introduced for Kruskal's algorithm

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator states that a spanning tree contains all vertices of the original graph.

  2. Diagram
    Observation

    The right side shows all five vertices isolated before edge selection begins.

Prerequisite
Explanation

Understanding why all five vertices are copied to the right side depends on the definition that a spanning tree must include every vertex of the original graph.

Kruskal's algorithm procedure shown on the board → A spanning tree on n vertices has n-1 edges

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 4 says repeat until n-1 edges have been selected.

  2. Audio
    Observation

    The speaker links this count to completing the spanning tree.

Application
Explanation

The algorithm's stopping rule directly uses the fact that a spanning tree on n vertices contains n-1 edges.

Kruskal's algorithm procedure shown on the board → Two selected edges cannot form a cycle in this demonstration

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 3 includes the phrase that does not form a cycle with the previously selected edges.

  2. Animation
    Observation

    The later rejection of uw illustrates this condition in action.

Contrast
Explanation

The procedure contrasts the early stage, where a cycle check is unnecessary after only two edges, with the later stage, where cycle avoidance becomes essential.

Kruskal's algorithm for a minimum spanning tree → Minimum spanning tree property emphasized in the example

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The summary text states that Kruskal's Algorithm finds a minimum spanning tree T.

  2. Audio
    Observation

    The narrator concludes, "So that's Kruskal's algorithm for finding a minimum spanning tree."

Application
Explanation

Kruskal's algorithm is presented as the method used to construct a minimum spanning tree.

Weight of a spanning tree → Worked example on a 5-vertex graph

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator defines W(T)W(T) as the sum of edge weights and then applies it in both examples.

  2. Formula
    Observation

    The screen shows W(T)=10W(T)=10 and later W(T)=21W(T)=21.

Application
Explanation

The definition of spanning-tree weight is used to compute the totals in the worked examples.

Stopping rule for Kruskal's algorithm → Kruskal's algorithm for a minimum spanning tree

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 4 of the algorithm states to repeat until n-1 edges have been selected.

Contains
Explanation

The stopping rule is one component of the full description of Kruskal's algorithm.

Kruskal's algorithm for a minimum spanning tree → Minimum spanning tree property emphasized in the example

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator mentions "my lesson on Prim's algorithm, which is a different, slightly more complicated algorithm for finding minimum spanning trees."

Contrast
Explanation

The video contrasts Kruskal's algorithm with Prim's algorithm as another method for finding minimum spanning trees.

Find an answer · 17

What kind of graph does Kruskal's algorithm act on and what object does it produce?

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    The opening sentence names Kruskal's algorithm and minimum spanning tree.

  2. Audio
    Observation

    The narrator repeats the same statement.

Knowledge points
  1. Scope of Kruskal's algorithm

Why does Kruskal's algorithm stop after selecting n-1 edges?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator explains the n-1 edge count and the stopping condition.

  2. Caption evidence
    Observation

    The later written step 4 uses n-1 edges as the termination criterion.

Knowledge points
  1. Edge count of a spanning tree
  2. Stopping criterion for Kruskal's algorithm
  3. Kruskal step 4: repeat until n-1 edges are selected

What are the four steps of Kruskal's algorithm as written in the video?

Clear evidence
Shown in the video
Evidence
  1. Caption evidence
    Observation

    The four handwritten algorithm steps are fully visible.

  2. Audio
    Observation

    The narrator reads and explains each step in order.

Knowledge points
  1. Kruskal step 1: choose a minimum-weight edge
  2. Kruskal step 2: choose the next minimum-weight remaining edge
  3. Kruskal step 3: add minimum-weight edge only if it avoids a cycle
  4. Kruskal step 4: repeat until n-1 edges are selected

Why does the algorithm only mention avoiding cycles beginning with step 3?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says that after two edges, any additional edge could create a cycle.

  2. Caption evidence
    Observation

    Step 3 contains the no-cycle condition.

Knowledge points
  1. Kruskal step 3: add minimum-weight edge only if it avoids a cycle
  2. Why cycle checking begins at step 3

What example graph is introduced for applying Kruskal's algorithm?

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A five-vertex weighted graph is shown with vertices u, v, w, x, y.

  2. Audio
    Observation

    The narrator introduces it as the graph on which to run the algorithm.

Uncertainties
  1. The worked solution is not completed in this clip.

Knowledge points
  1. Example graph introduced for Kruskal's algorithm
  2. Transition from abstract algorithm to worked example

Does a spanning tree have to include every vertex of the original graph?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The narrator says a spanning tree by definition contains all the vertices of the original graph.

Knowledge points
  1. Spanning tree must contain all vertices

What does step 3 of Kruskal's algorithm add compared with step 2?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Step 3 is written explicitly on the board.

  2. Audio
    Observation

    The speaker explains that now we have to only consider edges that will not produce a cycle.

Knowledge points
  1. Kruskal's algorithm procedure shown on the board

Why does the algorithm stop after n-1 edges?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board shows Repeat 3 until n-1 edges have been selected.

  2. Audio
    Observation

    The speaker says one less edge than we have vertices because at that point we will have completed our spanning tree.

Knowledge points
  1. A spanning tree on n vertices has n-1 edges
  2. Stopping condition for the algorithm

Why is the weight-4 edge uw rejected while ux is selected?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says we can't pick the edge joining u and w because that would create a cycle.

  2. Animation
    Observation

    The edge uw is indicated and then the edge ux is chosen instead.

Knowledge points
  1. Kruskal's algorithm procedure shown on the board
  2. Assuming equal minimum weight means either edge is always valid

Why can the second minimum-weight edge be chosen without checking for a cycle?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    The speaker says it is impossible to create a cycle with just two edges.

Knowledge points
  1. Two selected edges cannot form a cycle in this demonstration

What are the steps of Kruskal's algorithm for finding a minimum spanning tree?

Clear evidence
Supplementary explanation
Evidence
  1. Formula
    Observation

    The full algorithm text is displayed on screen.

Knowledge points
  1. Kruskal's algorithm for a minimum spanning tree
  2. Stopping rule for Kruskal's algorithm

Why does Kruskal's algorithm stop after selecting n-1 edges?

Clear evidence
Supplementary explanation
Evidence
  1. Formula
    Observation

    The screen shows "Repeat 3. until n-1 edges have been selected" and the example writes 5−1=45-1=4.

Knowledge points
  1. Stopping rule for Kruskal's algorithm
Coverage and review notes

Covered · Opening statement identifies Kruskal's algorithm as finding a minimum spanning tree in a connected weighted graph.

Covered · The setup introduces G, n, and T, and explains that a spanning tree on n vertices has n-1 edges, giving the stopping count.

Covered · Step 1 is written and explained: select an edge of minimum weight, with ties allowed.

Covered · Step 2 is written and explained: select another remaining edge of minimum weight.

Covered · Step 3 adds the no-cycle condition and the narrator explains why cycles must be avoided.

Covered · Step 4 says to repeat step 3 until n-1 edges have been selected, producing a minimum spanning tree.

Covered · A concrete five-vertex weighted example graph is introduced, with the algorithm pasted above and isolated vertices on the right; the clip ends before any edge selection is performed.

Covered · The board layout, weighted graph, duplicated vertices, and the four written algorithm steps are introduced.

Covered · Step 1 is applied and the edge uv of weight 1 is selected and drawn on the right.

Covered · Step 2 is applied; the edge yx of weight 2 is selected, with the explanation that two edges cannot yet form a cycle.

Covered · Step 3 is introduced and applied to select wv of weight 3 after checking that it does not create a cycle.

Covered · The stopping condition n-1 is emphasized and specialized to 5−1=45-1=4 for this graph.

Covered · Among the remaining weight-4 edges, uw is rejected for creating a cycle and ux is selected as the fourth edge.

Covered · Opening states the n-1 stopping condition and identifies the first example's output as a minimum spanning tree.

Covered · Defines W(T)W(T) and computes the first example's tree weight as 10.

Covered · States that no other spanning tree of the first graph has smaller weight.

Covered · Introduces a second graph and invites the viewer to apply the same algorithm.

Covered · Gives the second example's minimum spanning tree weight as 21.

Covered · Explains that tied minimum-weight choices can yield different trees, but not for this example graph.

Covered · Restates the algorithm formally and says the correctness proof is deferred to a later video.

Covered · Mentions Prim's algorithm as a different method for minimum spanning trees.

Covered · Outro music and end-card visuals with no additional mathematical content.

Explore the knowledge in this video

Open video knowledge graph →

  • Graphs Application
    Why this connection?

    Reviewed English material v1: knowledge_item "Scope of Kruskal's algorithm" at 0:00 — The video defines the setting for Kruskal's algorithm as a connected weighted graph, and states that the algorithm's output is a minimum spanning tree for that graph.