22

Does anybody know of an open-source program for computing Tree decomposition of graphs for a fixed "k"(width)? I know that the problem of finding Tree-Decomposition is NP-Hard for variable "k", but my input instances will be really small (~10 nodes) and "k" is fixed.

Kaveh
  • 21,577
  • 8
  • 82
  • 183
  • 1
    Meta discussion: http://meta.cstheory.stackexchange.com/questions/1101/questions-about-finding-code-for-algorithms. Please visit the meta site before posting any answers - I'm questioning whether this question is in scope or not. – Suresh Venkat Apr 13 '11 at 04:59

5 Answers5

22

Some of these software might help you. (Not all of them are open-source though.)

*TreeD http://www.itu.dk/people/sathi/treed/

*dlib http://dlib.net/

*QuickBB http://www.cs.washington.edu/homes/vgogate/quickbb.html

*Hypertree http://www.dbai.tuwien.ac.at/proj/hypertree/downloads.html

*LibTW http://www.treewidth.com/treewidth/

Gamow
  • 5,772
  • 6
  • 25
  • 39
Snowie
  • 1,200
  • 7
  • 10
7

If $n \sim 10$ and $k$ is fixed, then you can even afford to go with an XP algorithm like the one we implemented for our Android app. The source code is here: TreewidthInspector, and for instance with $n \leq 13$ and $k \leq 4$ it terminates in less than a second.

It's approximately 170 lines of code and it's GPL (or MIT or BSD or whatever you should need).

Pål GD
  • 550
  • 4
  • 16
5

For $n\le150$ you can use the webservice over at http://treedecompositions.com/ to directly obtain and visualize a quick and reasonable decomposition, without having to compile or install anything.

Fasermaler
  • 265
  • 2
  • 5
5

LibTW can still be found. It's at http://www.treewidth.com/treewidth/ .

Mathijs
  • 161
  • 1
  • 1
2

You may also be interested in the more modern algorithms FlowCutter (GitHub) and the algorithms by Tamaki et al. (GitHub)

delete000
  • 818
  • 8
  • 16