Other idea: let's draw a directed graph with probEdge := sqrt(probEdge) and delete all non-mutual edges. This gonna be a bit worse in time complexity, but seems correct and simple.