![]() ![]() We're not trying to find out if two graphs are equal. Note that this isn't an isomorphism problem for labeled graphs. We define an equivalence relation this way: two nodes are equal if they contain the same value, they have the same number of outgoing edges, and, recursively, the subgraphs reachable from the two nodes following the outgoing edges in order are equal.Īs I explain further below, it's also OK but not a requirement for nodes to be equal if following their edges produces the same sequence of values. (That is, it's a k-ary tree, if such a term can be used for a cyclic structure). N, where N is the number of outgoing edges from the node). The outgoing edges of a node are ordered (or labeled 1, 2, 3. Nodes are not labeled, and different nodes can contain the same value. We have a directed graph, which can be cyclic, where each node contains a value. but it runs in quadratic time, making it impractical to use except for very small graphs. ![]() With some simplifying assumptions, a simple algorithm will also calculate hashes for nodes in a cyclic graph. ![]() Andrew Wilcox Asks: Is it possible to compute an equality hash for nodes in a *cyclic* directed graph in less than quadratic time?Ĭalculating hashes for nodes in an acyclic graph is well known using a Merkle tree. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |