cs671 HW3 fixed permutation