An Improvement of Reed’s Treewidth Approximation

  • Conference paper
  • First Online:
WALCOM: Algorithms and Computation (WALCOM 2021)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12635))

Included in the following conference series:

Abstract

We present a new approximation algorithm for the treewidth problem which constructs a corresponding tree decomposition as well. Our algorithm is a faster variation of Reed’s classical algorithm. For the benefit of the reader, and to be able to compare these two algorithms, we start with a detailed time analysis for Reed’s algorithm. We fill in many details that have been omitted in Reed’s paper. Computing tree decompositions parameterized by the treewidth k is fixed parameter tractable (FPT), meaning that there are algorithms running in time O(f(k)g(n)) where f is a computable function, g(n) is polynomial in n, and n is the number of vertices. An analysis of Reed’s algorithm shows \(f(k) = 2^{O(k \log k)}\) and \(g(n) = n \log n\) for a 5-approximation. Reed simply claims time \(O(n \log n)\) for bounded k for his constant factor approximation algorithm, but the bound of \(2^{\varOmega (k \log k)} n \log n\) is well known. From a practical point of view, we notice that the time of Reed’s algorithm also contains a term of \(O(k^2 2^{24k} n \log n)\), which for small k is much worse than the asymptotically leading term of \(2^{O(k \log k)} n \log n\). We analyze f(k) more precisely, because the purpose of this paper is to improve the running times for all reasonably small values of k.

Our algorithm runs in \(\mathcal {O}(f(k)n\log {n})\) too, but with a much smaller dependence on k. In our case, \(f(k) = 2^{\mathcal {O}(k)}\). This algorithm is simple and fast, especially for small values of k. We should mention that Bodlaender et al. [2016] have an asymptotically faster algorithm running in time \(2^{O(k)} n\). It relies on a very sophisticated data structure and does not claim to be useful for small values of k.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Amir, E.: Approximation algorithms for treewidth. Algorithmica 56(4), 448–479 (2010)

    Article  MathSciNet  Google Scholar 

  2. Arnborg, S., Corneil, D.G., Proskurowski, A.: Complexity of finding embeddings in a \(k\)-tree. SIAM J. Algebraic Discret. Methods 8, 277–284 (1987)

    Article  MathSciNet  Google Scholar 

  3. Bertele, U., Brioschi, F.: On non-serial dynamic programming. J. Comb. Theory Ser. A 14(2), 137–148 (1973)

    Article  MathSciNet  Google Scholar 

  4. Bodlaender, H.L.: A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)

    Article  MathSciNet  Google Scholar 

  5. Bodlaender, H.L.: Discovering treewidth. In: Vojtáš, P., Bieliková, M., Charron-Bost, B., Sýkora, O. (eds.) SOFSEM 2005. LNCS, vol. 3381, pp. 1–16. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-30577-4_1

    Chapter  Google Scholar 

  6. Bodlaender, H.L., Drange, P.G., Dregi, M.S., Fomin, F.V., Lokshtanov, D., Pilipczuk, M.: A \(\cal{O}(c^k\, n)\) 5-approximation algorithm for treewidth. SIAM J. Comput. 45(2), 317–378 (2016)

    Article  MathSciNet  Google Scholar 

  7. Courcelle, B.: The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Inf. Comput. 85(1), 12–75 (1990)

    Article  MathSciNet  Google Scholar 

  8. Feige, U., Hajiaghayi, M.T., Lee, J.R.: Improved approximation algorithms for minimum weight vertex separators. SIAM J. Comput. 38(2), 629–657 (2008)

    Article  MathSciNet  Google Scholar 

  9. Flum, J., Grohe, M.: Parameterized Complexity Theory. TTCS. Springer, Heidelberg (2006). https://doi.org/10.1007/3-540-29953-X

    Book  MATH  Google Scholar 

  10. Halin, R.: S-functions for graphs. J. Geom. 8(1–2), 171–186 (1976)

    Article  MathSciNet  Google Scholar 

  11. Lagergren, J.: Efficient parallel algorithms for graphs of bounded tree-width. J. Algorithms 20(1), 20–44 (1996)

    Article  MathSciNet  Google Scholar 

  12. Reed, B.A.: Finding approximate separators and computing tree width quickly. In: Proceedings of the Twenty-Fourth Annual ACM Symposium on Theory of Computing, pp. 221–228. ACM (1992)

    Google Scholar 

  13. Robertson, N., Seymour, P.D.: Graph minors. III. Planar tree-width. J. Comb. Theory Ser. B 36(1), 49–64 (1984)

    Article  MathSciNet  Google Scholar 

  14. Robertson, N., Seymour, P.D.: Graph minors. XIII. The disjoint paths problem. J. Comb. Theory Ser. B 63(1), 65–110 (1995)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mahdi Belbasi .

