This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/4_Gold/MST.mdx
Benjamin Qi 088d0260e1 Gold
2020-07-18 20:22:28 -04:00

52 lines
1.8 KiB
Text

---
id: mst
title: "Minimum Spanning Trees"
author: Benjamin Qi
prerequisites:
- Gold - Shortest Paths with Non-Negative Edge Weights
- Gold - Disjoint Set Union
description: "A subset of the edges of a connected, undirected, edge-weighted graph that connects all the vertices to each other of minimum total weight, where no cycles are allowed."
frequency: 2
---
import { Problem } from "../models";
export const metadata = {
problems: {
standard: [
new Problem("Kattis", "MST", "minspantree", "Easy", false, ["MST"], ""),
new Problem("CSES", "Road Reparation", "1675", "Easy", false, ["MST"], ""),
],
general: [
new Problem("Old Silver", "SuperBull", "531", "Easy", false, ["MST", "Prim"], "Prim's is recommended; Kruskal's algorithm might TLE"),
new Problem("Gold", "Fencedin", "623", "Easy", false, ["MST"], ""),
new Problem("Gold", "Walk", "946", "Normal", false, ["Math", "Prim"], ""),
new Problem("HR", "Spanning Tree Fraction", "https://www.hackerrank.com/contests/w31/challenges/spanning-tree-fraction/problem", "Normal", false, ["MST", "Binary Search"], ""),
new Problem("Plat", "Fencedin", "625", "Hard", false, ["Kruskal"], ""),
],
}
};
<Problems problems={metadata.problems.standard} />
## Resources
<Resources>
<Resource source="CPH" title="15 - Spanning Trees" starred>Kruskal's & Prim's</Resource>
<Resource source="PAPS" title="12.4">Kruskal's</Resource>
<Resource source="cp-algo" title="Prim's" url="graph/mst_prim.html"></Resource>
<Resource source="cp-algo" title="Kruskal's" url="graph/mst_kruskal.html"></Resource>
<Resource source="cp-algo" title="Kruskal's with DSU" url="graph/mst_kruskal_with_dsu.html"></Resource>
</Resources>
## Implementation
### Kruskal's
### Prim's
## USACO Problems
<Problems problems={metadata.problems.general} />