Skip to content

Fix #1095: MinimumDominatingSet/i32 to MinimumSetCovering/i32 - #1104

Open
isPANN wants to merge 4 commits into
1075-growth-domainfrom
issue-1095
Open

Fix #1095: MinimumDominatingSet/i32 to MinimumSetCovering/i32#1104
isPANN wants to merge 4 commits into
1075-growth-domainfrom
issue-1095

Conversation

@isPANN

@isPANN isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the weighted closed-neighborhood reduction from Minimum Dominating Set to Minimum Set Covering.

Fixes #1095

@isPANN

isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Implementation Summary

Changes

  • Added MinimumDominatingSet<SimpleGraph, i32> -> MinimumSetCovering<i32> using one deduplicated closed-neighborhood set per vertex, copied signed weights, identity witness extraction, and exact target-size metadata.
  • Added focused closed-loop, structure, signed-weight, empty/isolated, and self-loop/parallel-edge tests.
  • Added the canonical weighted path example to the example database and documented the reduction with a fixture-backed worked example and references.
  • Updated the topology expectation for the newly dominated direct MinimumDominatingSet -> ILP path.

Verification

  • Mathematical constructor: 93,254 checks, 0 failures.
  • Independent adversary: 170,347 checks, 0 failures; two Hypothesis strategies.
  • Cross-comparison: 1,103 targets / 33,867 configurations, 0 disagreements.
  • make paper, make test, make clippy, and make coverage passed.
  • Coverage: 97.49% lines, 97.89% regions.

Deviations from Plan

  • Added the topology expectation update after the full suite showed that the new two-step route dominates the pre-existing direct ILP edge.
  • The PR is stacked on 1075-growth-domain at requested base commit a9067297 instead of main.

Open Questions

  • None.

@isPANN

isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Agentic Review Report

Structural Check

Structural Completeness

Check Status
Rule file, #[reduction(...)], ReductionResult, and ReduceTo PASS
Test link and dedicated test file PASS
Closed-loop test and focused edge-case tests PASS
Registration in rules/mod.rs PASS
Canonical rule example and example-db coverage PASS
Paper reduction-rule entry PASS
Blacklisted generated files absent PASS

Build Status

  • make test: PASS — 5,436 library tests, 75 integration tests, 330 CLI tests, 17 pred_sym tests, 26 macro tests, 151 crate doc-tests, and 2 macro doc-tests passed with zero failures.
  • make clippy: PASS — all targets with ilp-highs and -D warnings.
  • git diff --check: PASS.

Semantic Review

  • Construction: PASS — creates one sorted, deduplicated closed-neighborhood set per source vertex and copies weights coordinate-for-coordinate.
  • Correctness: PASS — selecting source vertices dominates exactly when the corresponding target sets cover the universe; copied signed weights preserve every configuration's objective.
  • Extraction: PASS — the identity map is correct because target set D_v and source vertex v share a coordinate.
  • Overhead: PASS — exact target dimensions are universe_size = n and num_sets = n, including n = 0.
  • Worked trace: PASS — on P5, [0,1,0,1,0] selects D_1 ∪ D_3 = V, has cost 2, and extracts to dominating set {1,3}.
  • Edge cases: PASS — empty graphs, isolated vertices, signed weights, self-loops, and repeated edges are covered.
  • Paper proof and example: PASS — construction, both feasibility directions, objective preservation, identity extraction, commands, and the canonical witness are sound.

Issue Compliance

All 6 checks pass: source/target variants, construction, extraction, correctness, overhead expressions, and the weighted-path example match issue #1095.

Structural summary: 12/12 structural checks and 6/6 issue-compliance checks passed; no FAIL or ISSUE findings.


Quality Check

Design Principles

  • DRY: OK — reuses MinimumDominatingSet::closed_neighborhood and the shared optimization round-trip helper.
  • KISS: OK — direct one-pass construction plus identity extraction, without unnecessary abstraction or branching.
  • High cohesion / low coupling: OK — construction, extraction, example registration, and tests remain in their established narrow modules.
  • HCI: Not applicable — the actual six-file stacked diff contains no CLI or MCP changes.

Test Quality

The suite has strong value-level coverage: exact nontrivial target structure and optimal extraction, signed weights, empty and isolated graphs, and adversarial self-loop/repeated-edge input.

Important — missing explicit infeasible-configuration preservation test. The shared round-trip helper enumerates optimal target witnesses and verifies their extracted source solutions, but it does not directly evaluate a known infeasible source configuration and the identical target configuration. Add a semantic assertion such as selecting only an endpoint of P5, verifying that it is both non-dominating and non-covering.

Quality Summary

  • Critical: none.
  • Important: one test-coverage finding above.
  • Minor: none.

Agentic Feature Tests

Feature: MinimumDominatingSet<SimpleGraph, i32> → MinimumSetCovering<i32>
Profile: ephemeral downstream CLI user
Verdict: PASS
Critical issues: 0
Repository modifications: none

Area Result
Catalog discovery with pred list / pred show PASS
Source build/setup PASS
Canonical example creation PASS
Source solve/evaluate PASS
Reduction construction PASS
Independent target solve/evaluate PASS
Bundle round trip and extraction PASS
Signed-weight behavior PASS
Coordinate and objective preservation PASS

The canonical weighted P5 flow produced the expected target sets and [0,1,0,1,0] witness with Min(2). The source, independently solved target, and extracted bundle agreed. A signed-weight path with weights [-5,10,-7] also agreed across source, target, and bundle at [1,0,1] with Min(-12). Both brute-force and the paper-documented default ILP flow passed.

No candidate agentic finding required reproduction; there were no confirmed agentic issues.


Generated by review-pipeline

- test preservation of an infeasible endpoint-only configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant