TOPICS
Search

Treewidth


The treewidth of a graph is one less than the smallest possible maximum bag size among its tree decompositions. Determining the treewidth of an arbitrary graph is an NP-hard problem. However, many NP-hard problems on graphs of bounded treewidth can be solved in polynomial time.

An empty graph has treewidth 0, while a tree or forest containing a graph edge has treewidth 1. Graphs with treewidth at most 2 correspond to series-parallel graphs. Every Halin graph has treewidth 3 (Bodlaender 1988).

The treewidth of a disconnected graph is equal to the maximum of the treewidths of its connected components.

A maximal graph with treewidth k is called a k-tree, while a graph with treewidth <=k are known as partial k-trees.

Graphs with treewidth <=k may be characterized by a finite set of forbidden minors, as summarized in the following table. For the case of <=4, more than 75 minimal forbidden minors of widely varying structures are known (Sanders 1993, Sanders 1995, Chlebiková 2002).

treewidth boundforbidden minors
1C_3
2K_4
3K_5, octahedral graph K_(2,2,2), prism graph P_2 square C_5, Wagner graph M_4
4unknown finite number of minors; at least 75 known

The scramble number is the most powerful known lower bound on the gonality of a graph and satisfies

 kappa(G)<=lambda(G)<=tw(G)<=sn(G)<=gon(G),
(1)

where kappa(G) is the vertex connectivity, lambda(G) is the edge connectivity, sn(G) is the scramble number, and gon(G) is the gonality of G (Harp et al. 2020, Echavarria et al. 2021).

