adding edge set sharing algorithms