A propositional formula over atomic variables has possible truth assignments. Counting how many make the formula true is the heart of many konkur logic problems. You rarely need the full truth table — exploit structure.
Three counting strategies
- Independence / product rule. If the truth value of one sub‑formula is independent of a set of variables, those variables are free: each fixed satisfying pattern of the rest spreads over assignments. Multiply.
- Case split on a shared sub‑formula. When a formula is — every clause shares a head — split on :
- true every clause is automatically true (the other literals are free).
- false each clause collapses to its remaining part , which must all hold. Add the two disjoint counts.
- Complement (count the falsifying ones). For a single clause (a big OR) it is easier to count the one assignment of its literals that makes it false, then subtract.
Key formulas
For a disjunction (clause) of distinct literals over its own variables, exactly one of the literal‑patterns is false (every literal false), so
If of the variables don't appear in the (sub)formula, multiply any count by for the free variables.
Worked mini‑example
Count the satisfying assignments of over (so total). Split on :
| clause 1 | clause 2 | satisfying | |
|---|---|---|---|
| true | always true | forces | free |
| false | forces | always true | free |
The cases are disjoint, so assignments are satisfying (and indeed of — this formula is " and ").
Exam trick: when every clause of a CNF shares a common head , never expand the whole truth table — split once on . The branch frees all the other variables (), and only the small branch needs real work. Adding two disjoint cases beats checking rows.