Constraint hypergraph 2026-10-31
The hypergraph whose vertices are the variables of a constraint satisfaction problem and whose hypergraph edges are its constraint scopes. Several constraints can have the same scope. An incidence drawing uses extra scope nodes for display; these do not become extra variables of the original problem. Ordinary treewidth of a constraint hypergraph refers to treewidth of its primal graph, equivalently to a tree decomposition covering each whole scope, not to generalized hypergraph width measures.
Use the ordinary treewidth of the primal graph of the constraint hypergraph: two variables are adjacent whenever they occur together in an all-different constraint. Equivalently, a tree decomposition of this constraint hypergraph has a bag containing every constraint scope, together with the running-intersection requirement for each variable. This is distinct from taking the treewidth of its incidence drawing.
Every constraint scope is contained in its own bag, and every variable occurs. The nontrivial running-intersection checks are: occurs along ; along the connected branches ; along ; along ; and along . Each of the other variables occurs in just one bag. This is therefore a valid tree decomposition of width .
Conversely, any of the original three-variable constraint scopes forms a clique of size three in the primal graph. Such a clique must be contained in one bag of every tree decomposition, forcing width at least two. The upper and lower bounds agree:
The constraint hypergraph has one vertex for each of and one hypergraph edge for each constraint scope:Here abbreviates . These five scopes follow the corrected source.[ref]
Intelligent Systems examination paper by the University of Oxford (2015). Printed p. 4, corrected Question 3(b), constraints (1)–(5)
The diagram uses the incidence representation: round nodes are the original variables, square nodes represent hypergraph edges, and a joining line means that the variable belongs to that constraint scope. The square nodes are not extra variables of .In particular, the central pattern involving forms a cycle through three constraint scopes; the scopes cannot themselves simply be joined into a valid tree decomposition without an additional bag.
Primal graph 2026-10-31
The graph with one vertex per variable and an edge between distinct variables occurring in a common constraint scope. Each hypergraph edge of the constraint hypergraph becomes a clique. A constraint satisfaction problem consisting only of all-different constraints on a common constraint domain is exactly a proper graph colouring problem on this primal graph.

