Florent Capelli
CRIL, Université d’Artois
Reasoning Web Summer School
28 August 2026
Representing Boolean functions in a tractable way.
Given a representation of , can we:
is represented as a CNF formula
as a list of models:
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
Old roots in the study of expert systems (MYCIN, DENDRAL…):
Simplest abstraction: facts as propositional variables, knowledge as propositional formulas.
Propositional knowledge base can be seen as a Boolean function.
Natural way of encoding this “knowledge” rarely optimal for computational purposes:
Preprocess a better representation allowing more tractability.
Knowledge base, “natural representation”:
Set of constraints.
Set of models.
| Tires | Type | Electric |
|---|---|---|
| 21C | road | no |
| 21C | gravel | yes |
| 21C | gravel | no |
| 25C | road | no |
| 25C | city | yes |
| 25C | city | no |
| 25C | gravel | yes |
| 25C | gravel | no |
| 32C | city | yes |
| 32C | city | no |
| 32C | gravel | yes |
| 32C | gravel | no |
Diagram.
Despite expert systems being outfashioned, KC is still relevant:
I. An overview of interesting representation languages for Boolean functions.
How to build such representations.
How to prove limits of such representations.
A representation language for Boolean functions:
| Object | Size | Interpretation | |
|---|---|---|---|
| Truth Table |
Variables
List of with |
||
| List of models | Set | iff | |
| CNF Formula | Set of sets of literals |
iff
|
|
| DNF Formula | Set of sets of literals |
iff
|
Query maps Boolean functions and (optional) parameters to a value.
supports query if given and , we can compute in ptime in .
We also say: is tractable for .
Details on board.
“Not supporting” a query is often a conditional statement (e.g. “unless P NP).
Transformation maps Boolean functions and (optional) parameters to another Boolean function.
supports transformation if given and , we can compute such that in ptime in .
We also say: is tractable for .
Details on board.
In many cases, we are able to show that a transformation is not supported unconditionnally.
is more succinct that written if there exists a polynomial such that:
For every , there exists such that:
can succinctly represent everything that can (modulo a polynomial factor).
Early theoretical notion (Cadoli, Liberatore, Schaerf [1]): study the power of precomputation.
Simplified version:
A query is compilable if there exists a language such that:
Observation / Example: if does not have parameter, then it is compilable.
[1] Marco Cadoli, Francesco M. Donini, Paolo Liberatore, and Marco Schaerf. Preprocessing of intractable problems. Information and Computation, 176(2):89 – 120, 2002.
Most interesting queries with parameters are not compilable (unless NP P/poly). [1]
Candidate: does has a model extending ?
If is compilable, then NP P/poly. More precisely, -SAT can be solved with non-uniform polynomial size circuits.
Proof (details on board): by compiling
[1] Marco Cadoli, Francesco M Donini, and Marco Schaerf. Is intractability of non-monotonic reasoning a real drawback? Artificial intelligence, 88(1-2):215–251, 1996.
No representation language fits.
Term coined by Darwiche and Marquis in [1].
Help the practicionner “navigates” languages and their properties using tables.
And now, a guided tour of the Circuit Zoo by David Kahdian, Oliver Broadrick, Renato Geh, and Guy Van den Broeck.
[1]: A. Darwiche and P. Marquis, “A Knowledge Compilation Map,” Journal of Artificial Intelligence Research, vol. 17, pp. 229–264, 2002.
Represent functions by successively testing variables:
is a not model.
is a model.
Read-once: on a path, a variable can be tested at most once.
Both and are models.
Observation: this is a convention. Other popular convention: missing variables are default to (in which case, we call the structure a ZDD).
Variables tested in a fixed order:
: the matrix contains a row of .
Easy when testing row by row ().
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| 1 | 0 | 0 |
Hard when testing col by col ().
FBDD and OBDD support Negation: swap and .
For example, :
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| 1 | 0 | 0 |
Dynamic programming algorithm:
The previous algorithm is wrong: missing variables are not accounted for.
where and
Computing the variables after each gate is a bit costly (set operations). Other algorithm:
Given two OBDD using the same order , we can construct an OBDD computing of size .
Product construction: for in and in , build accepting assignments that are accepted by both and .
if .
Since Negation and Conjunction are supported:
Given two OBDD using the same order , a Boolean operator, we can construct an OBDD computing of size .
We write: .
For a function on and an order on , there is a unique and minimal OBDD computing and respecting .
Iteratively apply two simplifications:
merge twins
remove useless node
OBDD are highly tractable, and have nice properties (minimisation and canonicity).
Many supported queries and transformations not presented:
Not the most succinct data structure however, order is enforcing a lot of structure.
Boolean circuits with:
is not a model.
is a model.
NNF circuits are as succinct as Boolean circuits but not tractable: deciding whether they have a model is NP-complete.
Every -node is decomposable: each input mentions distinct variables.
Given partial assignment , decide whether there is a model of extending .
Conditioning on <>. Satisfiable. Keep going
Conditioning on <𝑥: 0>. Satisfiable. Keep going
Conditioning on <𝑥: 0,𝑦: 0>. Satisfiable. Keep going
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 0>. Satisfiable. Keep going
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 0,𝑤: 0>. Model found.
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 0,𝑤: 1>. Not satisfiable: backtrack
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 1>. Satisfiable. Keep going
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 1,𝑤: 0>. Not satisfiable: backtrack
Conditioning on <𝑥: 0,𝑦: 0,𝑧: 1,𝑤: 1>. Model found.
Conditioning on <𝑥: 0,𝑦: 1>. Not satisfiable: backtrack
Conditioning on <𝑥: 1>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 0>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 0,𝑧: 0>. Not satisfiable: backtrack
Conditioning on <𝑥: 1,𝑦: 0,𝑧: 1>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 0,𝑧: 1,𝑤: 0>. Model found.
Conditioning on <𝑥: 1,𝑦: 0,𝑧: 1,𝑤: 1>. Model found.
Conditioning on <𝑥: 1,𝑦: 1>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 0>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 0,𝑤: 0>. Model found.
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 0,𝑤: 1>. Not satisfiable: backtrack
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 1>. Satisfiable. Keep going
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 1,𝑤: 0>. Model found.
Conditioning on <𝑥: 1,𝑦: 1,𝑧: 1,𝑤: 1>. Model found.
Previous algorithm allows to count the models of in time but may be exponential in .
Can we find the number of models of a given DNNF in polynomial time in ?
[1] Kuldeep S. Meel, Alexis de Colnet, #CFG and #DNNF admit FPRAS. SODA 2026: 5978-6010.
A -gate is deterministic if for inputs of . In this case:
with and .
decDNNF: every -gate is a decision-gate.
Observation: DNNF d-DNNF decDNNF (separation in the last part).
Example:
Application:
Weighted model counting:
Related optimisation problems:
What is the relation between , , etc.?
Commutative semiring :
Example: , , … (check Nina Pardal lecture on Sunday).
Algebraic Model Counting [1] for and on variables :
By changing the semiring, we unify counting and optimisation problems.
[1] Angelika Kimmig, Guy Van den Broeck, and Luc De Raedt. Algebraic model counting. Journal of Applied Logic, 22:46–62, 2017.
If is a smooth d-DNNF, it computes by making arithmetic operations.
Smooth: for , we must have . Details on board.
Correctness depends on determinism but for some semiring, we can drop it if is idempotent:
Typically, , etc. are idempotent: many optimisation problems are tractable on DNNF directly.
Next part: how to build such circuits.
We assume the input is always given as a CNF formula: .
Goal: transform a given CNF formula into a d-DNNF.
To lighten the notations, CNF formulas are denoted as follows:
Example: is denoted by
Current algorithm builds decision trees.
Caching scheme: : CNF Keys such that implies (syntactic).
Cache: Hashmap mapping keys to circuit nodes.
Naive scheme: concatenate clauses written in
increasing lexicographical ordering (Cachet).
Other scheme:
sharpSAT: do not add binary clauses but keep set of
variables (UP should be done before caching).d4: only use modified clausesganak: only store the hash (probabilistic caching, not
correct but works in practice).In practice, the cache may grow too much.
Need for a cleaning strategy:
cachet deletes half of the entries (oldest ones), when
cache full.sharpSAT deletes the less active ones (the one that
have not been used) when X% of the cache is full.d4 scores usefulness by looking at the activity and the
size of the component (smaller components are considered more useful
because more likely to hit).Exhaustive DPLL + Caching builds FBDD. Can we exploit decomposability?
If with then is a decomposable -gate.
Connected components:
At each recursive call, if has more than connected component, recursively compile each independently.
Branch on variables likely to split the formula into balanced disjoint cc.
Heuristics rely on graph theory:
d4: looks for a balanced (hyper)graph separator each
time it branches (NP-hard to compute the optimal but existing
heuristics).sharpSAT-TD: guide heuristics using a precomputed
tree
decomposition.I do love tree decompositions and treewidth, don’t get me started.
Consider the following likely scenario:
Lost in a conflict.
That’s better.
We are using DPLL to see that is UNSAT…
SAT solvers use better algorithm CDCL.
Always check a branch is satisfiable before exploring it.
Bonus: CDCL returns implied clauses, which can be used to later detect unit propagation.
In a nutshell: apply, minimise, apply, minimise, apply…
Apply clause 1 3.
Minimise.
Apply clause 1 2 -3.
Minimise.
Apply clause -2 -3.
Minimise.
Apply clause 2 4.
Minimise.
Pros:
Cons:
Computing optimal order is NP-hard [1]: use heuristics.
Example: Min-Fill.
Rationale: branching on a variable will introduce “new” dependencies. We try to minimize it.
Idea: OBDD is a way of structuring variables in FBDD. Add structure variables in DNNF too?
Structured d-DNNF [1]
Structured along a variable tree (vtree).
Every -gate of the DNNF must split variables accoring to a node of the vtree:
[1] Knot Pipatsrisawat and Adnan Darwiche. New compilation languages based on structured decomposability. In AAAI, volume 8, pages 517–522, 2008.
If respect the same vtree , we can build a circuit for respecting of size at most .
Good news for bottom up compilation?
But not enough:
Both are canonical restrictions of structured d-DNNF: allows for bottom-up compilation.
sdd to
compile into SDD.TiDiDi to compile into TDD (soon available): very good
results at the MC Competition 2026.Some observations:
Let be a Boolean function.
A -subfunction of is a Boolean function on variables defined as: for some .
Of size at most but often smaller.
has two -subfunctions:
and define the same -subfunction.
At least nodes testing .
Let the smallest complete OBDD computing . The decision-gates of testing are in one to one correspondence with .
.
matrix of Boolean variables.
No OBDD for of size less than :
has no OBDD for of size less than :
Origin in communication complexity.
Rectangle cover of is:
Example:
Rectangle cover of is:
(Bova, C., Mengel, Slivovsky) If is computed by a DNNF of size then has a -balanced rectangle cover of size at most .
Observation: If is deterministic, then we can assume the cover to be disjoint.
Details on board.
DNNF :
Details on board.
For a graph , (vertex cover of ).
If is the grid, cannot be covered by less than -balanced rectangles for some .
Corollaries:
(Sauerhoff03) Any disjoint rectangle cover for has size at least for .
Corollary: d-DNNF < DNNF
Main hurdle: finding the right candidate function and prove the rectangle lower bounds. Work from communication complexity brings insights.
d4, Ganak…)sdd, cudd, BuDDy,
TiDiDi).