Skip to content

design: minimum-aberration generator selection — fractional factorials reach textbook resolution - #40

Open
ChrisW09 wants to merge 1 commit into
mainfrom
fix/fractional-resolution
Open

design: minimum-aberration generator selection — fractional factorials reach textbook resolution#40
ChrisW09 wants to merge 1 commit into
mainfrom
fix/fractional-resolution

Conversation

@ChrisW09

Copy link
Copy Markdown
Collaborator

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)):

  1. Exhaustive minimum-aberration search when 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-p case, i.e. all the designs where resolution > IV is achievable (2^(5-1)_V, 2^(6-1)_VI, 2^(8-2)_V, …).
  2. All-odd-size subsets otherwise: every defining word (odd subset + one added letter, and all XORs) has even length ≥ 4 — the classical guaranteed resolution-IV construction.
  3. Largest-first greedy only when a heavily saturated design exhausts the odd pool (resolution III is unavoidable there).

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:

k= 6 runs= 16  res=4 (max 4) | k= 7 runs= 16  res=4 (max 4) | k= 8 runs= 16  res=4 (max 4)
k= 5 runs= 16  res=5 (max 5) | k= 8 runs= 64  res=5 (max 5) | k= 7 runs= 64  res=7 (max 7)
k= 9 runs= 32  res=4 (max 4) | k=15 runs= 16  res=3 (max 3) | ...

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

…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>
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.

design: greedy fractional-factorial generator selection yields resolution III where IV exists, contradicting "resolution-maximizing" docs

1 participant