In graph theory, a tree decomposition is a mapping of a graph (mathematics)|graph into a tree (graph theory)|tree that can be used to speed up solving certain problems on the original graph. The treewidth measures the number of graph vertices mapped onto any tree node in an optimal tree decomposition.
While it is NP-hard to determine the treewidth of a graph, many NP-hard combinatorial problems on graphs are solvable in polynomial time when restricted to graphs of bounded treewidth.
In machine learning, tree decompositions are also called junction trees, clique trees, or join trees; they
play an important role in problems like belief propagation|probabilistic inference, constraint satisfaction, query optimization, and matrix decomposition.
The concept of tree decompositions and treewidth was originally introduced by . Later it was rediscovered by and has since been studied by many other authors.