In graph theory, a tree decomposition is a mapping of a graph into a tree that can be used to define the treewidth of the graph and speed up solving certain computational problems on the graph.

Tree decompositions are also called junction trees, clique trees, or join trees. They play an important role in problems like probabilistic inference, constraint satisfaction, query optimization, and matrix decomposition.

Tree decomposition

The concept of tree decomposition was originally introduced by . Later it was rediscovered by and has since been studied by many other authors.

Tree decomposition

Definition

Intuitively, a tree decomposition represents the vertices of a given graph as subtrees of a tree, in such a way that vertices in are adjacent only when the corresponding subtrees intersect. Thus, forms a subgraph of the intersection graph of the subtrees. The full intersection graph is a chordal graph.

Tree decomposition

Each subtree associates a graph vertex with a set of tree nodes. To define this formally, we represent each tree node as the set of vertices associated with it. Thus, given a graph , a tree decomposition is a pair , where is a family of subsets (sometimes called bags) of , and is a tree whose nodes are the subsets , satisfying the following properties:

The union of all sets equals . That is, each graph vertex is associated with at least one tree node. For every edge in the graph, there is a subset that contains both and . That is, vertices are adjacent in the graph only when the corresponding subtrees have a node in common. If and both contain a vertex , then all nodes of the tree in the (unique) path between and contain as well. That is, the nodes associated with vertex form a connected subset of . This is also known as coherence, or the running intersection property. It can be stated equivalently that if , and are nodes, and is on the path from to , then .

The tree decomposition of a graph is far from unique; for example, a trivial tree decomposition contains all vertices of the graph in its single root node.

A tree decomposition in which the underlying tree is a path graph is called a path decomposition, and the width parameter derived from these special types of tree decompositions is known as pathwidth.

A tree decomposition of treewidth is smooth, if for all , and for all .

Treewidth

The width of a tree decomposition is the size of its largest set minus one. The treewidth of a graph is the minimum width among all possible tree decompositions of . In this definition, the size of the largest set is diminished by one in order to make the treewidth of a tree equal to one. Treewidth may also be defined from other structures than tree decompositions, including chordal graphs, brambles, and havens.

It is NP-complete to determine whether a given graph has treewidth at most a given variable . However, when is any fixed constant, the graphs with treewidth can be recognized, and a width tree decomposition constructed for them, in linear time. The time dependence of this algorithm on is an exponential function of .

Dynamic programming

At the beginning of the 1970s, it was observed that a large class of combinatorial optimization problems defined on graphs could be efficiently solved by non-serial dynamic programming as long as the graph had a bounded dimension, a parameter related to treewidth. Later, several authors independently observed, at the end of the 1980s, that many algorithmic problems that are NP-complete for arbitrary graphs may be solved efficiently by dynamic programming for graphs of bounded treewidth, using the tree-decompositions of these graphs.

As an example, consider the problem of finding the maximum independent set in a graph of treewidth . To solve this problem, first choose one of the nodes of the tree decomposition to be the root, arbitrarily. For a node of the tree decomposition, let be the union of the sets descending from . For an independent set let denote the size of the largest independent subset of such that Similarly, for an adjacent pair of nodes and , with farther from the root of the tree than , and an independent set let denote the size of the largest independent subset of such that We may calculate these and values by a bottom-up traversal of the tree:

where the sum in the calculation of is over the children of node .