Equation For Circular Permutation With Lock