Kruskal’s Algorithm for Finding Minimal Spanning Trees Flashcards

1
Q

What is the goal of Kruskal’s Algorithm?

A

To find a minimum spanning tree (MST) in a weighted undirected graph.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a minimum spanning tree (MST)?

A

A tree that connects all vertices in a graph with the minimum total edge weight and no cycles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What data structure does Kruskal’s Algorithm use?

A

Union-Find (Disjoint Set Union) data structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the initial state in Kruskal’s Algorithm?

A

A forest of isolated nodes (each node is its own tree).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the main step in Kruskal’s Algorithm?

A

Add the next smallest edge if it connects two different trees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When do you skip an edge in Kruskal’s Algorithm?

A

When it connects vertices that are already in the same tree (would form a cycle).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are edges processed in Kruskal’s Algorithm?

A

Edges are sorted in ascending order of weights and processed in that order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the time complexity of edge sorting?

A

O(E log E), where E is the number of edges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the efficient time complexity of Kruskal’s Algorithm?

A

O(E log E + E * α(V)), where α(V) is the inverse Ackermann function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the naive time complexity of Kruskal’s Algorithm?

A

O(EV + E log E), due to inefficient union-find operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is α(V) in the context of Kruskal’s Algorithm?

A

The inverse Ackermann function, a very slowly growing function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When does Kruskal’s Algorithm stop?

A

When the MST has n - 1 edges, where n is the number of vertices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of the Union-Find data structure?

A

To efficiently track and merge disjoint sets (trees) in the forest.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What operations does Union-Find support?

A

FIND (find the root of a set) and UNION (merge two sets).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is Kruskal’s Algorithm considered greedy?

A

Because it always chooses the smallest edge that doesn’t form a cycle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly