Here are solutions in Gremlin (http://gremlin.tinkerpop.com) with increasing complexity:
- Rank the songs that people like that like the same songs I like?
g.v(1).out('liked').in('liked').out('liked').groupCount.cap
- Rank the songs that people like that like the same songs I like that I don't already like?
g.v(1).out('liked').aggregate(x).in('liked').out('liked').except(x).groupCount.cap
If you want multiple source songs, do:
g.v(1,2,3,4,5,6)._().out('liked').in('liked').out('liked').groupCount.cap
HTH,
Marko.