Normalized hamming distance between two strings