Agent skill · Testing & QA

set-covering-problem

When the user wants to solve set covering problems, determine minimum coverage sets, or optimize facility coverage. Also use when the user mentions "set cover," "minimum set cover," "coverage optimization," "facility coverage problem," "service coverage," "location set covering," "maximal covering location problem," or "covering design." For general facility location, see facility-location-problem. For specific applications, see warehouse-location-optimization or hub-location-problem.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill set-covering-problem --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 30 KB
Bundled scripts: none
Path: skills/analysis/set-covering-problem/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

The skill presents a structured framework for solving coverage-based optimization problems. It defines several problem variants (Basic SCP, LSCP, MCLP, Partial Set Covering, Redundant Coverage) and provides the mathematical formulations, decision variables, and objective functions that an agent should implement when solving these problems. It also includes example code blocks showing how to set up and solve SCP and related variants using optimization tooling (e.g., PuLP). The focus is on determining minimum-cost coverage sets, minimizing the number of facilities for full coverage, maximizing covered demand under constraints, accommodating partial or redundant coverage, and applying these models to facility location and service coverage contexts.

Concretely, the agent is instructed to:

  • Identify problem type variants (SCP, LSCP, MCLP, Partial, Redundant) and their goals.
  • Use the given parameters and coverage matrices to formulate the optimization problem.
  • Define decision variables (binary x_j for sets/facilities; y_i for coverage in MCLP as appropriate).
  • Implement objective functions (minimize cost or number of facilities, maximize covered demand).
  • Apply the same coverage constraints across variants (each element must be covered, or constrained by redundancy).
  • For SCP/LSCP, construct the coverage matrix a_{ij} and enforce Σ a_{ij} x_j ≥ 1 for all elements i, or minimize Σ x_j subject to full coverage.
  • Provide example setups, including code sketches for PuLP-based solutions and a downstream example outlining redundant coverage.
  • Outline exact formulations for SCP, LSCP, MCLP, and Redundant Coverage, including definitions of I, J, c_j, a_{ij}, x_j, and y_i, and the corresponding constraints.
  • Outline how to compute additional metrics (e.g., distances to nearest facility) in LSCP/MCLP contexts when coordinates are provided.
  • Remain within the stated scope of solving coverage problems and do not overpromise outcomes.

The skill folds these elements into a cohesive guide for implementing coverage optimization solvers and applying them to facility location and service coverage problems.

How it works

The skill lays out a framework for solving multiple variants of the set covering family. It enumerates problem variants and their goals, followed by a shared mathematical formulation:

  • Basic SCP: choose sets to cover all elements with minimum total cost. Variables: x_j ∈ {0,1}; Objective: Minimize Σ c_j × x_j; Constraints: Σ_{j:a_{ij}=1} x_j ≥ 1 for all i.
  • LSCP: minimize the number of facilities while ensuring every demand point is within a service radius. Coverage matrix a_{ij} = 1 if d_{ij} ≤ S; Objective: Minimize Σ x_j; Constraints: same as SCP.
  • MCLP: maximize weighted covered demand with a cap on facilities. Variables: x_j, y_i ∈ {0,1}; Objective: Maximize Σ w_i × y_i; Constraints: y_i ≤ Σ a_{ij} x_j; Σ x_j ≤ p; binaries.
  • Redundant Coverage (k-Coverage): ensure each element is covered by at least k facilities: Σ a_{ij} x_j ≥ k for all i. Additionally, it provides exact PuLP-based code blocks for solving SCP with and without redundancy, and LSCP/MCLP problem templates, along with example workflows and outputs. The steps include constructing coverage matrices, defining costs, solving with a MILP solver, and extracting selected facilities and coverage details.

When to use it

Use when the user mentions solving set covering problems or coverage-based optimization, and related terms: set cover, minimum set cover, coverage optimization, facility coverage, service coverage, location set covering, maximal covering location problem, or covering design. It also directs when to reference related facility location problems like warehouse-location-optimization or hub-location-problem for general facility location context.

What it can touch

The skill references and uses the following tools and components in its examples:

  • PuLP (Python library) for solving the optimization problems, via PuLP’s LpProblem, LpVariable, and solver invocation (PULP_CBC_CMD).
  • It defines data structures for coverage matrices (binary I x J matrices) and optional coordinate arrays for distance-based coverage (numpy and linear algebra for distance calculations).
  • It includes example code blocks showing how to construct and solve the problems and how to extract results (selected sets, total cost, coverage per element).

Caveats

  • The skill documents complexity notes (e.g., NP-complete for SCP) and provides formulations and example implementations, but actual performance depends on input size and solver efficiency.
  • It relies on exact binary coverage assumptions (a_{ij} ∈ {0,1}) and may not cover probabilistic or fuzzy coverage models.
  • The provided examples assume availability of a MILP solver (e.g., CBC) via PuLP.
From the SKILL.md

# Set Covering Problem You are an expert in set covering problems and coverage-based optimization. Your goal is to help find the minimum cost collection of sets (or facilities) that covers all required elements (or customers), commonly used for facility location, service coverage, and resource allocation problems. ## Initial Assessment Before solving set covering problems, understand: 1. **Problem Type** - Set Covering Problem (SCP)? (cover all elements with minimum cost) - Maximal Covering Location Problem (MCLP)? (maximize covered demand with limited resources) - Location Set Covering Problem (LSCP)? (minimum facilities for full coverage) - Partial Set Covering? (cover a percentage of elements) - Redundant Coverage? (elements covered multiple times) 2. **Coverage Requirements** - Must cover all elements? (100% coverage) - Partial coverage acceptable? (e.g., 95%) - Coverage distance/time threshold? - Redundancy requirements? (backup coverage) - Quality of coverage (single vs. multiple cover)? 3. **Elements to Cover** - What needs to be covered? (customers, demand points, areas) - How many elements? - Weights/priorities for elements? - Geographic locations? - Time-dependent coverag

What's inside
Steps it walks through
  1. Initial Assessment
  2. Set Covering Problem Framework
  3. Problem Variants
  4. Mathematical Formulations
  5. Basic Set Covering Problem (SCP)
  6. Location Set Covering Problem (LSCP)
  7. Maximal Covering Location Problem (MCLP)
  8. Redundant Coverage (k-Coverage)
  9. Exact Solution Methods
  10. 1. Set Covering Problem with PuLP
  11. 2. Location Set Covering Problem (LSCP)
  12. 3. Maximal Covering Location Problem (MCLP)
  13. Greedy Heuristics
  14. 1. Greedy Set Covering
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the set-covering-problem skill do?

When the user wants to solve set covering problems, determine minimum coverage sets, or optimize facility coverage. Also use when the user mentions "set cover," "minimum set cover," "coverage optimization," "facility coverage problem," "service coverage," "location set covering," "maximal covering location problem," or "covering design." For general facility location, see facility-location-problem. For specific applications, see warehouse-location-optimization or hub-location-problem.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill set-covering-problem --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going