Fix #441: Add MinimumExternalMacroDataCompression model#819
Conversation
Implement the Minimum External Macro Data Compression problem (Garey & Johnson SR22). Given an alphabet, string, and pointer cost, find a dictionary D and compressed string C minimizing total compression cost. - Model with Min<usize> value type, pointer-free D restriction - CLI create support with --string, --pointer-cost flags - 13 unit tests covering creation, evaluation, brute force, serialization - Canonical example in example-db - Paper entry with problem definition and visualization - Bibliography entries for Storer (1977), Storer & Szymanski (1982), Charikar et al. (2005) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #819 +/- ##
========================================
Coverage 97.88% 97.89%
========================================
Files 647 651 +4
Lines 70940 71463 +523
========================================
+ Hits 69443 69959 +516
- Misses 1497 1504 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agentic Review ReportStructural CheckStructural Review: model MinimumExternalMacroDataCompressionStructural Completeness
Build Status
Semantic Review
Issue Compliance (if linked issue found)
Summary
Quality CheckQuality ReviewDesign Principles
HCI (CLI changed)
Test Quality
IssuesCritical (Must Fix)
Important (Should Fix)
Minor (Nice to Have)
Summary
Agentic Feature TestsFeature Test Report: problem-reductionsDate: 2026-03-29 Summary
Per-Feature DetailsMinimumExternalMacroDataCompression
Expected vs Actual Outcome
Issues Found
Suggestions
Generated by review-pipeline |
|
On Hold: Canonical example (s="ab", h=2) only demonstrates the uncompressed optimum — it doesn't showcase the core compression behavior (pointers into dictionary). Need to find a better example where compression actually helps, either by:
Also investigate: can this problem be solved by ILP? If yes, implement the direct ILP rule alongside the model. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nonical example - Implement ILP reduction using segment-flow formulation with dictionary one-hot, contiguity, flow conservation, and pointer matching constraints - Update canonical example to issue #441's compression-demonstrating instance (s="abcdefabcdefabcdef", h=2, optimal=12 via dictionary+pointers) - Update paper figure to show compression with D="abcdef" and 3 pointers - 7 ILP reduction tests + 13 model tests all pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Segment-flow ILP formulation with dictionary one-hot, contiguity, flow conservation, and pointer matching constraints. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts: keep both MinimumExternalMacroDataCompression (PR) and all main additions (IntExpr, IntegerExpressionMembership, KthLargestMTuple, RegisterSufficiency, SchedulingToMinimizeWeightedCompletionTime, FeasibleBasisExtension, QuadraticDiophantineEquations) in imports, specs, CLI args, and references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Value = Min<usize>, minimizing compression cost |D| + |C| + (h-1) * pointer count--string,--pointer-costflagsFixes #441
Test plan
🤖 Generated with Claude Code