Construct metric space in which all substructures of both objects
become dimensions on which each object is measured.

Enumerate all substructures within T and U : T* and U*

Example with strings T=aba, U=baac

T* = {a, b, ab, ba, aba}  U*= {a,b,c,ba,aa,ac,baa,aac,baac}


Union those two sets (T*
∪ U*) =Z

Z = {a,b,c,ab,ba,aa,ac,aba,baa,aac,baac}


|Z|-dimensional vector space


z(T) be the number of occurrences of structure z as a substructure of T

a(T) = 2, a(U) = 2

...

ab(T) = 1, ab(U) = 0

etc.... over all strings in Z


Calculate Minkowski distance d(T,U)