Recoverability of ancestral recombination graph topologies