This is the Chinese Remainder Theorem, no?
Henry Rich
On 1/28/2020 9:49 PM, 'Jon Hough' via Programming wrote:
See Modulo Multiplication Group:
https://en.wikipedia.org/wiki/Multiplicative_group_of_integers_modulo_n
http://mathworld.wolfram.com/ModuloMultiplicationGroup.html
Since 11 is prime, its modulo multiplication group has 10 elements (all the
numbers from 1 to 10). i.e. multiplying the elements by any
number in 1 to 10 will permute the elements.
If you used 8, say, instead. 8 is only coprime to 1,3,5,7. So its Modulo
multiplication group has only 4 elements.
If you do
8 | 2 * i.8
you do not get a permutation of the numbers of i.8, because 2 and 8 are not
coprime.
A long time ago I wrote a script to calculate the modulo multiplication group
for arbitrary integers.
https://github.com/jonghough/PermuJ/blob/master/modulomultiplication.ijs
On Wednesday, January 29, 2020, 10:20:12 AM GMT+9, Jimmy Gauvin
<jimmy.gau...@gmail.com> wrote:
Hi,
I am looking for some reference texts on permutations and modular
arithmetic.
I recently stumbled on some interesting properties of card shuffles.
For example, using a deck of 11 cards labeled 0 through 10 and shuffling
them to obtain this layout :
0 6 1 7 2 8 3 9 4 10
There are several ways to find out which position each card occupies .
1) index of
0 6 1 7 2 8 3 9 4 10 i. i.11
0 2 4 6 8 10 1 3 5 7 9
2) grading
/: 0 6 1 7 2 8 3 9 4 10
0 2 4 6 8 10 1 3 5 7 9
3) and computing the positions with modulo
11 | 2*i.11
0 2 4 6 8 10 1 3 5 7 9
Going from the positions to the card layout can also be done several ways :
4) assignment
(i.11) ( 0 2 4 6 8 10 1 3 5 7 9 ) } 11$0
0 6 1 7 2 8 3 9 4 10
5) grading
/: 0 2 4 6 8 10 1 3 5 7 9
0 6 1 7 2 8 3 9 4 10
6) and, this is the kicker for me, modulo with the right multiplier
11 | 6*i.11
0 6 1 7 2 8 3 9 4 10
While 3) is obvious, I find 6) disconcerting. And it seems to work for all
cases where the number of cards and the interval between cards are coprime.
I know this must be explained somewhere but I can't find the relevant
material.
Thanks for your assistance,
Jimmy
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm