Approximation Algorithms for Combinatorial Problems III: The Worst-Case Ratio of the Weighted Algorithm B2Research Paper
Motivation
MAXIMUM SATISFIABILITY asks for a truth assignment satisfying as many clauses of a given set as possible. It was among the first NP-hard optimization problems for which an approximation algorithm came with a proven worst-case guarantee. In Approximation Algorithms for Combinatorial Problems (J. Comput. System Sci. 9, 1974, doi:10.1016/S0022-0000(74)80044-9), David S. Johnson set up a framework for measuring such guarantees and analyzed two heuristics for the problem. The second of these, algorithm B2, weights each clause by and repeatedly sets a literal so that the heavier side is satisfied. On inputs whose clauses all have at least literals, it satisfies at least a fraction of the optimum.
B2 is the ancestor of a line of work on MAX-SAT approximation:
- 1974. Johnson proves the bound for B2 on MS(k) and the bound for the unweighted greedy algorithm B1.
- 1994. Goemans and Williamson (SIAM J. Discrete Math. 7) present Johnson's algorithm as the derandomization, by conditional expectations, of the uniformly random assignment, and combine it with LP rounding to obtain a -approximation.
- 1999. Chen, Friesen and Zheng (JCSS 58) show that B2 is a -approximation on general inputs, sharper than the that Johnson's bound gives at .
Setting
A literal is a variable or its negation . A clause is a finite set of literals. A truth assignment is a set of literals containing no pair ; it satisfies a clause when . An input is a finite set of clauses, and is the largest over subsets satisfied by one truth assignment. MS(k) is the restriction to inputs in which every clause contains at least distinct literals.
Algorithm B2 keeps a set SUB of satisfied clauses, a set LEFT of unsettled clauses, the literals LIT still available, and a weight per clause, starting from , , . While some literal of LIT occurs in a clause of LEFT, it picks any such literal . Let YT be the clauses of LEFT containing and YF those containing . If , it makes true, moves YT to SUB and doubles the weight of each clause of YF; otherwise it does the symmetric move with . Finally it removes from LIT. When no literal of LIT remains in LEFT it returns SUB.
The choice of is free, so several outputs may be choosable on one input. Johnson measures the algorithm by its worst choosable output, through the ratio and its maximum over inputs of size at most .
Formalization targets
Goal: Theorem 3, with the equality range corrected
For every , every in MS(k) and every SUB choosable by B2 on ,
and for every there are in MS(k) and a choosable SUB with and
The paper states equality "for all sufficiently large " for every . At this is false: the ratio 2 would require every clause to be a unit clause and all clauses to be jointly satisfiable, and on such inputs B2 satisfies everything. The goal therefore asserts tightness for . A separate item states that at the ratio is never attained.
Milestones
- Initially, the total weight of LEFT is at most .
- No iteration increases the total weight of LEFT, so at halting it is still at most .
- At halting, every clause left in LEFT has weight exactly .
- At halting, and .
- The eight-clause instance for has and admits a choosable output of size .
Significance
The bound is exactly the expected fraction of clauses a uniformly random assignment satisfies on MS(k). B2 attains it deterministically, and the proof bounds against rather than against , a feature the paper points out. For the constant was later shown by Håstad (2001) to be optimal among polynomial-time algorithms unless P = NP, so the guarantee of this 1974 algorithm is best possible for MAX-E3-SAT.
Formalizing the result produces a machine-checked potential-function argument for a nondeterministic algorithm: the invariant links each clause's weight to how many of its literals have been removed. The mission also records a correction to the printed statement at . The paper's proof is complete; to our knowledge no machine-checked version exists.
Difficulty
The obvious argument follows the counting proof for algorithm B1 and compares clauses saved with clauses wounded in each step. It fails here: B2 can wound more clauses than it saves in a step, and the bound holds only in the weighted sense. The weight of a clause is not a static quantity. It is times to the number of its literals already discarded, and this invariant must be carried through every step, including clauses that contain both and . Tightness needs an explicit input and an explicit adversarial run that exploits the tie in Step 4, and then a proof that every assignment of the remaining variables kills exactly one clause.
Formalization scope
- Literals and clauses. A literal is a pair (variable index in , sign). Clauses are
Finsets of literals, and an input is aFinsetof clauses, so there are no duplicate clauses. Truth assignments are partial and consistent. is a maximum over the finite, nonempty family of satisfiable subsets. - B2 as a relation. B2 is a nondeterministic run relation, and "choosable" means reachable by finitely many steps from the initial state and halting. Step 3 allows a literal of either sign. The tie in Step 4 goes to , and the comparison and doublings use the weights before the update. Weights are rationals.
- Size-free ratios. The size-dependent is replaced by statements about every input (upper bound) and one attaining input (tightness). The two forms are equivalent because is a maximum over finitely many inputs and nondecreasing in .
- No division. All ratios are multiplied out, so no division by zero can make a bound vacuous.
- Trivializations ruled out. A deterministic tie-break in Step 3 or 4, or tightness at a single fixed , would be a weaker theorem and is not acceptable. So is stating only the upper bound.
The definitions (the MS layer, the run relation) can be reused by other MAX-SAT approximation results, and an identical MS layer appears in the companion mission on algorithm B1. Contributions welcome: proofs of the milestones, of the tightness family, and of the correction.
Selected references
- D. S. Johnson, Approximation algorithms for combinatorial problems, J. Comput. System Sci. 9 (1974) 256–278. https://doi.org/10.1016/S0022-0000(74)80044-9
- J. Chen, D. K. Friesen, H. Zheng, Tight bound on Johnson's algorithm for maximum satisfiability, J. Comput. System Sci. 58 (1999) 622–640. https://doi.org/10.1006/jcss.1998.1610
- M. X. Goemans, D. P. Williamson, New 3/4-approximation algorithms for the maximum satisfiability problem, SIAM J. Discrete Math. 7 (1994) 656–666. https://doi.org/10.1137/S0895480192243516
- J. Håstad, Some optimal inapproximability results, J. ACM 48 (2001) 798–859. https://doi.org/10.1145/502090.502098