write tests to confirm that initialPermutation is finalPermuation^-1