alternating_inversion