Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions research/odd-cycle-query-capacity/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Every unequal odd-cycle query mask

JoyboyBrian, substantial OpenAI Codex assistance; Apache-2.0. Credit Tekalign
PR3362's C5 proof/interface, Nick Petalas PR4909's bipartite interface, and
classical finite linear-programming duality and capacitated matching methods.
No literature-priority claim is made for odd-cycle coding or matching.

## Contract and exact answer

Let n=2k+1, k>=2, and d_i be any nonnegative integers, S=sum d_i. Over any
field F take an S by S fitting matrix M with M_ii=I_(d_i), and M_ij=0 for
distinct nonadjacent vertices of C_n. The two allowed ordered blocks at every
edge are arbitrary rectangular matrices. They need not be symmetric, invertible,
commuting, or simultaneously diagonalizable. A zero-width block is empty.
Let alpha be the largest sum of d_i on an independent vertex set. Then

min rank(M) = max(alpha, ceil(S/2)). (1)

For linear query factorizations M=AB this is the exact minimum intermediate
field-coordinate dimension. It is not a native call count, physical COPY cost,
Gaussian rank, admitted supplier, or multiplication exponent. No assertion is
made about nonlinear encoders, changed zero masks, or a physical embedding of
these cycles inside the P112 geometry.

## Lower bound for arbitrary directed blocks

Factor M=AB through r=rank(M) dimensions. Let B_i be its i-th column block,
A_i its i-th row block, and U_i=im B_i. Because A_i B_i=I, B_i is injective,
dim U_i=d_i, and A_i is injective on U_i. Because both ordered forbidden blocks
are zero, A_i annihilates the sum of all nonneighbor U_j. Thus

U_i intersect sum_(j nonadjacent to i, j!=i) U_j = 0. (2)

For every independent set the U_i form a direct sum, by applying A_i to a
putative relation. Therefore r>=alpha.

Put t_i=dim(U_i intersect U_(i+1)). The two subspaces U_i intersect U_(i-1)
and U_i intersect U_(i+1) lie in U_i and have zero intersection: i-1 and i+1
are nonadjacent when n>=5. Hence

t_(i-1)+t_i <= d_i; 2 sum_i t_i <= S. (3)

For each i take J_i={i,i+1,i+3,i+5,...,i+2k-1} modulo n. The subgraph on
J_i consists of exactly the edge {i,i+1} and k-1 isolated vertices. Applying
each isolated A_j kills all the other subspaces. Their sum is therefore direct
with U_i+U_(i+1), so

r >= sum_(j in J_i) d_j - t_i.

Every vertex lies in exactly k+1 of these n rotated sets. Sum the inequalities
and use (3):

n r >= (k+1) S - sum_i t_i >= (k+1/2) S = n S/2.

Integer dimensions give r>=ceil(S/2), in every characteristic. This proves the
entire lower bound, including arbitrary noncommuting payload blocks. Finite
matrix tests are corroboration of this argument rather than its justification.

## Exact integral sharing

An edge count x_i>=0 reserves x_i distinct coordinates at both endpoints.
Private count p_i=d_i-x_(i-1)-x_i must be nonnegative. One shared coordinate
uses the rank-one all-ones two-by-two block; one private coordinate uses a
scalar identity. These disjoint groups fit the full ordered zero mask over every
field and have rank sum_i(x_i+p_i)=S-sum_i x_i.

For completeness the needed cycle matching fact is proved here. Consider the
finite LP max sum_i x_i with x_i>=0 and x_(i-1)+x_i<=d_i. Its dual is min
sum_i d_i y_i with y_i>=0 and y_i+y_(i+1)>=1. Truncating y_i at one preserves
feasibility and cannot increase the objective. An extreme dual point is either
an integral vertex cover or all y_i=1/2. Indeed a proper component of fractional
vertices connected by active edge equalities is a path, whose alternating
plus/minus perturbation preserves all active equalities for a sufficiently small
amount; an endpoint cannot be pinned by an adjacent integral value without
becoming integral itself. Such a path is not extreme. If the component is the
whole odd cycle, its alternating equations force all values to one half.
Finite LP strong duality therefore gives the fractional optimum