Editor information

Editors and Affiliations

A Appendix

A Appendix

The following is the proof of Lemma 1.

Proof

If a node x is not a strong centroid with respect to W, then let \(C_x\) be the set of vertices in the unique connected component of \(G-B_x\) containing more than \(\frac{1}{2}|W \setminus B_x|\) vertices of X. In the forest obtained from the tree \(\mathcal {T}\) by removing x, there is a tree \(\mathcal {T}_x\) with the property that the union of all bags in \(\mathcal {T}_x\) contains all the vertices of \(C_x\).

Now, we define a set F of directed tree edges by \((x,y) \in F\), if all the following conditions hold:

  • x is not a centroid

  • y is a neighbor of x in \(\mathcal {T}\),

  • y is a node in \(\mathcal {T}_x\).

Now we show that there is a node x with out-degree 0 in \((V_{\mathcal {T}}, F)\). Such an x is a centroid, and we are done. Otherwise, F contains (xy) and (yx) for some \(x,y \in V_{\mathcal {T}}\). W.l.o.g., \(B_y = B_x\cup \{v\}\) for some \(v\in V\setminus B_x\). Note that \(\mathcal {T}_x\) and \(\mathcal {T}_y\) are disjoint. Furthermore, any vertex that is in a bag of \(\mathcal {T}_x\) and in a bag of \(\mathcal {T}_y\) is also in \(B_x\) and \(B_y\). Thus also \(C_x\) and \(C_y\) are disjoint.

Furthermore, \(|W\cap C_x|>\frac{1}{2}|W\setminus B_x|\) implies \(|W \cap C_x|>|W \cap C_y|\), because \([W \cap C_y] \subseteq [W \setminus B_x]\). Likewise, \(|W \cap C_y|>\frac{1}{2}|W\setminus B_y|\) implies \(|W \cap C_y| > |W \cap (C_x\setminus \{v\})|\), because \([W\cap (C_x \setminus \{v\})]\subseteq [W\setminus B_y]\). Thus we have \(|W \cap C_x|>|W \cap C_y|>|W\cap (C_x \setminus \{v\})|\). Since these are all integers, and the difference between the first and the last number is at most 1, it is a contradiction. Hence, there exists a node x which is a strong centroid.

Now, we present the pseudocodes of Sect. 3.3.

figure d
figure e
figure f

1.1 A.1 The Correctness of Reed’s Algorithm

If the treewidth is at most \(k-1\), then there is a good tree decomposition of G of width \(k-1\). Let x be a centroid in it. The connected components of \(G[V \setminus B_x]\) can be partitioned into 2 parts L and R, such that no part has more than \(\frac{2}{3} |V|\) vertices.

Note that for the correctness proof, we do not have to find this tree decomposition. It is sufficient to know that it exists. We can assume, that we have fixed such a tree decomposition, a centroid x and the sets L and R.

