design: minimum-aberration generator selection — fractional factorials reach textbook resolution - #40
Open
ChrisW09 wants to merge 1 commit into
Open
design: minimum-aberration generator selection — fractional factorials reach textbook resolution#40ChrisW09 wants to merge 1 commit into
ChrisW09 wants to merge 1 commit into
Conversation
…edily The greedy 'largest subsets first' assignment produced sub-maximal resolution for the most common screening shapes: mixing one size-b generator with size-(b-1) ones creates short words via XOR, giving resolution III for 2^(6-2), 2^(7-3), 2^(8-4) (the k=8 default), and 2^(7-2) — all of which have standard resolution-IV designs. The docs promise 'resolution-maximizing' generators. Generator subsets are now chosen by: - exhaustive minimum-aberration search (lexicographically fewest short defining words, which maximizes resolution) over a bitmask XOR-closure whenever the search space is small enough — covers every small-p case where resolution > IV is achievable; - otherwise the classical all-odd-size-subsets construction, whose defining words are all even length >= 4: guaranteed resolution IV; - largest-first only for heavily saturated designs (more added factors than odd subsets), where resolution III is unavoidable anyway. Verified against the standard maximum-resolution tables for every (k <= 15, runs in 8/16/32/64) combination; all under 30 ms. Fixes #10 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10.
The greedy "largest subsets first" generator assignment created short defining words via XOR (e.g.
ABCDE ⊕ ABCF = DEF), yielding resolution III for 2^(6-2), 2^(7-3), 2^(7-2), and the default 2^(8-4) — all of which have standard resolution-IV designs — despite the module docs promising resolution-maximizing generators.Approach (the word-length pattern depends only on the set of generator subsets, so the search is over
combinations(pool, p)):C(|pool|, p) · 2^p ≤ 600k: the XOR-closure of the generator words is computed with int bitmasks in gray-code order and candidates compared by word-length counts (lexicographically fewest short words — which maximizes resolution as a corollary). This covers every small-pcase, i.e. all the designs where resolution > IV is achievable (2^(5-1)_V, 2^(6-1)_VI, 2^(8-2)_V, …).Verified against the standard maximum-resolution tables (Montgomery Table 8.14 / NIST) for every combination of k ≤ 15 and runs ∈ {8, 16, 32, 64} where a fraction exists — all match exactly, configs stay unique, and the slowest case takes ~30 ms:
The two existing tests (saturated k=7 → III, half-fraction k=5 → V) still pass; a new test pins six representative designs against the tables.
Test: full cafe-core suite — 109 passed (1 pre-existing failure = #4, fix in PR #34).
🤖 Generated with Claude Code