Ancestors and graph distance on finite plane trees #
The common ancestor of two addresses is their longest common prefix. The distance is the sum of their depths minus twice that ancestor's depth. The definitions are total on addresses; prefix closure ensures that the common ancestor of present vertices is present too.
Vertex t is only a name for the subtype of present addresses of t. Its metric is the real
cast of the natural distance. No metric or topology instance is introduced on all addresses,
and no separate graph representation is needed.
The natural parent-child distance between two addresses.
Equations
- BGW.PlaneTree.graphDist u v = u.length + v.length - 2 * (BGW.PlaneTree.lca u v).length
Instances For
@[instance_reducible]
The metric on vertices is the real cast of their natural parent-child distance.
Equations
- One or more equations did not get rendered due to their size.