![]() |
|
|
#1 |
|
Aug 2004
Melbourne, Australia
100110002 Posts |
This problem was proposed by Ian Wanless. It's published in a list of problems from the 21st British Combinatorial Conference: P.J. Cameron, Research Problems from the BCC21, Discrete Mathematics (2009), doi:10.1016/j.disc.2009.04.016
Let For example, when and Conjecture: Always Comment: The conjecture can be formulated in terms of permutation polynomials. It has been verified for |
|
|
|
|
|
#2 | |
|
Nov 2003
22·5·373 Posts |
Quote:
how There may be a purely group-theoretic explanation. Also, what does the word 'single' mean as in 'single cycle'? Clearly consider it to be more than one cycle. May I also suggest that you be careful in using the word 'cycle' in a context that is both number-theoretic and combinatoric. In a number theory sense, a 'cycle' is the full orbit of (the powers of an integer) mod p. It can not contain 0 unless the integer is not co-prime to p. You mean 'cycle' in its combinatoric sense, as a permutation. |
|
|
|
|
|
|
#3 | ||
|
Aug 2004
2·5·13 Posts |
Quote:
Quote:
Chris |
||
|
|
|
|
|
#4 | ||
|
Feb 2005
22×32×7 Posts |
Quote:
Quote:
Last fiddled with by maxal on 2009-05-11 at 12:26 |
||
|
|
|
|
|
#5 |
|
Aug 2004
Melbourne, Australia
100110002 Posts |
Yep, I think maxal and Chris Card have got the correct idea. I spoke to Ian and he wasn't even aware that this had been published. He mentioned this conjecture to me several years ago and I wasn't able to make any progress.
I thought I'd just post a copy of it here, in case anyone was interested. |
|
|
|
|
|
#6 |
|
Apr 2010
2·3·52 Posts |
Note that
Hence This is compatible with the conjecture because p is odd, and odd-length cycles are even permutations. |
|
|
|
|
|
#7 |
|
"Lucan"
Dec 2006
England
194A16 Posts |
|
|
|
|
|
|
#8 |
|
Apr 2010
2×3×52 Posts |
I have written a small ISO C++ program for numerical verification of the conjecture.
The program reads a number p from stdin, checks it for validity (e.g. primality and congruence to 1 or 3 mod 8) and checks by brute force whether Correctness: Consider the cycle decomposition of Unfortunately, I have not found a representation of On 32-bit systems with 256 MBytes available for program data, the program can check primes up to 2^31. On platforms with size_t longer than 32 bits, you can reasonably try p values up to the amount of available RAM, measured in bits. The reason why the program needs O(p) memory is that every iteration needs to evaluate two Jacobi symbols. Instead of calculating them from scratch each time, the program first sets up a table with all Jacobi symbol values and then looks them up during the iteration. The setup goes fast: To enumerate the first n squares, you just need to add the first n odd positive integers. (This is done mod p of course.) While the setup is easy but not very cache-friendly, the lookups made during the iteration happen to reference nearby locations in at least 75% of the time, thus the processor's caches are used efficiently. As a side benefit, the setup can check whether the input number is prime or not, simply by testing if a square has been tabled more than once. (Prime powers are ruled out too because the program marks 0 as a "square" before filling the rest of the table.) Here are some examples, run on my Powerbook G4 (a PPC 7450 @ 1.5 GHz). Lines that begin with $ contain shell (bash) commands. I use Pari/GP to output suitable primes for the program. Code:
$ g++-4.3 -O3 arithperm.cc -o arithperm $ max=100; echo "default(primelimit,$max); \ forprime(p=3,$max,if(((p%8)-(p%4))==0,print(p)))" | gp -q | \ ./arithperm "$max" 3: true 11: true 17: true 19: true 41: true 43: true 59: true 67: true 73: true 83: true 89: true 97: true Code:
$ time echo 100000049 | ./arithperm 100000049: true real 0m11.585s user 0m11.300s sys 0m0.115s Let's test the largest prime below 2^31 that is congruent to 1 or 3 mod 8: Code:
$ time echo 2147483587 | ./arithperm 2147483587: true real 5m46.655s user 5m38.374s sys 0m2.909s I have tried another version of the program that does not use a table and computes Jacobi symbols directly. After all, computing a Jacobi symbol value of two n-bit machine-word integers should need only two additional registers and at most about 2n shifts, subtracts, negations, tests and jumps. With n=32 and zero-cycle branch cost, this should deliver comparable performance to the table-based approach. However, my high-level C++ Jacobi code is about five times slower yet, therefore I present the table-based version here for experiments. For details, look at the source . If you want to check the iteration, uncomment the line containing cerr << in the function permute, recompile, run and input 11 (or whatever you can check). Do not forget to comment out that line and to recompile again before starting larger runs.
|
|
|
|
|
|
#9 |
|
Apr 2010
2·3·52 Posts |
My machine has a 500 kByte (= 4 MBit) L2 cache; therefore I ran the following test:
Code:
$ time echo 4000043 | ./arithperm 4000043: true real 0m0.128s user 0m0.096s sys 0m0.014s On the other hand, on-the-fly computation of Jacobi symbols, as well as the rest of the iteration, can be carried out in registers alone (at least on the PowerPC). Now that would be nice: No memory consumption, and no CPU idling. However, my current code for the "binary" approach to Jacobi symbol computation needs about 6 cycles per bit of the Jacobi symbol operands (2x32) which at 1.5 GHz results in about 250ns per Jacobi symbol, thus more than 500ns per iteration. That is discouraging. For the time being, I recommend using the table-based version I already posted. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Antipodean arithmetic | ewmayer | Science & Technology | 34 | 2015-10-03 01:31 |
| Some arithmetic... | science_man_88 | science_man_88 | 11 | 2014-07-30 22:53 |
| modular arithmetic | science_man_88 | Miscellaneous Math | 42 | 2011-07-26 02:02 |
| Simple Arithmetic! | mfgoode | Puzzles | 82 | 2007-05-02 08:13 |
| Easy Arithmetic | davar55 | Puzzles | 6 | 2007-03-20 17:47 |