Changing a bit the strategy: instead of eliminating duplicates at each round, it now tries to delete some repeated edges. Maybe not so intelligent, but everything else would make either more complicated or more expensive.