Wide numbers: sums that no longer fit in the instance's own positions #
A binary-weighted instance carries a set of bit positions, and each weight is
a number below 2 ^ n for n the number of positions
(DescriptiveComplexity.binNum_lt_two_pow). A sum of such weights need not be:
m items of n bits reach m · 2 ^ n. For Knapsack that costs nothing – the
sum is required to equal the target, which is itself an n-bit number, so
every running total along the way is below 2 ^ n. For Partition it is fatal:
each half is total / 2, which may well exceed every number the instance can
write, so a certificate carrying the running totals on the positions would
not exist even for yes-instances.
This file widens the representation. Bit positions become pairs, ordered with the first coordinate major:
DescriptiveComplexity.WidePosn: the pairs whose second coordinate is a position –|A| · nof them, enough room for any sum of the instance's weights (DescriptiveComplexity.finsum_binNum_lt_wide);DescriptiveComplexity.wideLe: the lexicographic order, first coordinate major, which makes the pairs(⊥, p)the lowestnpositions, with the same ranks as the positionspthemselves (DescriptiveComplexity.bitRank_wide), so that a weight is read unchanged in the wide representation (DescriptiveComplexity.binNum_wide).
Everything else – the ripple-carry lemmas of
DescriptiveComplexity.Numbers.BinRel – applies verbatim at the pair type, being
stated for an arbitrary relation on an arbitrary finite type. What the
first-order layer needs on top is the translation of the walk along the wide
positions into two coordinates, which is DescriptiveComplexity.minPos_wide,
DescriptiveComplexity.maxPos_wide and DescriptiveComplexity.succPos_wide.
The positions of the wide representation: pairs whose second coordinate is a position of the instance.
Equations
- DescriptiveComplexity.WidePosn Posn u = Posn u.2
Instances For
Dependency graph
The order of the wide representation: lexicographic, first coordinate major.
Instances For
Dependency graph
The wide order is a linear order.
Dependency graph
The instance's positions sit at the bottom of the wide ones, with unchanged ranks: a weight means the same number read either way.
Dependency graph
A weight is the same number in the wide representation.
Dependency graph
The same, with the bottom block named by minimality rather than by a constant: this is the shape a first-order kernel produces, since a formula can only say “this block is minimal”.
Dependency graph
There are |A| times as many wide positions as positions.
Dependency graph
Walking the wide positions #
The lowest wide position is the lowest position of the lowest block.
Dependency graph
The highest wide position is the highest position of the highest block.
Dependency graph
Stepping along the wide positions: inside a block, or from the top of one block to the bottom of the next.
Dependency graph
The room the wide positions buy #
A sum of numbers below 2 ^ n, over a universe of m elements, is below
2 ^ (m * n).