I've just begun to use Magma (software). I have several questions.
I am trying to change the columns of a 9x18 matrix according to Random(Sym18). the Random gives me a permutation like p=(1,2,3)(6,9,12,11,7)(8,17)(15,13,4). and I want this permutation act on my matrix. How can I do this?
I find the magma documentation to be thorough but hard to search. Google usually does a good job:
https://www.google.com/search?q=site%3Amagma.maths.usyd.edu.au+permutation+matrix
http://magma.maths.usyd.edu.au/magma/handbook/text/1705
If
mis your matrix andpis your permutation, thenm^pis the result of applyingptom. However, there is a catch. Ifmis an $r \times c$ matrix, thenprestricted to $\{1,\ldots,r\}$ permutes the rows, andprestricted to $\{r+1,\ldots,r+c\}$ permutes the columns.> m:=RandomMatrix(GF(2),9,18); > symc:=Sym({NumberOfRows(m)+1..NumberOfRows(m)+NumberOfColumns(m)}); > p:=Random(symc); > p,m,m^p; (10, 18, 15, 24, 22, 14, 12, 25, 13, 20, 23, 19, 17, 27, 21, 26, 11, 16) [1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1] [1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0] [0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1] [1 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0] [0 0 1 0 0 1 1 1 0 1 1 0 1 0 0 0 1 0] [0 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1] [1 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0] [0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0] [1 0 0 1 1 0 1 1 0 0 0 0 0 0 1 0 1 1] [1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0] [0 0 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 0] [1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0] [0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0] [1 1 0 0 1 0 0 1 0 0 0 0 0 1 1 1 0 1] [1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1] [1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1] [1 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1] [1 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0 1]