Skip to content

Fix #1096: MinimumDominatingSet/One to MinimumHittingSet - #1105

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

Fix #1096: MinimumDominatingSet/One to MinimumHittingSet#1105
isPANN wants to merge 4 commits into
1075-growth-domainfrom
issue-1096

Conversation

@isPANN

@isPANN isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implement the unit-weight Minimum Dominating Set to Minimum Hitting Set reduction by mapping graph vertices to universe elements and closed neighborhoods to target sets.

This is a stacked PR based on 1075-growth-domain at a9067297 as requested.

Fixes #1096

@isPANN

isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Implementation Summary

Changes

  • Added MinimumDominatingSet<SimpleGraph, One> -> MinimumHittingSet as a witness-preserving reduction using one closed-neighborhood target set per source vertex.
  • Registered exact overhead metadata: universe_size = num_vertices and num_sets = num_vertices, with identity solution extraction.
  • Added a canonical five-vertex path example and seven focused tests, including exhaustive equivalence over every simple graph and configuration through four vertices.
  • Added a fixture-driven paper theorem and tutorial example, supported by the direct Bannach--Tantau STACS 2018 citation.

Verification

  • Independent mathematical verification: constructor 92,121 checks; adversary 102,469 checks; 1,100-instance cross-comparison with 0 disagreements.
  • make fmt-check, make clippy, make test, and make paper pass.
  • Coverage: 96.19% lines, 95.43% functions, 95.89% regions.

Deviations from Plan

  • The pipeline's model guard parsed MinimumDominatingSet/One as a literal model name and reported a false negative. The catalog and source declaration confirm MinimumDominatingSet<SimpleGraph, One> exists, and the issue's completed quality check independently confirms both endpoints.
  • Both optimization models are feasible for every instance, so mathematical verification used an infeasible candidate witness instead of a nonexistent infeasible problem instance.
  • This base commit does not provide the newer make regenerate-fixtures target; the equivalent cargo run --features example-db --example export_examples command generated the fixture.
  • Per maintainer direction, this is a stacked PR based on 1075-growth-domain at a9067297.

Open Questions

  • The PR should remain based on 1075-growth-domain until that dependency is merged or otherwise integrated.

@isPANN

isPANN commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Review pipeline report

Reviewed the PR-specific five-file delta (a9067297..177b561fe462a219fc7aa1c87708408eb8d9f6b8) rather than inherited changes from the stacked base.

Structural and mathematical review

  • 12/12 structural checks passed. The rule implementation, ReductionResult, ReduceTo, registration, canonical rule example, tests, and paper entry are all present.
  • 6/6 issue-compliance checks passed. The implementation maps vertices to the hitting-set universe, closed neighborhoods to sets, and extracts the same indicator vector.
  • The equivalence is sound: a selected vertex set dominates every vertex iff it intersects every closed neighborhood. Feasibility and cardinality are preserved.
  • Overhead metadata is exact: universe_size = num_vertices and num_sets = num_vertices.
  • Empty, isolated, disconnected, star, complete, and exhaustive simple graphs through four vertices are covered.
  • No blacklisted generated files occur in the scoped delta.

Quality review

  • DRY, KISS, cohesion/coupling, module placement, and test quality: OK.
  • Tests assert the exact transformed structure, identity extraction, boundary cases, and exhaustive semantic equivalence rather than only construction success.
  • No critical, important, or minor code-quality findings.

Agentic feature review

The intended unit-weight CLI path passes end to end:

  • exact variant and direct reduction discovery: PASS
  • canonical rule example (pred create --example MinimumDominatingSet/SimpleGraph/One --to MinimumHittingSet): PASS
  • source solve, direct reduction, target solve, source extraction, and evaluation: PASS
  • semantic witness check on the five-vertex path: PASS; optimum Min(2) is preserved
  • repository cleanliness: PASS

Important finding

  1. [Medium] pred inspect advertises an unavailable reduction for the default weighted variant.

    After this unit-weight edge is registered, creating the default MinimumDominatingSet example yields a SimpleGraph/i32 instance. pred inspect lists MinimumHittingSet in reduces_to, but attempting that advertised operation fails:

    $ pred reduce default.json --to MinimumHittingSet -o bundle.json
    Error: No witness-capable reduction path from MinimumDominatingSet to MinimumHittingSet

    This contradiction does not appear at the base SHA because the new edge is absent there. The underlying cause appears to be name-level aggregation in inspect, which includes an edge belonging only to MinimumDominatingSet/SimpleGraph/One while inspecting an i32 instance. Exact unit-weight discovery and reduction work correctly.

The unavailable standalone model-example command for the exact One variant was also checked against the base SHA and is pre-existing; the documented canonical rule example form with --to MinimumHittingSet is added by this PR and works.

Verification

  • make test: PASS — 5,438 library tests, 75 integration tests, 161 CLI unit tests, 330 CLI integration tests, 17 pred-sym tests, 26 macro tests, 151 library doctests, and 2 macro doctests.
  • make clippy: PASS — all targets with ilp-highs, warnings denied.

Overall: the reduction itself is structurally complete, mathematically correct, well tested, and issue-compliant. One medium CLI discovery/metadata inconsistency should be addressed before merge.

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