The trial count of Schöning's algorithm #
Schöning's algorithm with confidence c runs
schoeningTrials k n c = ⌈(3 n + 1) (2 (k - 1) / k) ^ n (k / (k - 1)) ^ (k - 3)⌉ c trials on
n variables and clauses of at most k literals Schöning. For k = 3 this is
⌈(3 n + 1) (4 / 3) ^ n⌉ c, a number of about 0.415 n bits.
The amplified algorithm computes this number on the word RAM with the multiword counter of
Cslib.Algorithms.WordRAM.Schoening.mulAdd and Cslib.Algorithms.WordRAM.Schoening.divFloor:
it forms the numerator (3 n + 1) (2 (k - 1)) ^ n k ^ (k - 3) by multiplications, divides it by
k n times and by k - 1 k - 3 times, rounding up each time, and multiplies by c.
Cslib.Algorithms.WordRAM.Schoening.counterDigits is the resulting digit list, and
Cslib.Algorithms.WordRAM.Schoening.ofDigits_counterDigits proves that its value is
schoeningTrials k n c: rounding up in stages is rounding up once, and the real expression is
this quotient of natural numbers.
Main definitions #
Cslib.Algorithms.WordRAM.Schoening.schoeningTrials: the trial count for confidencec.Cslib.Algorithms.WordRAM.Schoening.mulStep,Cslib.Algorithms.WordRAM.Schoening.ceilStep: multiplication and division rounding up on digit lists.Cslib.Algorithms.WordRAM.Schoening.counterDigits: the digits of the trial count, as computed.Cslib.Algorithms.WordRAM.Schoening.counterLen: a bound on their number.
Main results #
Cslib.Algorithms.WordRAM.Schoening.ofDigits_counterDigits: the digits have the valueschoeningTrials k n c.Cslib.Algorithms.WordRAM.Schoening.length_counterDigits_le: there are at mostcounterLen k n c = O((n + k) log (n + k) + log c)of them.Cslib.Algorithms.WordRAM.Schoening.schoeningTrials_le: the trial count is at most(9 n + 4) (2 (k - 1) / k) ^ n c.
References #
The number of trials for confidence c:
⌈(3 n + 1) (2 (k - 1) / k) ^ n (k / (k - 1)) ^ (k - 3)⌉ c, the inverse of Schöning's bound
for one trial, rounded up, times c. For k = 3 it is ⌈(3 n + 1) (4 / 3) ^ n⌉ c.
The digits of the trial count #
The digits of (3 n + 1) (2 (k - 1)) ^ n k ^ (k - 3), the numerator of the trial count.
The digits of the trial count, as the amplified algorithm computes them: the numerator,
divided by k n times and by k - 1 k - 3 times, rounding up, then multiplied by c.
A bound on the number of digits of the trial count.
The value of the counter digits is the trial count.
The number of digits #
Iterating a step that keeps digits binary and adds at most D digits.
The digits of the numerator are binary, and there are at most
(1 + n + (k - 3)) D of them, with D the number of digits of 3 n + 2 k.
The number of digits of the trial count is at most counterLen k n c.
The digits of the trial count are binary.
Every intermediate digit list of the computation of the trial count is at most as long as the
final one: the multiplications by 2 (k - 1), by k, and the divisions by k and by
k - 1.
Size bounds #
The number of counter digits is at most 6 (n + k) ^ 2 + c.