AI Glossary / Graphs and symbolic AI / Advanced

Unit clause

Definition

A unit clause is a clause containing exactly one literal. A literal is an atomic proposition or its negation, so both P and ¬P are unit clauses. In a satisfiable propositional formula containing that clause, the literal must be true: P forces P=true, while ¬P forces P=false.

What it means

A clause combines alternatives using logical OR. In P∨Q, either alternative can satisfy the clause. A unit clause has only one alternative, leaving no choice about how to satisfy it.
“Unit” counts literals, not words in an English sentence or letters in a symbol. A proposition with a descriptive name can still form a unit clause. A negative literal also counts as one literal, despite including a negation sign. This small structural feature is valuable because it exposes a forced assignment during logical reasoning.

How it works

A propositional satisfiability solver often handles formulas in conjunctive normal form: an AND of clauses, each an OR of literals. Every clause must be satisfied. When a unit clause is present, the solver makes its forced assignment and simplifies the rest of the formula.
Clauses already satisfied by that assignment can be removed from the remaining work. Literals made false can be removed from other clauses, potentially creating new units. Repeating this process is unit propagation.
A clause can also become unit under a partial assignment even if it originally contained several literals. This happens when every literal except one unassigned literal is false. If a literal in the clause is already true, the clause is satisfied instead. If all literals are false, the simplified clause is empty and signals a conflict. One unassigned literal alone is therefore insufficient to call a clause unit unless the other literals are false.

Three practical examples

  • A product configurator includes the hard requirement EncryptionEnabled. As a unit clause, it forces that option on in every satisfying configuration under the stated requirement.
  • A scheduling model includes ¬UseRoomA for a particular time because the room is unavailable. The negative unit forces that assignment off rather than expressing an optional preference.
  • A planning problem fixes an initial fact such as RobotAtDock. The unit clause represents an asserted starting condition, which other planning constraints can use to derive further requirements.

Think of it this way

An OR clause is like a list of acceptable ways to meet one requirement. When only one possible way remains, that way must be chosen. If the list becomes empty, the requirement cannot be met under the current choices. The analogy concerns a hard logical requirement, not a recommendation.

Worked example

Consider four Boolean variables P, Q, R, and S, and the formula:
P ∧ (¬P∨Q∨R) ∧ ¬Q ∧ (¬R∨S).
There are initially two unit clauses: P and ¬Q. They force P=true and Q=false. The three-literal clause ¬P∨Q∨R now has its first two literals false, so it reduces to the unit R. Hence R=true.
The remaining clause ¬R∨S then reduces to S, forcing S=true. The only satisfying assignment is P=true, Q=false, R=true, S=true. Checking all sixteen possible assignments confirms that result.
Now add the unit ¬S. It requires S=false, contradicting the value forced by the other clauses. The complete formula has no satisfying assignment; assigning whichever unit was processed last is not a valid repair.
Alternatively, remove ¬Q from the original formula. Four satisfying assignments remain. In particular, P=true, Q=true, R=false, S=false satisfies every remaining clause. The removed negative unit was therefore important: without it, R and S are no longer forced.
This example distinguishes a unit already present in the input from one created by simplification, and shows how a single added or removed requirement can change the solution set.

Illustrative case study

A fictional team builds a configurator for office meeting systems. Its rules describe compatible displays, microphones, and network settings. The sales form adds a unit clause for each mandatory choice, including a requirement that a specific network feature be disabled.
One customer's choices make the formula inconsistent. The team traces a chain of forced assignments and finds that another selected feature requires the disabled network capability. The solver has exposed a conflict among encoded requirements; it has not decided which customer requirement should be changed.
The interface presents the conflicting choices for review and reruns validation after a deliberate change. The team also checks that optional preferences were not accidentally encoded as hard unit clauses. This fictional case illustrates explainable constraint handling, not a measured commercial result.

Common misconceptions and mistakes

A unit clause is not necessarily positive. ¬P is just as much a unit as P.
A clause with one positive literal may contain several negative literals. That makes it a definite clause, but not necessarily a unit clause.
P∨¬P contains opposite literals and is a tautology, not a unit clause. Repeated identical literals such as P∨P can be normalized to P, because repetition adds no alternative.
A unit is not an empty clause. The former forces a literal; the latter cannot be satisfied. Likewise, an empty collection of remaining clauses means every clause has been satisfied, not that a conflict occurred.

Business use

Understanding unit clauses helps teams inspect rules in configuration, scheduling, and planning systems. They make mandatory choices explicit and support concise explanations of forced consequences. Validate the source of each asserted fact: a hard logical requirement is only as appropriate as the business rule or observation it represents. If an input is uncertain, encoding it as an unconditional unit can make the model more confident than its evidence warrants.

People also ask

Is a unit clause an inference rule?

No. It is a kind of clause; unit propagation and unit resolution are reasoning operations involving it.

Can a unit appear later?

Yes, after other assignments simplify a longer clause.

Does the presence of a unit prove satisfiability?

No. Other clauses may conflict with it or remain impossible to satisfy.

Check your understanding

Which units occur initially in the worked example?

Answer: P and ¬Q.

Why does the three-literal clause become R?

Answer: P=true makes ¬P false, and Q is also false.

What does adding ¬S do?

Answer: It makes the complete formula unsatisfiable because S is already forced true by the other requirements.

Related terms

  • Literal
  • Clause
  • Conjunctive normal form
  • Unit propagation
  • Unit resolution
  • Satisfiability
  • Definite clause
  • empty clause
  • Boolean variable

Learn next

Trace unit propagation on a small formula and distinguish an input fact from an assignment forced within a search branch. Then compare unit clauses with Horn clauses and general resolution.

  • Unit propagation

More in Graphs and symbolic AI

  • Type signature - A type signature specifies the types of inputs and outputs associated with a function or operation.
  • UCB1 - UCB1 is a multi-armed bandit algorithm that selects an action using its average observed reward plus an exploration bonus.
  • UCT - UCT is a method for guiding Monte Carlo tree search by applying upper-confidence-bound ideas at decision nodes.
  • Łukasiewicz logic - Łukasiewicz logic is a family of many-valued logics associated with Jan Łukasiewicz.
  • Unary constraint - A unary constraint is a rule that restricts the allowed values of one variable in a constraint satisfaction problem.
  • Unbounded cost search - Unbounded-cost search seeks a valid solution without requiring its cost to fall below a specified threshold or within a specified factor of the best...

Sources

Carnegie Mellon University, Propositional Logic and SAT: https://www.cs.cmu.edu/~15281-s24/coursenotes/proplogic/index.html Marijn Heule, Introduction to Automated Reasoning and Satisfiability, unit propagation: https://www.cs.cmu.edu/~mheule/15816-f19/slides/introduction.pdf AIMA glossary, unit clause: https://github.com/aimacode/aima-glossary

Previous: Unique-names assumption Next: Unit Gompertz distribution

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer