Weight-capped compressions of multigraphs #
CslibFrontier/Computability/Circuit/Frontier/Layouts/Compression.lean compresses a multigraph of
maximum degree d into connected blocks with at most d edges leaving each block, without
bounding the size or weight of a block. When a partition of the quotient must also balance vertex
weights—such as input reads in a 3-way tensor cut, or vertex and boundary counts in recursive
carving bisections—blocks cannot be allowed to absorb a macroscopic fraction of the total weight.
CappedCompression G w d M adds a weight cap M on (B.map w).sum for a vertex weight
w : V → ℕ. Merging terminates at a weight-saturated compression (Saturated): any two distinct
blocks joined by an edge either have more than d edges leaving their union, or have combined
weight strictly above M.
For budget d = 3, call a block heavy when its weight exceeds M / 2. At most
2 (∑ v, w v) / (M + 1) blocks are heavy, and every non-heavy block of quotient degree 1 or 2
must send every incident quotient edge to a heavy block (otherwise it could merge with its
neighbour, since 2 + 3 - 2 = 3). Because each heavy block has quotient degree at most 3, at
most 4 times as many blocks have quotient degree 1 or 2 as there are heavy blocks
(Saturated.card_deg_one_two_mul_le). Together with the cycle-rank and minimum-degree-two Euler
counts on connected blocks, this bounds the number of degree-three quotient blocks up to
O((∑ w) / M).
Main definitions #
Cslib.Circuits.Frontier.Multigraph.CappedCompression: a partition into nonempty connected blocks of cut at mostdand weight at mostM.Cslib.Circuits.Frontier.Multigraph.CappedCompression.Saturated: no weight-valid merge applies.Cslib.Circuits.Frontier.Multigraph.CappedCompression.quotient: the loopless quotient multigraph on the blocks.
Main results #
Cslib.Circuits.Frontier.Multigraph.CappedCompression.exists_saturated: merging terminates when every single vertex has degree at mostdand weight at mostM.Cslib.Circuits.Frontier.Multigraph.CappedCompression.Saturated.card_deg_one_two_mul_le,Cslib.Circuits.Frontier.Multigraph.CappedCompression.Saturated.mul_card_deg_one_two_le: the number of degree-1and degree-2blocks isO((∑ v, w v) / M).Cslib.Circuits.Frontier.Multigraph.CappedCompression.card_deg_three_le_of_connected: in a connected subcubic multigraph,#Q₃ ≤ 2 β₁ + #Q₁.Cslib.Circuits.Frontier.Multigraph.CappedCompression.card_deg_three_add_le_of_two_le_deg: in a loopless multigraph of minimum degree at least2with2 |E| + b = 3 |V|,#Q₃ + b ≤ |V| + #Q₁.
A weight-capped compression of G with vertex weights w, cut budget d, and block-weight
cap M. Each block lists its vertices without duplicates, induces a connected subgraph, has at
most d edges leaving it, and has total weight at most M.
The blocks of vertices.
Every vertex belongs to a block.
Blocks sharing a vertex are equal.
Each block lists its vertices without duplicates.
Each block is nonempty.
Each block induces a connected subgraph of
G.At most
dedges leave each block.Each block has total
w-weight at mostM.
A weight-capped compression is saturated when any two distinct blocks joined by an edge
either exceed the cut budget d or exceed the weight cap M upon merging.
Merging terminates. Every finite multigraph of maximum degree d with vertex weights
bounded by M admits a saturated weight-capped compression.
The quotient and block weights #
The block containing a vertex v.
Every vertex belongs to its assigned block.
A vertex belongs to a block B if and only if c.blockOf v = B.
There are at most as many blocks as vertices.
The total w-weight of a block.
Every block has blockWeight at most M.
Summing blockWeight over a set of blocks equals summing w over the vertices in their
preimage.
The block weights sum to the total vertex weight.
The external edges: those between distinct blocks.
The quotient multigraph on c.blocks, whose edges are c.external.
The quotient multigraph is loopless.
Cuts of unions of whole blocks equal the corresponding cuts in the quotient.
Pairs of disjoint block-unions have the same cross-edges in G as in c.quotient.
The degree of a block in the quotient is the number of edges leaving it in G.
Every block in the quotient has degree at most d.
In a connected multigraph with at least two blocks, every block has positive degree in the quotient.
Euler and degree counts for budget three #
Low-degree blocks are scarce. In a saturated budget-3 compression with weight cap M,
every block of quotient degree 1 or 2 is either heavy (M / 2 < blockWeight B) or sends an
external edge to a heavy block. Since each heavy block has quotient degree at most 3,
(M / 2 + 1) * #{B | deg_Q(B) ∈ {1, 2}} ≤ 4 * ∑ v, w v.
Low-degree blocks are scarce, with the weight cap itself as the factor:
M * #{B | deg_Q(B) ∈ {1, 2}} ≤ 8 * ∑ v, w v.
Degree-three count for connected subcubic multigraphs. When G is loopless, connected, and
compressed into at least two blocks, #Q₃ ≤ 2 * G.cycleRank + #Q₁.
Degree-three count under minimum degree two. When G is loopless with minimum degree at
least 2 and 2 * |E| + b = 3 * |V| (for instance G = H.induce X inside a loopless cubic
multigraph H with b = |H.edgeCut X| and greedy-flip minimum degree ≥ 2),
#Q₃ + b ≤ |V| + #Q₁.