permute_ancestors

function permute_ancestors(a:Integer[_]) -> Integer[_]

Permute an ancestry vector to ensure that, when a particle survives, at least one of its instances remains in the same place.