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/5_Gold/MST.mdx
Benjamin Qi 569b14ff01 freqs
2020-06-26 14:00:32 -04:00

51 lines
No EOL
1.7 KiB
Text

---
id: mst
title: "Minimum Spanning Trees"
author: Benjamin Qi
prerequisites:
- Gold - Shortest Paths
- 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"], ""),
new Problem("Gold", "Walk", "946", "Easy", false, ["Math","Prim"], ""),
new Problem("Gold", "Fencedin", "623", "Easy", false, ["MST"], ""),
new Problem("Plat", "Fencedin", "625", "Normal", false, ["Kruskal"], ""),
],
}
};
## Sample
<problems-list problems={metadata.problems.standard} />
## Tutorial
- CPH 15 (Spanning Trees)
- [PAPS 12.4](https://www.csc.kth.se/~jsannemo/slask/main.pdf)
- Prim's Algorithm
- [cp-algo](https://cp-algorithms.com/graph/mst_prim.html)
- Similar to Dijkstra
- Kruskal's Algorithm
- [cp-algo 1](https://cp-algorithms.com/graph/mst_kruskal.html)
- [cp-algo 2](https://cp-algorithms.com/graph/mst_kruskal_with_dsu.html)
## USACO Gold Problems
<problems-list problems={metadata.problems.general} />
## Other Problems
- [Birthday Gifts](https://www.hackerearth.com/practice/math/combinatorics/inclusion-exclusion/practice-problems/algorithm/mancunian-and-birthday-gifts-d44faa15/) [](73)
- [Spanning Tree Fraction](https://www.hackerrank.com/contests/w31/challenges/spanning-tree-fraction) [](78)