algorithmtreegraph-algorithmisomorphism

Does a subsequence in a tree certificate guarantees it contains given tree?


I am using an algorithm for tree certificates described for example here (p. 24-29).

Let's say I have two trees: A and B, and each tree has it's certificate produced by the algorithm above (C1 and C2).

Is it true, that if C1 contains C2 (exact sequence anywhere), it means A contains B as a subtree (B can be basically concentrated and considered as a leaf node of A)? If not, could you state a counter-example?

--edit--

Algorithm: (please take a look at the linked document for examples):

  1. Label all vertices with string 01

  2. While there are more than 2 vertices in G:

    for each non-leaf x do:

    1. let Y be the set of labels of the leaves adjacent to X and the label of x with initial 0 and trailing 1 deleted from x.
    2. Replace the label of x with the concentration of the labels in Y, sorted in increasing lexicographic orher, with a 0 prepended and a 1 appended.
    3. Remove all leaves adjacent to x.
  3. If there is only one vertex x left, report x's label as the certificate.

  4. If there are 2 vertices x and y left, concentrate x and y in increasing lexicographic order, and report it as the cerfificate.


Solution

  • Yes, it is true.

    Assuming the certificate is correct, there is no possibility a certificate would contain another certificate and it wouldn't be it's subtree.