Take the single Boolean clause
This is a 3-CNF formula. Suppose a 2-CNF formula were logically equivalent to . Every Boolean clause of would then be a consequence of .
Consider any nontautological Boolean clause containing at most two Boolean literals. Choose a Boolean valuation falsifying its Boolean literals. At least one of does not occur in ; assign that Boolean variable true. The resulting Boolean valuation satisfies while falsifying . This contradicts . An empty Boolean clause also cannot be a consequence of the satisfiable .
Consequently every Boolean clause of would have to be a tautology. Their logical conjunction would be true under every Boolean valuation, whereas is false when . This proves that no such exists.
The argument even allows additional ordinary Boolean variables in : at most two Boolean literals still leave one of free to be made true. Introducing extra variables together with existential quantification would change the requested notion of logical equivalence, so it is not a way around the argument.
A decision problem is in NP if every yes-instance has a complexity certificate of length bounded by a polynomial in the input length, and a deterministic verifier can check that certificate in polynomial time. More precisely, for some polynomial and verifier ,
where runs in polynomial time. Equivalently, a nondeterministic machine decides the problem in polynomial time. A problem is NP-complete if it belongs to NP and is NP-hard: every problem in NP has a polynomial-time many-one reduction to it. Such a reduction maps instances to instances with if and only if is a yes-instance of the target problem.
For 3-SAT, the complexity certificate is one truth value for each Boolean variable. Check every Boolean literal, negate its variable's truth value when appropriate, evaluate the disjunction in each Boolean clause, and check their conjunction. This takes time linear in the encoded Boolean formula, apart from equally polynomial bookkeeping for variable names. A satisfying assignment passes; an unsatisfiable Boolean formula has no passing assignment. Thus 3-SAT belongs to NP.
For the diagram's three-colour clause gadget, name the three colours by the graph triangle . Each input is adjacent to , so each has colour or . Suppose that none has colour . Then all three have colour . Because is adjacent to and to , neither has colour . The edge forces these two colours to be and in some order. The graph triangle now forces to have colour . Since is adjacent to and , it must have colour . The graph triangle forces to have colour . But is adjacent to , which also has colour , contradicting a proper graph colouring. Therefore at least one input has colour .
To give the polynomial-time many-one reduction, use one common palette graph triangle . For each Boolean variable , create two graph vertices and join them to each other and to . This Boolean-pair colouring gadget forces them to have opposite colours . For each Boolean clause, introduce five fresh auxiliary graph vertices and the edges of the three-colour clause gadget, identifying its inputs with that clause's three Boolean literal vertices and using the common . In the notation of the diagram, its ten additional edges are the two triangles and , the bridge , and the three input edges. With variables and clauses the constructed undirected graph has vertices and at most edges. Repeated literals do not affect the argument. Its construction takes polynomial time.
A proper graph colouring defines a consistent truth assignment by declaring true precisely when its vertex has colour . The only-if result just proved makes every clause true. Conversely, a satisfying assignment colours every literal vertex consistently, and the supplied if-direction extends each satisfied clause's colours to its fresh auxiliary vertices. These extensions do not conflict, since different clauses share only already-coloured palette and literal vertices. Thus the Boolean formula is satisfiable exactly when the constructed undirected graph is three-colourable. Since 3-SAT is NP-complete, composition of reductions proves NP-hardness of the three-colourability problem.
Finally, a list of three colour labels, one for each graph vertex, is a complexity certificate for the three-colourability problem. Checking all edges takes time. Hence this problem is in NP as well, and the three-colourability problem is NP-complete.
Let encode the truth value of . For a Boolean literal , write if and if . A clause is true precisely when the sum of its literal values is at least one. Thus the integer programming formulation of satisfiability is the feasibility problem
with objective zero. Every feasible binary vector gives a satisfying assignment of the Boolean satisfiability problem, and conversely. An empty clause gives and hence infeasibility.
For maximum satisfiability, introduce binary variables marking clauses selected as satisfied and solve
A false clause forces , while a true clause permits . At an optimum every permitted is one, since increasing it improves the objective without affecting another constraint. Therefore the objective is exactly the maximum number of simultaneously true clauses. Repeated literals cause no difficulty, and a clause containing both signs of a variable is always true.
For the literal-frequency greedy approximation for MAX-SAT, keep only clauses not already satisfied and remove literals made false. Count occurrence in clauses, rather than multiplicity within a clause. At a step let be the number of current clauses containing the chosen literal , and the number containing its opposite . Since has maximum clause frequency among all remaining literals, .
Setting true permanently satisfies exactly the clauses containing it. Some other clauses may become empty and are then permanently lost. Every newly empty clause previously contained , so their number satisfies
A clause containing both signs is satisfied and cannot be one of the lost clauses. Repeat this accounting at every step. Satisfied clauses are removed, so no success is counted twice; each lost nonempty original clause becomes empty at exactly one step. If is the total number satisfied and the number of initially nonempty clauses lost, summing the inequalities gives . Every initially nonempty clause eventually falls into one of these two classes. Writing their number as , we get
Even an optimal assignment can satisfy at most clauses. Consequently
Thus Greedy is a -approximation in the convention stated in the question. The proof also covers initial empty clauses by excluding them from ; they are unsatisfiable for every algorithm.
The printed interval has a typo: its right endpoint must be , rather than . Keep as an unnormalized indicator function; only is normalized to have integral one. Thus use
With the Boolean literal printed interval, the convolution vanishes at , so a sequence consisting entirely of is already a counterexample to the proposed majorization. For the corrected interval and every , all with belong to the support of . Hence there. Everywhere , giving , including interval endpoints.
Put . For , direct integration and the convolution theorem give the exact Fourier coefficients
In particular,
This also supplies the required justification of the Fourier series. The convolution is continuous: it is the overlap length of two moving intervals, divided by . Its Fourier coefficients are absolutely summable, so the corresponding Fourier series converges uniformly to a continuous function . Termwise integration gives ; the permitted uniqueness assertion applied to yields .
Let . Split the absolutely convergent Fourier series at the arbitrary real cutoff :
There are fewer than low-frequency terms and each coefficient has magnitude at most . For the tail, and . Therefore
This proves the requested interval discrepancy estimate without an unjustified sharp truncation of the Fourier series.
For a nonzero integer , let be the nearest integer to . The integer is nonzero, and . The suggested factorization yields
This is stronger than the stated lower bound for the fractional part, since the distance to the nearest integer is at most that fractional part. For , the geometric series and give
Thus the low-frequency contribution is . Choose and ; these choices satisfy for every . Both and are , and so is . Hence
Use a Boolean circuit of unbounded-fan-in AND and OR gates, with negations pushed to the input Boolean literals. Its circuit depth is the largest number of AND/OR gates on an input-to-output path, and its circuit size counts these gates. Constants and Boolean literals may be supplied as inputs. Equivalent standard size conventions only enlarge the absolute constants. One can merge adjacent gates of the same type; the depth-reduction argument below keeps the two possible normal forms available at each gate.
A random restriction with parameter independently leaves each variable live with probability and otherwise fixes it to zero or one with probability each. The Håstad switching lemma states that for a width- DNF or conjunctive normal form ,
Width bounds Boolean literals in a term or clause, not the number of terms. A decision tree of depth at most has both a DNF and a conjunctive normal form of width at most and has real multilinear degree at most . Indeed every leaf condition is a product of at most factors or ; sum the accepting leaves. The switching lemma controls the canonical decision tree, hence implies this representation bound.
We detail the Boolean circuit simplification parameters. First use a -random restriction. For a bottom AND gate, let count its live Boolean literals on the event that no fixed Boolean literal kills it. For distinct Boolean literals,
Thus the probability of retaining more than live Boolean literals without becoming constant is at most . The same calculation applies to bottom OR gates, with the opposite killing value. Repeated Boolean literals are removed and contradictory Boolean literals make a constant gate. A union bound makes all nonconstant bottom gates width at most , except with probability at most .
Now apply successive restrictions, each retaining probability of the remaining variables. At a two-layer gate, the current bottom forms are width- DNFs or conjunctive normal forms. The Håstad switching lemma bounds its probability of failing to reduce to decision-tree depth at most by . Convert the successful decision tree into the opposite normal form, whose terms or clauses have width at most , and merge its outer gate with the adjacent gate of the same type. This removes one layer. Repeat upwards until the output has a depth- decision tree.
The bookkeeping matters: although a decision tree may give clauses, each subsequent switching event is charged to the corresponding original Boolean circuit gate, not to each newly created clause. The lemma permits any number of terms. Each original gate is charged once, so the sum of the failure probabilities is at most , without an extra exponential size factor. Conditioning on successful preceding stages is harmless because each next restriction is fresh and the width bound holds for every preceding success. For a general Boolean circuit the conjunctive normal form or DNF representation at a shared gate can be chosen separately for each outgoing use; no extra gates need to be counted as switching targets.
The composed restriction has live-variable probability
Fixed values are still unbiased and coordinates independent. We have proved the useful intermediate estimate
For , the initial bottom-gate argument alone gives this conclusion. This is a depth-reduction estimate, not the desired Fourier-tail theorem used as a black box.
Next derive exactly how restrictions affect the Fourier-Walsh transform. Let be the random live set and the fixed assignment outside . With , the restricted coefficient at is
Orthogonality of the fixed-coordinate characters eliminates cross terms after averaging over . Therefore
and then averaging over gives the expected Fourier weight after a random restriction identity
The original high-degree tail is not preserved: each original coefficient is weighted by a binomial distribution survival probability. On successful restrictions the left-hand tail vanishes; on failures it is at most one by Parseval's identity and . Hence its expectation is at most .
Put . If , choose and the preceding value of . For every , the binomial distribution mean satisfies
Its variance is at most . The Chebyshev inequality gives
Thus the exact expectation identity bounds at least half the original tail above , and
When the same bound follows from the trivial total-weight bound . We obtain explicit absolute constants,
This supplies the requested overview of the Linial-Mansour-Nisan theorem with the actual switching scale, gate-count bookkeeping and restriction-to-Fourier calculation. The argument uses the unbounded-fan-in AND/OR Boolean circuit basis; allowing arbitrary gates would make the theorem false, since one parity gate could have all its nonconstant Fourier weight at level . The original theorem is Linial, Mansour and Nisan's circuit Fourier bound.
Use the specified construction as a polynomial-time many-one reduction from 3-SAT. There are vertices and edges: one edge per variable pair, three edges per clause triangle in a graph, and three occurrence edges per clause. Any vertex cover must take at least one vertex from every variable pair and at least two from every clause triangle. Therefore every cover has at least vertices.
Given a satisfying Boolean valuation, include the vertex corresponding to the true Boolean literal in each variable pair. In each clause choose a true occurrence and omit its clause vertex, including the other two. Every variable edge and triangle edge is covered. An occurrence edge with an included clause endpoint is covered automatically; the only omitted occurrence vertex is joined to the included true-literal vertex. This is a vertex cover with exactly vertices.
Conversely, a cover of that size must use exactly one vertex in each variable pair and exactly two in each triangle. Declare a variable true precisely when its positive-literal vertex is included. Each clause has one omitted vertex. Its occurrence edge forces the corresponding literal vertex into the cover, so that literal is true. Every clause is therefore satisfied. Thus
The construction and target size are polynomial in the input length. Since 3-SAT is NP-complete, the decision problem is NP-hard. The usual “at most ” version has the same equivalence here because is an unavoidable lower bound. More generally, a cover with fewer than vertices can be padded to exactly . Verifying a proposed cover is polynomial, so the usual vertex-cover decision problem is also in NP and hence NP-complete.
The three-colourability problem belongs to NP: a colour assignment is a polynomial-length complexity certificate, and all edges can be checked in time.
For NP-hardness, reduce 3-SAT to the three-colourability problem. Start with a palette graph triangle with vertices . Its colours are necessarily distinct, and name them by these vertices. For each Boolean variable , add vertices , join them to each other, and join each to . The graph triangle is the forcing component of the Boolean-pair colouring gadget, so the two literal vertices receive opposite colours .
For each Boolean clause, attach a fresh copy of the three-colour clause gadget, identify its with the palette vertex , and identify its three input vertices with the Boolean clause's Boolean literal vertices. Copies share only palette or literal vertices. A Boolean clause with one or two Boolean literals is padded to three by repeating a literal; an empty Boolean clause can be mapped immediately to the uncolourable graph .
Any graph colouring with three colours gives a truth assignment by reading colour as true. The three-colour clause gadget forbids three false inputs, so every Boolean clause is satisfied. Conversely, any satisfying truth assignment colours the literal pairs, and the extension property proved above independently colours the fresh auxiliary vertices of each clause. Thus the entire graph is three-colourable exactly when the formula is satisfiable.
There are vertices for variables and nonempty padded clauses, and edges. The construction is a polynomial-time many-one reduction. Using the permitted NP-completeness of 3-SAT, we obtain
A disjunctive normal form, also called a sum of products, is an OR of AND terms, each made from Boolean literals such as or . For example,
Here juxtaposition means logical conjunction, means logical disjunction, and a bar means negation. The expression need not be canonical: a term can omit variables, and need not name a single row of the truth table.
Implement each product by an AND gate and combine the products with an OR gate. Supply complemented inputs with NOT gates. Thus
This is the usual two-level combinational logic realization, counting complemented inputs as available. If NOT gates are counted, a complemented input can traverse three gates. The two-level depth statement also assumes sufficiently large gate fan-in: using only two-input logic gates requires trees for long products or sums. Constant, single-product and single-literal Boolean functions may need fewer levels, so the two-level construction is a general bound, not a claim that every expression requires exactly two layers.
Use two history D flip-flops. Write , and for the signals just before the active clock edge; update the history by and . Two or more of the three samples are one exactly when some pair are both one, so the majority function is
Three two-input AND gates and one three-input OR gate implement this disjunctive normal form. If a registered output is wanted, feed the expression to the D input of another D flip-flop and capture it at the same edge as the history update. All right-hand sides use the pre-edge values, so no extra sample of delay is introduced.
The three terms are necessary in a minimal sum of products: the input triples , and must each be covered, and a single product covering two of them would also cover a triple having only one one. Thus the minimum is three products, each with two Boolean literals.
Figure 1.
Sample history and registered output for the three digital smoother designs
. Details.
Keep the two history D flip-flops and add an output D flip-flop with previous value . Its next value is one if all three inputs are one, or if the output was one and at least one of the three inputs is one. In the latter case the samples are not all zero, so the previous one must be retained. This gives
If , the first product sets the output. If , every product vanishes and the output clears. For every mixed input triple, at least one of equals , so the output is retained. Feed this sum of products to the output D input, use for the history, and use asynchronous clear or an appropriate initialization to establish .
Minimality can be seen directly from the truth table. At , the only one-entry is , forcing the product or a narrower term. At , the triples , and must all produce one; combining any two in one product would also admit , which must produce zero. Thus three more products are needed. The displayed four products achieve the minimum; removing any Boolean literal from would include a zero-entry.
The unconstrained cases can be treated as don't-care conditions during Boolean function minimization. One particularly small, deliberately asymmetric choice is
Use the same two history D flip-flops and one output D flip-flop, with this expression at the output D input. It requires two two-input AND gates and one OR gate.
To verify every required case, first set . If zero occurs at least twice among , then , so as required. If all three samples are one, then , so . The remaining triples have exactly two ones and hence exactly one sample agreeing with the old zero; either output is allowed.
Now set . If at least two samples are one, either or , giving . If all three samples are zero, both terms vanish, giving . The remaining triples have exactly one one and are the allowed don't-care conditions. Thus the expression meets both requirements, including every constant-input triple.
For minimality, consider these required one-entries in order: , , and have no common literal. Therefore a product covering all four would be the constant one, which violates required zero-entries. Also no single-literal product is safe: each of is one at some required zero-entry, and each complemented literal is one at . Hence at least two products with at least two Boolean literals each are needed. The displayed expression attains two products and four literals.
Use three D flip-flops whose stored bits represent . Initialize them to . The Moore machine's output is this stored binary representation, and its state transition table is:
Present Next
Treat the two unused state encodings as don't-care conditions when minimizing the sum of products. With juxtaposition for AND, for OR and a bar for NOT, one minimal choice is
For , the required ones at and cannot share one valid implicant: their differing bits would force inclusion of required zeros. Pair with the unused to get , and with unused to get . Neither term can lose a Boolean literal without covering a required zero.
For , state is isolated from every other required one and from the unused states by required zeros, so it forces the three-Boolean literal term . State pairs with unused to give . Finally is a single Boolean literal. Thus the three expressions are minimal sum of products expressions under the stated unused-state convention. In fact these choices also recover from , so initialization into an unused state eventually joins the intended modulo-six counter cycle.
Resolution inference rule 2026-10-31
From Boolean clauses containing complementary Boolean literals, derive the Boolean clause formed by removing that complementary pair and taking the remaining Boolean literals. For example, resolving with gives . Backward proof search with a positive-headed Horn clause and an all-negative query is a restricted use of this rule.
OR together one minterm for each accepted length- input. Each minterm is an AND of the appropriate Boolean literals. There are at most minterms, and their negated input wires can be shared, giving bounded-fan-in gates. This is a nonuniform existence statement, not an algorithm for determining an undecidable truth table.
Verifying a satisfying assignment Created 2026-10-18 Updated 2026-10-25
For a CNF input with Boolean variables, Boolean clauses, and Boolean literal occurrences, first check that the supplied Boolean valuation gives each input Boolean variable exactly one truth value. Evaluate each Boolean literal by lookup or logical negation, each Boolean clause by logical disjunction, and the Boolean formula by logical conjunction. Indexed Boolean variables and constant-cost lookups give an operation count; with a finite binary string encoding the check still takes polynomial time. Thus a satisfying assignment is a certificate in computational complexity for SAT, proving that SAT belongs to NP. Finding it by exhaustive checking can require candidate Boolean valuations; this enumeration cost is not a lower bound on every possible SAT algorithm.[ref]