For a graph with treewidth tw(G)=k,

 bt(G)<={k   for k<=2; k+1   for k>=3
(2)

(Dujmovic and Wood 2007), where bt(G) is the book thickness.

Special cases include

tw(K^_)=0
(3)
tw(T)=1
(4)
tw(H)<=3
(5)
tw(C_n)=2
(6)
tw(K_n)=n-1
(7)
tw(K_(m,n))=min(m,n)
(8)
tw(P_m square P_n)=min(m,n),
(9)

where T denotes any tree, H any Halin graph, C_n is a cycle graph, K_n is a complete graph, K_(m,n) is a complete bipartite graph, and P_m square P_n is an m×n grid graph.

Chudnovsky et al. (2026) construct graphs showing that several natural restrictions do not force bounded treewidth. There are fixed positive integers L and t_0 such that, for every positive g and k, some graph G_(gk) contains a K_k minor model whose branch sets are paths, and therefore has treewidth at least k-1. At the same time, G_(gk) has no t_0×t_0 wall or K_(t_0,t_0) as an induced graph minor, has girth at least g, and places every two vertices with vertex degree at least 4 at distance at least 2g. Every induced subgraph of G_(gk) representable as the intersection graph of curves in a half-plane, each with exactly one endpoint on its boundary, has treewidth at most L.

For a fixed planar graph H, let f(H) be the least upper bound on the treewidth of graphs excluding H as a graph minor. If H is a disjoint graph union of cycle graphs and N=|V(H)|, Hatzel et al. (2026) prove

 f(H)=O(N(lnN)^2),
(10)

where O denotes big-O notation. More precisely, if H is a disjoint union of r cycle graphs of length at most l, then an absolute constant c satisfies

 f(H)<=cNln(r+1)+crlnrlnl.
(11)

This improves the general planar-exclusion bound for this family of forbidden graph minors.

The excluded grid theorem relates large treewidth to large grid graph minors. Hajiaghayi (2026) reports a sixth-power bound, up to logarithmic factors, together with a randomized algorithm running in polynomial time and constructing a verified grid-minor model under the treewidth promise. As a consequence, for a fixed minor-monotone graph parameter p satisfying p(Grid_g)>=c_pg^2 with c_p>0, treewidth is bounded by O^~((p(G)+1)^3), where the tilde suppresses logarithmic factors.

For a nonempty finite simple graph G, let a(G) be the least nonnegative integer such that every subgraph H has a graph separator of size at most a(G) whose deletion leaves each connected component with at most 2|V(H)|/3 vertices. Chen (2026) proved the sharp bound

 tw(G)<=4a(G)-2.
(12)

For every integer k>=2, there is a graph with a(G)=k+1 and treewidth 4k+2. Chen (2026) credits ChatGPT 6pro with the improved upper bound and examples approaching its leading constant, and supplies the sharp examples.


See also

Graph Bandwidth, Halin Graph, Pathwidth, Tree, Tree Decomposition, Tree-Independence Number

Explore with Wolfram|Alpha

References

Arnborg, A.; Proskurowski A.; Corneil, D. "Forbidden Minors Characterization of Partial 3-Trees." Disc. Math. 80, 1-19, 1990.Bodlaender, H. "Planar Graphs with Bounded Treewidth." Technical Report RUU-CS-88-14. Utrecht, Netherlands: Department of Computer Science, Utrecht University, 1988.Bodlaender, H. "Treewidth of Graphs." In Encyclopedia of Algorithms (Ed. M.Y. Kao). Boston, MA: Springer, 2014.Bodlaender H. L. "A Tourist Guide Through Treewidth." Acta Cybernetica 11, 1-23, 1993.Chen, R. "Treewidth and Separation Number: An Optimal Linear Bound." 16 Nov 2026. https://arxiv.org/abs/2611.20777.Chlebiková, J. "The Structure of Obstructions to Treewidth and Pathwidth." Disc. Appl. Math. 120, 61-71, 2002.Chudnovsky, M.; Fischer, D.; Hajebi, S.; Spirkl, S.; and Walczak, B. "A Simple Layered-Wheel-Like Construction." Elec. J. Combin. 33, P3.52, 2026. https://doi.org/10.37236/14609.Dujmovic, V. and Wood, D. R. "Graph Treewidth and Geometric Thickness Parameters." Disc. Comput. Geom. 37, 641-670, 2007.Echavarria, M.; Everett, M.; Huang, R.; Jacoby, L.; Morrison, R.; Weber, B. "On the Scramble Number of Graphs." 29 Mar 2021. https://arxiv.org/abs/2103.15253.Fomin F. V. and Villanger I. "Treewidth Computation and Extremal Combinatorics." Combinatoria 32, 289-308, 2012.Hajiaghayi, M. "A Polynomial-Time Sixth-Power Excluded Grid Theorem." 12 Nov 2026. https://arxiv.org/abs/2611.16755.Harp, M.; Jackson, E.; Jensen, D.; and Speeter, N. "A New Lower Bound on Graph Gonality." 1 Jun 2020. https://arxiv.org/abs/2006.01020.Harvey, D. J. and Wood, W. R. "Parameters Tied to Treewidth." J. Graph Th. 84, 364-385, 2017.Hatzel, M.; Liu, C.-H.; Reed, B.; and Wiederrecht, S. "Bounds on Treewidth via Excluding Disjoint Unions of Cycles." Elec. J. Combin. 33, P4.8, 2026. https://doi.org/10.37236/13735.Ramachandramurthi, S. "The Structure and Number of Obstructions to Treewidth." SIAM J. Disc. Math. 10, 1997.Robertson, N. and Seymour, P. D. "Graph Minors III: Planar Tree-Width." J. Combin. Th., Ser. B 36, 49-64, 1984.Sanders, D. P. "Linear Algorithms for Graphs of Tree-Width at Most Four. Program of Algorithms, Combinatorics, and Optimization." PhD thesis. Atlanta, GA: Georgia Institute of Technology, June 1993.Sanders, D. P. "On Linear Recognization of Tree-Width at Most Four." SIAM J. Disc. Math. 9, 101-117, 1995.Satyanarayana, A. and Tung, L. "A Characterization of Partial 3-Trees." Networks 20, 299-322, 1990.

Referenced on Wolfram|Alpha

Treewidth

Cite this as:

Weisstein, Eric W. "Treewidth." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Treewidth.html

Subject classifications