networkx 2.8.2 Pypi GitHub Homepage
Other Docs

Treewidth of an undirected graph is a number associated with the graph. It can be defined as the size of the largest vertex set (bag) in a tree decomposition of the graph minus one.

Wikipedia: Treewidth

The notions of treewidth and tree decomposition have gained their attractiveness partly because many graph and network problems that are intractable (e.g., NP-hard) on arbitrary graphs become efficiently solvable (e.g., with a linear time algorithm) when the treewidth of the input graphs is bounded by a constant .

There are two different functions for computing a tree decomposition: treewidth_min_degree and treewidth_min_fill_in .

            <Unimplemented 'footnote' '.. [1] Hans L. Bodlaender and Arie M. C. A. Koster. 2010. "Treewidth\n      computations I.Upper bounds". Inf. Comput. 208, 3 (March 2010),259-275.\n      http://dx.doi.org/10.1016/j.ic.2009.03.008'>
           
            <Unimplemented 'footnote' '.. [2] Hans L. Bodlaender. "Discovering Treewidth". Institute of Information\n      and Computing Sciences, Utrecht University.\n      Technical Report UU-CS-2005-018.\n      http://www.cs.uu.nl'>
           
            <Unimplemented 'footnote' '.. [3] K. Wang, Z. Lu, and J. Hicks *Treewidth*.\n      https://web.archive.org/web/20210507025929/http://web.eecs.utk.edu/~cphill25/cs594_spring2015_projects/treewidth.pdf'>
           

Functions for computing treewidth decomposition.

Functions for computing treewidth decomposition.

Treewidth of an undirected graph is a number associated with the graph. It can be defined as the size of the largest vertex set (bag) in a tree decomposition of the graph minus one.

Wikipedia: Treewidth

The notions of treewidth and tree decomposition have gained their attractiveness partly because many graph and network problems that are intractable (e.g., NP-hard) on arbitrary graphs become efficiently solvable (e.g., with a linear time algorithm) when the treewidth of the input graphs is bounded by a constant .

There are two different functions for computing a tree decomposition: treewidth_min_degree and treewidth_min_fill_in .

            <Unimplemented 'footnote' '.. [1] Hans L. Bodlaender and Arie M. C. A. Koster. 2010. "Treewidth\n      computations I.Upper bounds". Inf. Comput. 208, 3 (March 2010),259-275.\n      http://dx.doi.org/10.1016/j.ic.2009.03.008'>
           
            <Unimplemented 'footnote' '.. [2] Hans L. Bodlaender. "Discovering Treewidth". Institute of Information\n      and Computing Sciences, Utrecht University.\n      Technical Report UU-CS-2005-018.\n      http://www.cs.uu.nl'>
           
            <Unimplemented 'footnote' '.. [3] K. Wang, Z. Lu, and J. Hicks *Treewidth*.\n      https://web.archive.org/web/20210507025929/http://web.eecs.utk.edu/~cphill25/cs594_spring2015_projects/treewidth.pdf'>
           

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/approximation/treewidth.py#0
type: <class 'module'>
Commit: