Anagram subgraph