xfn friends representation

i've been thinking about how a chart might be programatically generated. here is a chart made by hand in inkscape.

note that it starts at my 'home page'. it first discovers all the pages that further describe 'me'. two seperate 'me' pages link to the same friend. how to know that digg/factoryjoe and twitter/factoryjoe are the same person? they are if they 'me' link to each other.