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/3_Gold/Gold_MST.md

34 lines
1.5 KiB
Markdown
Raw Normal View History

2020-06-03 20:56:04 +00:00
# Gold - Minimum Spanning Tree
2020-06-03 21:08:42 +00:00
- [Kattis Minimum Spanning Tree](https://open.kattis.com/problems/minspantree)
- [CSES Road Reparation](https://cses.fi/problemset/task/1675)
- equivalent to above
2020-06-03 20:56:04 +00:00
## Tutorial
- CPH 15
- Prim's Algorithm
2020-06-03 21:42:26 +00:00
- [cp-algo](https://cp-algorithms.com/graph/mst_prim.html)
2020-06-03 20:56:04 +00:00
- Similar to Dijkstra
- Kruskal's Algorithm
2020-06-03 21:42:26 +00:00
- [cp-algo 1](https://cp-algorithms.com/graph/mst_kruskal.html)
- [cp-algo 2](https://cp-algorithms.com/graph/mst_kruskal_with_dsu.html)
2020-06-03 20:56:04 +00:00
- Requires "Disjoint Set Union" (DSU) data structure
- [CSAcademy Disjoint-Set](https://csacademy.com/lessons)
- DSU Complexity Proofs (optional of course)
- [log\*n](https://en.wikipedia.org/wiki/Proof_of_O(log*n)\_time_complexity\_of_union%E2%80%93find)
- [a(m,n)](https://dl.acm.org/doi/pdf/10.1145/321879.321884)
## USACO Gold Problems
- MST Problems
- [Walk](http://usaco.org/index.php?page=viewproblem2&cpid=946)
- Prim's is applicable, but the edge weights are special so you don't actually need to use an MST algo ...
- [Fencedin](http://www.usaco.org/index.php?page=viewproblem2&cpid=623)
- also special ...
- DSU Problems
- [Mootube](http://www.usaco.org/index.php?page=viewproblem2&cpid=789)
2020-06-03 21:08:42 +00:00
- same as [CSES Road Construction](https://cses.fi/problemset/task/1676)
2020-06-03 20:56:04 +00:00
- [Closing the Farm](http://www.usaco.org/index.php?page=viewproblem2&cpid=646)
- [Favorite Colors](http://www.usaco.org/index.php?page=viewproblem2&cpid=1042)
- fairly tricky