Algorithms for efficiently computing structural anonymity in complex networks