We know that the set \(W'\) is partitioned into parts in L, the separator \(S=B_x\), and R.

One of the many branches of the procedure Separation(Gk) will try this partition of \(W'\) and will succeed. First, it decides which part of \(W'\) goes into S, one vertex v at a time. This vertex v is removed from G, but otherwise, we still consider the same tree decomposition. \(|B_x|\) has now decreased by 1, as v is removed from it.

We then consider the case that none of the remaining vertices in \(W'\) are in the separator. Now the weight of each part is at most \((\frac{2}{3} + \frac{1}{24}) n\) as at most k small subtrees can have some of their vertices on the wrong side. And this is at most k times at most \(\frac{n}{24k}\).

On the branch of the procedure Separation(Gk) which finds this partition of \(W'\), there is the separator \(B_x\) of size at most k between X and Y. Our algorithm cannot guarantee to find this separator \(B_x\), but it will find some separator S of size at most k between X and Y. Again up to \(\frac{1}{24} n\) vertices can be on the other side than their representatives. Now the larger side can contain at most \((\frac{2}{3} + 2 \cdot \frac{1}{24}) n = \frac{3}{4} n\) vertices. Thus we have a somewhat balanced partition (a constant fraction on each side).

The overall algorithm can alternate between splitting W as in the \(O(2^{3k} n^2)\) algorithm and splitting V. Now W can be of size at most 6k. On each side, we have at most \((\frac{2}{3} \cdot 6k) = 4k\). Splitting by W as well as splitting by V adds k to the separator. Thus, we are back at 6k. The constructed tree decomposition has then width at most 7k. But we show that this can be actually a 5-approximation algorithm. We do not need to alternate between splitting W and V. Splitting V is a costly procedure. We can do it only after every \(\log _{\frac{3}{2}}{k}\) steps and we still spend \(\mathcal {O}(n\log {n})\) time.

We start with W of size at most 4k (3k and \(k_{excess}\) as excess). Initially, \(k_{excess} = k\). Each time we split W, we get \(|W| \le \frac{2}{3}\cdot 3k + \underbrace{k}_{\text {adding separator}} + \frac{2}{3}k_{excess} = 3k +\frac{2}{3} k_{excess}\), and then update \(k_{excess} \leftarrow \lfloor \frac{2}{3}k_{excess}\rfloor \). The excess drops by a factor of \(\frac{2}{3}\). After \(\log _{\frac{3}{2}}{k}\) many steps, the excess becomes zero and then we can split by V, where |W| becomes \(\le 4k\) again (3k was the size of W before this step, and when we split by V, we have to include the separator as well). In the end, we end up with \(|W| \le 4k\) and we add the separator to the root bag, which means the largest bag has size at most 5k. Therefore, it is a 5-approximation algorithm. Reed mentions 5k in his paper but he does not bother himself giving the details. We think based on what it has been described in Reed’s algorithm, it seems we should have 7k. However, if splitting by V does not happen very often, we can achieve 5k.

Lemma 5

Assume \(0 < \epsilon \le \frac{1}{2}\), \(0<c' \le c\), \(2 \le k\), and \(n_1 + n_2 =n\). Then the recurrence

$$ f(n+k) \le {\left\{ \begin{array}{ll} c' (n+k) &{} \text{ if } n \le 4k \\ f(n_1 + k) + f(n_2 + k) + c (n+k) &{} \text{ otherwise, } \end{array}\right. } $$

where \(\frac{1}{2} n \le n_1 \le (1 - \epsilon )n\) has a solution with \( f(n+k) \le \frac{c}{\epsilon } n \ln n - ck \), for \(n \ge 2k\).

Proof

Case 1: \(2k \le n \le 4k\). Then \(n \ge 4\) and

$$\begin{aligned} f(n+k) \le c(n+k)< 2cn - ck < \frac{c}{\epsilon } n \ln n - ck. \end{aligned}$$

Case 2: \(n \ge 4k\) and \(n_2 \ge 2k\).

$$\begin{aligned} f(n+k)\le & {} f(n_1 + k) + f(n_2 + k) + c (n+k) \\\le & {} \frac{c}{\epsilon } \left( n_1 \ln n_1 + (n - n_1) \ln (n - n_1) \right) - 2ck + c (n+k) \\\le & {} \frac{c}{\epsilon } (1 - \epsilon ) n (\underbrace{\ln (1-\epsilon )}_{< - \epsilon } + \ln n) + \epsilon n (\ln \epsilon + \ln n) + c (n-k) \\< & {} \frac{c}{\epsilon } n \ln n - c (1-\epsilon ) n + c n \ln \epsilon + c (n-k) \\\le & {} \frac{c}{\epsilon } n \ln n - cn + c \epsilon n + c n \ln \epsilon + c (n-k) \\\le & {} \frac{c}{\epsilon } n \ln n + (\underbrace{\epsilon \; \; \; + \; \; \, \ln \epsilon }_{< 0 \text{ for } \epsilon \le \frac{1}{2}}) \, cn - ck \\\le & {} \frac{c}{\epsilon } n \ln n - ck \end{aligned}$$

Case 3: \(n \ge 4k\) and \(n_2 = n - n_1 < 2k\).

$$\begin{aligned} f(n+k)\le & {} f(n_1 + k) + f(n_2 + k) + c (n+k) \\\le & {} \frac{c}{\epsilon } n_1 \ln n_1 - ck + c'(n_2 + k) + c (n+k) \\\le & {} \frac{c}{\epsilon } (1 - \epsilon ) n (\ln (1-\epsilon ) + \ln n) - ck + c'(n_2 + k) + c (n+k) \\< & {} \frac{c}{\epsilon } (1 - \epsilon ) n (-\epsilon + \ln n) - ck + c'(n_2 + k) + c (n+k) \\\le & {} \frac{c}{\epsilon } n \ln n - ck - cn \ln n - c (1 - \epsilon ) n + c'(n_2 + k) + c (n+k) \\< & {} \frac{c}{\epsilon } n \ln n - ck \end{aligned}$$

The last inequality is true, because \(n \ge 4k \ge 8\) implying \(\ln n >2\).

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Belbasi, M., Fürer, M. (2021). An Improvement of Reed’s Treewidth Approximation. In: Uehara, R., Hong, SH., Nandy, S.C. (eds) WALCOM: Algorithms and Computation. WALCOM 2021. Lecture Notes in Computer Science(), vol 12635. Springer, Cham. https://doi.org/10.1007/978-3-030-68211-8_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-68211-8_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-68210-1

  • Online ISBN: 978-3-030-68211-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation