graph-toolkit
    Preparing search index...

    Function treewidth

    • Exact treewidth by dynamic programming over vertex subsets, $O(2^k \cdot k^3)$ time and $O(2^k)$ memory for the largest connected component of $k$ vertices; edge directions and loops are ignored. Throws a GraphError when a component exceeds maxVertices — use treewidthUpperBound for big graphs. Accepts { signal } to cancel long runs.

      Parameters

      Returns number