Expand description
Set cover, weighted set cover, vertex cover, and hitting set algorithms.
- Greedy log-approximation for (weighted) set cover
- 2-approximation vertex cover via maximal matching
- König’s theorem exact minimum vertex cover for bipartite graphs
- Greedy hitting set
Functions§
- greedy_
set_ cover - Greedy set cover (unweighted): at each step, pick the set that covers the
most uncovered elements of
universe. - hitting_
set - Greedy hitting set: find a small set H ⊆ {0..universe-1} such that every input set contains at least one element of H.
- min_
vertex_ cover_ bip - Exact minimum vertex cover for a bipartite graph via König’s theorem.
- vertex_
cover_ 2approx - 2-approximation vertex cover via maximal matching.
- weighted_
set_ cover - Greedy weighted set cover: at each step, pick the set with the lowest cost per newly-covered element.
Type Aliases§
- Covering
Result - Result type for covering operations.