greedy algorithms, Huffman compression: graph clustering