Relative approximate counting -- definitions #
The constant-success relative estimator runs the factor-16 hashing estimator
on a Cartesian power and recovers an integer count through the upper-root
rounding convention.
Input width of the powered set supplied to the weak estimator.
Equations
- Complexity.ApproximateCounting.Relative.poweredWidth domainWidth precision = Complexity.ApproximateCounting.relativeCopies precision * domainWidth
Instances For
Per-level amplification used inside the weak estimator. The extra
poweredWidth + 2 bits pay for the union over all hash widths; failureBits
is the remaining global failure exponent.
Equations
- Complexity.ApproximateCounting.Relative.errorBits domainWidth precision failureBits = Complexity.ApproximateCounting.Relative.poweredWidth domainWidth precision + 2 + failureBits
Instances For
Total random-seed width of the constant-success relative estimator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Complexity.ApproximateCounting.Relative.hashingEstimate
{domainWidth : ℕ}
(precision failureBits : ℕ)
(set : Finset (BitString domainWidth))
(seed : BitString (seedWidth domainWidth precision failureBits))
:
Amplified relative cardinality estimate for a fixed finite set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Complexity.ApproximateCounting.Relative.successEvent
{domainWidth : ℕ}
(precision failureBits : ℕ)
(set : Finset (BitString domainWidth))
:
Seeds on which the relative hashing estimate satisfies its target accuracy contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Complexity.ApproximateCounting.Relative.failureEvent
{domainWidth : ℕ}
(precision failureBits : ℕ)
(set : Finset (BitString domainWidth))
:
Seeds on which the amplified relative estimator misses its accuracy contract.
Equations
- Complexity.ApproximateCounting.Relative.failureEvent precision failureBits set = (Complexity.ApproximateCounting.Relative.successEvent precision failureBits set)ᶜ