Steiner Systems
A Steiner system S(t, k, v) is a collection of k -element subsets (called blocks) of a v -element set V such that every t -element subset of V is contained in exactly one block. Determine necessary...
Problem Statement
This archive keeps the full statement, math, and original media on the page.
Define $M(n)$ to be the minimum number of matchsticks needed to represent the number $n$.
A number can be represented in digit form or as an expression involving addition and/or multiplication. Also order of operations must be followed, that is multiplication binding tighter than addition. Any other symbols or operations, such as brackets, subtraction, division or exponentiation, are not allowed.
The valid digits and symbols are shown below:

For example, $28$ needs $12$ matchsticks to represent it in digit form but representing is as $4 \time 7$ would only need $9$ matchsticks and as there is no way using fewer matchsticks $M(28) = 9$.
Define $T(n) = \sum_{n = 1}^{N} M(n)$. You are given $T(100) = 916$.
Find $T(10^6)$.
Problem 893: Steiner Systems
Mathematical Foundation
Theorem 1 (Divisibility Conditions). If a Steiner system exists, then for each :
In particular, the number of blocks is and each point lies in exactly blocks, both of which must be positive integers.
Proof. Fix any -element subset . Count the number of blocks containing : each such block contributes of the -subsets of that contain , and there are such -subsets in total. Since each is covered exactly once, the number of blocks through is , which must be a positive integer. Setting gives and gives .
Theorem 2 (Fisher’s Inequality). For any Steiner system with , the number of blocks satisfies .
Proof. Consider the point-block incidence matrix (where iff point ). The matrix is with diagonal entries and off-diagonal entries (the number of blocks through any given pair, for ). We can write , where is the all-ones matrix. The eigenvalues of are (with eigenvector ) and (with multiplicity ). Since for nontrivial systems, is positive definite, so , which forces .
Theorem 3 (Steiner Triple Systems). A Steiner triple system exists if and only if or .
Proof. (Necessity) From Theorem 1 with : must be a positive integer, requiring . With : must be a positive integer, requiring odd. Together, or .
(Sufficiency) This was proved by Kirkman (1847) via direct constructions. For , one uses cyclic difference methods. For , recursive constructions (e.g., Bose’s method) apply.
Lemma (Parameter Verification for Notable Systems). The following Steiner systems exist with the stated parameters:
| System | |||||
|---|---|---|---|---|---|
| Fano plane | 7 | 3 | 2 | 7 | 3 |
| 8 | 4 | 3 | 14 | 7 | |
| 11 | 5 | 4 | 66 | 30 | |
| Small Witt | 12 | 6 | 5 | 132 | 66 |
| Large Witt | 24 | 8 | 5 | 759 | 253 |
Proof. For each row, verify and yield the stated integers. Existence is established by explicit construction (e.g., the Fano plane from the projective plane of order 2; the Witt designs from the Mathieu groups and ).
Editorial
S(t,k,v): every t-subset in exactly one k-block. We verify divisibility conditions for S(t, k, v). We then check every t-subset appears in exactly one block. Finally, iterate over each block B in blocks.
Pseudocode
Verify divisibility conditions for S(t, k, v)
Check every t-subset appears in exactly one block
for each block B in blocks
if T is a subset of B
Complexity Analysis
- Time (checking necessary conditions): arithmetic operations on numbers of size .
- Space (checking necessary conditions): .
- Time (verifying a system): , dominated by iterating over all -subsets and all blocks.
- Space (verifying a system): if using a hash set for coverage tracking.
Answer
Code
Each problem page includes the exact C++ and Python source files from the local archive.
/*
* Problem 893: Steiner Systems
* S(t,k,v): every t-subset in exactly one k-block.
* b = C(v,t)/C(k,t), r = C(v-1,t-1)/C(k-1,t-1).
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll comb_val(int n, int r) {
if (r < 0 || r > n) return 0;
if (r > n - r) r = n - r;
ll result = 1;
for (int i = 0; i < r; i++) result = result * (n - i) / (i + 1);
return result;
}
bool check_necessary(int t, int k, int v) {
for (int i = 0; i <= t; i++) {
ll num = comb_val(v - i, t - i);
ll den = comb_val(k - i, t - i);
if (den == 0 || num % den != 0) return false;
}
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout << "=== Steiner System Parameters ===" << endl;
vector<tuple<int,int,int>> systems = {{2,3,7},{2,3,9},{3,4,8},{4,5,11},{5,6,12},{5,8,24}};
for (auto [t,k,v] : systems) {
ll b = comb_val(v,t) / comb_val(k,t);
ll r = comb_val(v-1,t-1) / comb_val(k-1,t-1);
cout << "S(" << t << "," << k << "," << v << "): b=" << b << ", r=" << r << endl;
}
cout << "\n=== Steiner Triple Systems ===" << endl;
for (int v = 3; v < 50; v++)
if (check_necessary(2, 3, v))
cout << "v=" << v << ": b=" << comb_val(v,2)/3 << endl;
cout << "\nAnswer: S(5,8,24) has b=" << comb_val(24,5)/comb_val(8,5) << " blocks" << endl;
return 0;
}
"""
Problem 893: Steiner Systems
S(t,k,v): every t-subset in exactly one k-block.
"""
from math import comb
from itertools import combinations
def steiner_params(t, k, v):
"""Compute b (blocks) and r (replication) for S(t,k,v)."""
b_num = comb(v, t)
b_den = comb(k, t)
if b_den == 0 or b_num % b_den != 0:
return None, None
b = b_num // b_den
r_num = comb(v - 1, t - 1)
r_den = comb(k - 1, t - 1)
if r_den == 0 or r_num % r_den != 0:
return None, None
r = r_num // r_den
return b, r
def check_necessary(t, k, v):
"""Check all necessary divisibility conditions."""
for i in range(t + 1):
num = comb(v - i, t - i)
den = comb(k - i, t - i)
if den == 0 or num % den != 0:
return False
return True
def fano_plane():
"""Return the Fano plane S(2,3,7)."""
return [{1,2,4}, {2,3,5}, {3,4,6}, {4,5,7}, {5,6,1}, {6,7,2}, {7,1,3}]
def verify_steiner(blocks, t, v):
"""Verify that blocks form an S(t,k,v)."""
points = set(range(1, v + 1))
for subset in combinations(points, t):
subset_set = set(subset)
count = sum(1 for B in blocks if subset_set <= B)
if count != 1:
return False, subset
return True, None
# --- Verification ---
print("=== Steiner System Parameters ===")
systems = [(2,3,7), (2,3,9), (2,3,13), (3,4,8), (4,5,11), (5,6,12), (5,8,24)]
for t, k, v in systems:
b, r = steiner_params(t, k, v)
nec = check_necessary(t, k, v)
print(f" S({t},{k},{v}): b={b}, r={r}, necessary={'OK' if nec else 'FAIL'}")
print("\n=== Fano Plane Verification ===")
blocks = fano_plane()
ok, conflict = verify_steiner(blocks, 2, 7)
print(f" S(2,3,7) valid: {'OK' if ok else f'FAIL at {conflict}'}")
assert ok
print(f" Blocks: {[sorted(b) for b in blocks]}")
print("\n=== Steiner Triple Systems S(2,3,v) ===")
for v in range(3, 40):
b, r = steiner_params(2, 3, v)
if b is not None and check_necessary(2, 3, v):
print(f" v={v:>2}: b={b:>3}, r={r:>2}, v mod 6 = {v % 6}")
print("\n=== Fisher Inequality Check ===")
for t, k, v in systems:
b, r = steiner_params(t, k, v)
fisher = b >= v
print(f" S({t},{k},{v}): b={b} >= v={v}: {'OK' if fisher else 'FAIL'}")
assert fisher
answer = steiner_params(5, 8, 24)
print(f"\nAnswer: S(5,8,24) has b={answer[0]} blocks, r={answer[1]} per point")
# --- 4-Panel Visualization ---