Graph Theory & Treewidth

What is treewidth?

The number that says how far a graph is from being a tree.


The one-sentence version

Treewidth is a number, tw(G), that measures how close a graph G is to being a tree. A tree has treewidth 1. A complete graph on n vertices has treewidth n−1. Everything else falls in between, and the position it lands at predicts how hard the graph is to compute over.

The intuition: many hard graph problems become easy on trees, because a tree can be processed leaf-to-root with dynamic programming, carrying only a small amount of state across each edge. Treewidth asks how well an arbitrary graph can be reshaped into a tree without ever bundling too many vertices into a single node.

Why a single number can mean so much

A graph of low treewidth is a tree wearing a small amount of disguise. You can peel the disguise off — find a tree-shaped scaffold whose nodes are small bags of vertices — and then run the same linear-time sweep that works on real trees. The width is the size of the largest bag minus one, so it is literally the amount of state you must carry across the worst cut.

This is why treewidth shows up everywhere from constraint satisfaction to probabilistic inference to quantum-circuit simulation: in each case the running time is exponential in the width and only linear in the size of the graph. The width is the exponent; everything else is a constant factor.

In the thesis

Shadow & Mirror takes treewidth as the universal meter — the same invariant that prices a tensor-network contraction also prices a constraint network and a knowledge graph. The claim is not that these are analogies but that they are the same measurement applied to different substrates.

Questions

Is treewidth the same as the degree of a graph?

No. A star graph has high degree at its center but treewidth 1, because it is already a tree. Treewidth measures branching of structure, not of any single vertex.

What is the treewidth of a tree?

Exactly 1. Trees are the base case the whole notion is built around.

What is the treewidth of a cycle?

2. A cycle is one edge away from a tree, and that single extra connection raises the width by one.

Read the volume (PDF, 895 pp)More in Graph Theory & Treewidth