The Karp–Luby–Madras estimator runs in probabilistic polynomial time #
Formulas in disjunctive normal form over variables numbered by ℕ are encoded as lists of terms,
each a list of literals with the variable in binary (Cslib.Complexity.encDNF, the same encoding
as Cslib.Complexity.encCNF for formulas in conjunctive normal form). On this encoding:
- every deterministic ingredient of a trial is polynomial-time: term widths and consistency, the minimum width of a consistent term, the padding of a term (all in unary), and the acceptance test, which reads the padding coins and evaluates the formula under the forced assignment;
- one trial (
Cslib.Complexity.KarpLubyMadras.isPPTOn_trial) is a strict probabilistic polynomial-time program: a dyadic index, then a unary number of fair coins; - the estimator (
Cslib.Complexity.KarpLubyMadras.isPPTOn_estimate) is a strict probabilistic polynomial-time program on the formula and the unary parameterspandt: it runsdyadicSize m * 3 (t + 1) p ^ 2trials and writes its estimate in binary.
Main results #
Cslib.Complexity.KarpLubyMadras.computableInPolyTime_minWidth,Cslib.Complexity.KarpLubyMadras.computableInPolyTime_accepts: the deterministic parts.Cslib.Complexity.KarpLubyMadras.isPPTOn_trial: one trial.Cslib.Complexity.KarpLubyMadras.isPPTOn_estimate: the estimator.
Terms over natural-number variables: lists of literals, a variable in binary and a sign.
Formulas in disjunctive normal form over natural-number variables: lists of terms.
Forced evaluation #
Testing for the first satisfied term is polynomial-time, with the index in unary.
Widths and padding #
The width of a term, in unary.
The minimum width of a consistent term, in unary.
The padding of term i, in unary.
The acceptance test of one trial, with the index in unary.
Probabilistic polynomial time #
One trial is a strict probabilistic polynomial-time program.
The number of trials, in unary.
The Karp–Luby–Madras estimator is a strict probabilistic polynomial-time program on the
formula and the unary parameters p and t, with the estimate written in binary.