Skip to content

Function make_nice_tree_decomposition returns incorrect results for $K_{3}$ and $K_{2, 5}$ #36843

@guojing0

Description

@guojing0

I am implementing homomorphism counting functionality, and noticed that currently the function make_nice_tree_decomposition does not work correctly for $K_{3}$ and $K_{2, 5}$:

graph = graphs.CompleteBipartiteGraph(2, 5)  # replace by `graphs.CompleteGraph(3)` for the triangle
tree_decomp = graph.treewidth(certificate=True)
nice_tree_decomp = make_nice_tree_decomposition(graph, tree_decomp)
root = sorted(nice_tree_decomp)[0]
dir_labelled_TD = label_nice_tree_decomposition(nice_tree_decomp, root)
dir_labelled_TD.plot()

图片

When it's $K_{3}$, it only returns a singleton.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions