Minimum Spanning Trees: Problem Definition
Minimum Spanning Trees: Problem Definition
Spanning Trees
Problem Definition
Algorithms: Design
and Analysis, Part II
Overview
Informal Goal: Connect a bunch of points together as cheaply as
possible.
# of vertices
# of edges
Tim Roughgarden
Problem Definition
vertices edges
Input: Undirected graph G = ( V , E ) and a cost ce for each edge
e ∈ E.
- Assume adjacency list representation (see Part I for details)
- OK if edge costs are negative
Output: minimum cost tree T ⊆ E that spans all vertices .
4 2
3
c d
(disallowed) 5
Standing Assumptions
Assumption #1: Input graph G is connected.
- Else no spanning trees.
- Easy to check in preprocessing (e.g., depth-first search).
Tim Roughgarden