# Approximating TreeWidth

Today’s post is about TreeWidth. When I first came across treewidth, I became an instant fan.

Definition : A tree-decomposition of a graph $G(V,E)$ is a pair $(\{X_i | i \in I \}, T=(I,F))$ where $\{X_i | i \in I \}$ is a family of subsets of $V$, one for each node of $T$, and $T$ is a tree such that :

• The union of the sets $X_i$ is equal to $V$.
• for all edges $(v,w) \in E$, there exists an $i \in I$ with $v \in X_i$ and $w \in X_i$.
• for all $i,j,k \in I$ : if $j$ is on the path from $i$ to $k$ in $T$, then $X_i \cap X_k \subseteq X_j$.

The treewidth of a tree-decomposition is $max_{i \in I}|X_i| - 1$. The treewidth of a graph $G$ is the minimum treewidth over all possible tree-decompositions of $G$.

Following are some interesting facts :

• Exercise : TreeWidth of a tree is 1.
• Exercise : TreeWidth of a clique on $n$ vertices in $n-1$.
• Determining whether treewidth of a given graph is at most $k$ is NP-complete.
• See [BGHK’95] for interesting applications of treewidth Eg : Choleski factorization on sparse symmetric matrices.
• There is an analogous notion of pathwidth which is also NP-complete.

Approximating tree-width : Bodlaender et. al [BGHK’95] presented an $O({\log}n)$ factor approximation algorithm for treewidth. This also gives an $O({{\log}^2}n)$ factor approximation algorithm for pathwidth. Their algorithm works by repeatedly finding vertex separators and uses Leighton-Rao’s algorithm at its heart. The main insights from their paper are as follows :

• If there is a factor $\alpha$ approximation algorithm for vertex separator then there is an $O(\alpha)$ approximation algorithm for treewidth.
• if there is a factor $\beta$ approximation algorithm for treewidth then there is an $O(\beta{\log}n)$ approximation algorithm for pathwidth.

In 1995 the best known approximation factor for vertex separator was $O({\log}n)$. Feige, Hajiaghayi and Lee [FHL’2008] improved this to $O(\sqrt{{\log}n})$. Hence we have $O(\sqrt{{\log}n})$ and $O(\sqrt{{\log}n}{\cdot}{\log}n)$ factor approximation factors for treewidth and pathwidth respectively.

Special cases : What about computing treewidth of restricted classes of graphs ?

• When $k$ is any fixed constant, the graphs with treewidth $k$ can be recognized, and a width $k$ tree decomposition can be constructed for them, in linear time [Bodlaender’96].
• Seymour and Thomas [ST’] showed that branchwidth of planar graphs can be computed in polynomial time. This implies a factor 3/2 approximation for treewdith of planar graphs.

Bounded TreeWidth : If the treewidth of a graph $G$ is bounded by some fixed constant $k$, then several problems (that are NP-hard (even PSPACE-hard) for general graphs) can be solved in polynomial-time and often linear time !! Some of them include Maximum Independent set (hence maximum Clique), Hamiltonian cycle, Graph Isomorphism. Instead of listing all these problems, lets look at the following awesome theorem.

Courcelle’s Theorem : Any property of graphs definable in monadic second-order logic (MSO2) can be decided in linear time on any class of graphs of bounded tree-width. In other words, MSO2 is fixed-parameter tractable on any such class of graphs.

More information about Courcelle’s theorem can be found in this book. A recent paper (appeared today on arXiv) proved the following lower bound.
Theorem [KT’2010] : If C is any class of graphs which is closed under taking sub-graphs and whose tree-width is not bounded by a poly-logarithmic function then MSO2-model checking is intractable on C (under suitable assumptions from complexity theory)
There are several open problems related to treewidth, pathwidth, branchwidth and the related cops-robber games. Following are some that interest me :

Open Problems :

• Perhaps the most interesting open question is to obtain a constant factor approximation for treewidth.
• Bodlaender et. al ruled out absolute approximation algorithm, (unless P = NP) for treewidth and pathwidth. This is the best known hardness. Can we even rule out PTAS for treewidth ? Note that the hardness of treewidth implies the hardness of vertex separator (with constant factor blow-up).
• How hard is computing treewidth of planar graphs ? NP-hardness is not known. Many researchers I talked to, believe that treewidth of planar graphs can be computed in polynomial-time.
• Can the lower bound from [KT’2010] be improved ? In this context, it is interesting to note that Maximum Independent Set can be solved in polynomial time even when the treewidth is bounded by $O({\log}n)$.
• Datta et. al [DLNTW’2009] showed that planar graph isomorphism is in logspace. Is isomorphism for graphs with bounded treewidth in logspace ? I asked this question to some researchers, and this seems to be an open problem.

