added hamming distance between two graphs