min(S-alpha, S/2). (4)

Here integral covers have minimum weight S-alpha because their complements
are independent sets. To pass to integers, choose an extreme optimal primal
point. Any positive-support component that is a proper path has integer edge
values: a full-rank active system is solved from a zero edge/end or a tight
endpoint constraint and then successively along integer vertex capacities.
Equivalently the path incidence matrix has every nonsingular square minor
0 or +/-1 by removing a leaf. Fractionality can consequently occur only when
all n edges are positive and every vertex constraint is tight. The cyclic
system x_(i-1)+x_i=d_i has determinant two; any fractional solution has all
x_i integer-plus-one-half. Round x_0,x_2,...,x_(n-1) down and the intervening
edges up. Every vertex keeps its total except vertex 0, whose total drops by
one. Nonnegativity remains valid, and the objective loses exactly one half.
Thus the maximum *integral* sharing is

min(S-alpha, floor(S/2)). (5)

When (4) is integer, the fractional extreme case cannot be optimal: the sum of
an odd number of half-integers is a noninteger. This also covers zero widths
and zero total. Equations (5) and the channel construction attain (1).
The LP argument is a classical matching method, not a new general LP theorem.

## Compressed deterministic construction

The implementation does not call an LP solver or expand d_i coordinates.
Fix the closing edge x_(n-1)=t with 0<=t<=D=min(d_0,d_(n-1)). The remaining
capacities on endpoints are reduced by t. A path maximum matching is obtained
by saturating the leftmost remaining edge as far as possible and continuing.
An exchange proves this greedy rule: if an optimum uses fewer copies at the
left edge, an unused copy at its right endpoint can be taken directly, or one
copy on the next edge can be moved left without reducing the number of edges.
After fixing the left edge repeat on the shorter path.

Let g(t)=t+the optimum path sharing. The capacitated path matching/cover dual
is integral, either by the leaf argument above or ordinary weighted bipartite
matching duality. Thus for integer t it equals the minimum of the path-cover
affine functions

cover_weight + t*(1 - number_of_endpoints_in_cover).

Those slopes are -1,0,1. The same LP expression on real t is concave, so g on
integers is discretely concave. Binary search for the first index satisfying
g(t)>=g(t+1) finds a maximum, including an arbitrary long flat plateau and
D=0. It uses at most 2 ceil(log2(D+1))+1 greedy path evaluations; each takes
O(n) integer operations and O(n) compressed integers. The maximum arithmetic
operand bit length is O(log(S+1)); source/target coordinate expansion and any
physical index/bit-operation costs are separate. `validate` checks every
coverage equation and exact answer, and emits a weighted independent witness using linear-space backpointer
reconstruction, without quadratic prefix-tuple copying.

## Discriminating cases and stop

Seven width-two vertices need seven query coordinates, rather than twice the
scalar optimum four. For d=(2,1,2,1,2,1,1), alpha=6 exceeds S/2=5; the actual
answer is six. For seven unit vertices alpha=3 but ceil(S/2)=4. Both terms
are essential. The C5 predecessor is recovered exactly, not claimed again.

The proof closes this cycle-mask dimension contract. It does not fund copying,
dirty compensation/restoration, owner access, source coefficient preparation,
frames, hosting, stock, finite precision, physical tapes, compiler or outer
transfer. A new physical construction needs those contracts before another
implementation campaign. No selected frontier is changed.
76 changes: 76 additions & 0 deletions research/odd-cycle-query-capacity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Exact query capacity for every unequal odd cycle

For every C_(2k+1), k>=2, arbitrary nonnegative payload widths d_i and every
field, the exact fitting rank is

