How to interpret the result of treewidth() function.
asked 2015-02-24 08:04:39 -0500
This post is a wiki. Anyone with karma >750 is welcome to improve it.
Hi there, I want to generate a random graph and compute the optimal treewidth, also the corresponding decomposition of this graph. Here is my code in sage:
g = graphs.RandomGNM(15, 50) g.show() g.treewidth(certificate=True)
The output as follows: Graph on 7 vertices
I think this result should means in the optimal tree decomposition, there are 7 tree nodes. then my question is how can we get more detail information about which vertex of the graph belongs to which tree node of the decomposition?
Thanks for your attention!