Algorithms - shivamvats/notes GitHub Wiki
- Positive weights, infinite graph: Dijkstra, A*, etc
- Negative weights, loop-free, finite graph: Bellman-Ford
- Negative weights, loopy/infinite graph: Not solvable
- All pairs: Floyd-Warshall
Given a collection C of subsets of {1,...,n} and weights corresponding to each subset, find a collection of subsets that covers {1,...,n} and incurs the minimum cost. details1
- Greed Approach: Choose a subset that minimizes the cost per element (considering only the uncovered elements). This is ln(k) x OPT in the worst-case, where k is the size of the largest subset.