max(maximum independent-set payload weight, ceil(total payload/2)).

Allowed ordered edge blocks may be rectangular, nonsymmetric and noncommuting.
[PROOF.md](PROOF.md) proves the all-field lower bound and an attaining integral
edge/private-channel factorization. The compressed deterministic constructor
uses O(n log(max(d)+2)) integer operations, without expanding payload coordinates.
This is a query-dimension contract, not a physical supplier or new kappa.

Seven width-two payloads need seven coordinates, while two separate scalar
rank-four solutions would need eight. The unequal C7 (2,1,2,1,2,1,1) needs six
coordinates: its weight-six independent set is stronger than half-total five.
Seven unit payloads instead need four, stronger than independent-set weight three.

## Scope and family decision

This extends Tekalign #3362's C5 interface to all odd cycle lengths, alongside
Nick Petalas #4909's bipartite-mask result. It changes the mask class, retaining
the same complete ordered zero and identity-block contracts. All rotated
one-edge-plus-isolates subspaces establish the new general lower-bound step.
Classical matching, vertex-cover/LP and odd-cycle index-coding methods retain
credit; no literature priority or new general matching algorithm is claimed.
The bounded finite census does not establish the universal theorem by itself.

Family decision: EXPAND once to close this exact mask contract, then STOP at
that result. No source-bound P112 realization is asserted. Physical reads,
copies, dirty restoration, frames, ownership, hosting, preparation, numerical
stock/precision, fixed tapes, compiler and outer recovery remain UNKNOWN.
A dimension optimum does not price them as free or improve the selected result.

## Reproduction

Use Python 3.12 and only its standard library:

```sh
python3.12 -B scripts/research_package.py --package research/odd-cycle-query-capacity
python3.12 -I -O -B research/odd-cycle-query-capacity/verify.py
```

The read-only replay checks every width vector in {0,1,2,3}^5, {0,1,2}^7
and {0,1}^9 against independently enumerated coordinate sharing and independent
sets. It checks all attaining matrix entries and ranks over GF(2), GF(3) and
GF(101), every directed binary scalar fitting matrix on C5/C7, malformed inputs,
underpaid/incorrect channel recipes and a forbidden ordered block. An eleven-
vertex fixture uses 4097-bit widths while retaining only O(n) integers. Exact
counts and the deterministic recipe digest are in [RESULT.json](RESULT.json).
An independent column-span implementation checks 288 directed rectangular-block
fitting matrices, all rotated subspace inequalities and a sharp seven-width-two
attainer with noncommuting allowed blocks. Source/receipt corruption must fail. Hosted CI and independent mathematical
acceptance are not asserted here.

Canonical base bee95ce88f9f19802f0613f92838895cd0e14a1f, priority revision 7,
selected conditional kappa 0.00302015 unchanged. Initial overlap covered 310
open PRs, 4096 Discussion records and all 6690 tracked package notes, with
reported complete inventories; absence of a match is not proof of novelty.
The canonical investigation is Discussion #1587. Exact predecessor bytes and
the original card are retained in SOURCES.json and TASK.json.

## Open next questions

1. Determine a named triangle-free mask with overlapping odd cycles for which
arbitrary fitting blocks improve on integral coordinate pairing. First
compare its rank-factor subspace constraints with its complete edge-sharing
LP; no physical decoder should be assumed.
2. Exhibit an actual recursive caller whose admitted ordered read mask is one
of these longer odd cycles, with all query/source/copy and cleanup costs.
A geometric/matching realization and complete consumer tariff are blockers.

Credit Tekalign #3362, Sagar Thakrar #2484, ywz65 #2471, Nick Petalas #4909,
Cinna Davis, Adam Gall, ctoth, Philippe Van Velzen and the retained P112/native
lineage. New scoped proof, constructor and checks: JoyboyBrian, with substantial
OpenAI Codex assistance. Apache-2.0. No human or proof-kernel review claimed.
Loading