relatedness function

Determine pairwise relatedness