|
|
|
|
|
by ninetyninenine
357 days ago
|
|
Am I mistaken? Is what you say even possible? Given two graphs one is a tree you cannot determine if the tree is a subgraph of the other graph in one walk through? It’s only possible if you’re given additional information? Like a starting node to search from? I’m genuinely confused? |
|
http://www.nsl.com/papers/samefringe.htm
If you flatten both of your trees/graphs and regard the output as strings of nodes, you reduce your task to a substring search.
Now if you want to verify if the structures and not just the leave nodes are identical, you might be able to encode structure information into you strings.