References :

• [BGHK’95] Hans L. Bodlaender, John R. Gilbert, Hjálmtyr Hafsteinsson, Ton Kloks: Approximating Treewidth, Pathwidth, Frontsize, and Shortest Elimination Tree. J. Algorithms 18(2): 238-255 (1995)
• [Bodlaender’96] Bodlaender, Hans L. : A linear time algorithm for finding tree-decompositions of small treewidth. SIAM Journal on Computing 25 (6): 1305–1317 (1996)
• [KT’2010] Stephan Kreutzer, Siamak Tazari Lower Bounds for the Complexity of Monadic Second-Order Logic arXiv:1001.5019

• [FHL’2008] Uriel Feige, MohammadTaghi Hajiaghayi, James R. Lee: Improved Approximation Algorithms for Minimum Weight Vertex Separators. SIAM J. Comput. 38(2): 629-657 (2008)
• [ST’90] PaulD.Seymour and Robin Thomas : Call Routing and the Ratcacher. Combinatorica 14(2): 217-241 (1994)
• [DLNTW’2009] Samir Datta, Nutan Limaye, Prajakta Nimbhorkar, Thomas Thierauf, Fabian Wagner: Planar Graph Isomorphism is in Log-Space. IEEE Conference on Computational Complexity 2009: 203-214

## 12 thoughts on “Approximating TreeWidth”

1. András Salamon |

Regarding your last question, see the STACS 2010 paper Restricted Space Algorithms for Isomorphism on Bounded Treewidth Graphs for a nice summary of the state of the art. In particular, answering your question, the authors show that the problem of deciding isomorphism of graphs with bounded treewidth is in LogCFL, which is in L (and therefore P). This improves the previous bound of $TC^1$ by Grohe and Verbitsky in 2006.

• András Salamon |

To correct my statement above: L $\subseteq$ NL $\subseteq$ LogCFL $\subseteq$ P. So the problem remains open, with the gap slightly smaller than before.

2. kintali |

Thanks for pointing out the STACS paper.

3. David Wood |

Can the 3/2-approximation for computing the treewidth of planar graphs be generalised for other minor-closed classes? In particular, for each t is there a constant c_t such that there is a c_t-approximation algorithm for computing the treewidth of graphs with no K_t-minor?

This question seems closely related to separators in graphs with no K_t-minor [Alon-Seymour-Thomas JAMS, Reed-Wood T.Alg, Kawarabayashi-Reed FOCS ’10].

4. subhasis thakur |

Can you give some reference on “Many researchers I talked to, believe that treewidth of planar graphs can be computed in polynomial-time.”?

5. alessandro |

hi
i’m using treewidth to compute and edge coloring of graph of bounded arboricity. i’m looking for some classes of graphs with treewidth bounded from O(log n) or or more generally with sublinear bound…
do you know anything about that?
anyway tnx for your post, i think you’ve made a complete and smart presentation of the argument.
🙂

6. J |

Is the tree width of a graph on $n$ vertices upper bounded by the tree width of clique on $n$-vertices? Also how does tree width behave with respect to the disjunctive product?

• kintali |

— Yes.
— What is the disjunctive product of graphs ?
{"ft_lang_label":"__label__en","ft_lang_prob":0.87492746,"math_prob":0.9700913,"size":7042,"snap":"2020-34-2020-40","text_gpt3_token_len":1693,"char_repetition_ratio":0.1501847,"word_repetition_ratio":0.04074402,"special_character_ratio":0.22522011,"punctuation_ratio":0.118287936,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.998274,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-24T14:43:27Z\",\"WARC-Record-ID\":\"<urn:uuid:1cbb3fd2-67db-4b83-b4ce-498fa687e75f>\",\"Content-Length\":\"96318\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:35d5053c-2700-4be9-9aae-a9b7a581f746>\",\"WARC-Concurrent-To\":\"<urn:uuid:25355c2a-b416-4e25-87c4-0e2814b0acef>\",\"WARC-IP-Address\":\"192.0.78.12\",\"WARC-Target-URI\":\"https://kintali.wordpress.com/2010/01/28/approximating-treewidth/?replytocom=597\",\"WARC-Payload-Digest\":\"sha1:5NKYYP7IL2RUUZ4QXTY4VHUP5PKIN4GV\",\"WARC-Block-Digest\":\"sha1:R5G2EL4222R5MNYMCMLYC3E4IGVZVBDU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400219221.53_warc_CC-MAIN-20200924132241-20200924162241-00104.warc.gz\"}"}