08 Feb, 2010
Posted by yomcat 16:31 |
Permalink |
comments (2) |
Maths
In this problem, everything is done modulo m.
First, you get the numbers 0, 1, ..., m-1 (in that order). Now, you need to find a permutation, f, of said numbers, such that f(a) - a is also a permutation of said numbers. By magic, you can assume that the first number in the permutation is 0.
For example, when m = 5, 02413 is such a permutation.
Now, the problem:
This only seems to work when m is a prime, and the permutation is generated by f(1). Why?