how to know if the given multiway tree is the sub structure of another multiway tree

21 Views Asked by At

Given a big multiway tree A and a small multiway tree B, how can we know if B is a sub-structue of A

1

There are 1 best solutions below

0
On

Finally, I found a python package networkx which can solve my problem

gm = isomorphism.DiGraphMatcher(graph,subgraph, node_match)
gm.subgraph_is_isomorphic()