Documentation

Complexitylib.Classes.Randomized.ApproximateCounting.Power.Defs

Cartesian powers for approximate counting -- definitions #

The accuracy boost in Stockmeyer's approximate counter applies a weak counter to a Cartesian power of the original finite set. This module fixes the row-major bit-string representation of that power.

def Complexity.ApproximateCounting.cartesianPower {domainWidth : } (set : Finset (BitString domainWidth)) (copies : ) :
Finset (BitString (copies * domainWidth))

The copies-fold Cartesian power of a set of fixed-width bit strings, encoded as one row-major bit string.

Equations
Instances For

    Number of Cartesian copies used to turn factor-16 accuracy into relative error 1 / precision.

    Equations
    Instances For
      def Complexity.ApproximateCounting.upperRootEstimate (factor copies weakEstimate : ) :

      Integer recovery from a factor estimate of a power. Multiplying by the factor before taking the floor root chooses the upper endpoint of the possible count interval and therefore avoids downward rounding error.

      Equations
      Instances For

        Relative estimate recovered from a factor-16 estimate of the prescribed Cartesian power.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For