# How to interpret the result of treewidth() function.

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!

Congratulations for your first question! Here are a few hints. To display code: select lines of code and click the code-formatting button (the one with "101 010"). Or indent each line of code by four spaces. Try editing your question to do that. Also, usually, don't make your question "community wiki".