First, if z and z ′ have different length t = t ′ , let K walk (z, z ′ ) = 0.
for two walks with the same length t = t ′ , we define K walk (z, z ′ ) is the product of the similarity of the pairs of nodes and edges visited along the two walks z and z ′ .