Sponsored links: Algebra eBooks
 

Related

permutations

a:[1,2,3];

permutations(a);

Calculate

permutations

p1:[[3],[4],[2],[1],[...

p2:[[2],[4]];

permutations ([p1, p2]);

Calculate

permutations

permutations ([1, 2,3...

Calculate

permutations

permutations([1,2,3]);

Calculate

permutations-rest

a:[1,2,3];

b:permutations(a);

rest(b);

Calculate

permutations-powerset

permutations ([1, 2]);

powerset ({1, 2, 3},2);

Calculate

permutations-powerset

permutations ([1, 2]);

powerset ({1, 2, 3},2);

Calculate

permutations-powerset

permutations ([1, 2]);

powerset ({1, 2, 3});

Calculate

permutations

p1:[[3],[4],[2],[1],[...

p2:[[2],[4]];

permutations ([p1, p2]);

Calculate

permutations

permutations ([a, a]);

Calculate

permutations

Run Example
(%i1)r:15;
(%o1)                                 15
(%i2)  n1:5;
(%o2)                                  5
(%i3)  n2:4;
(%o3)                                  4
(%i4) for i:1 thru n1 do   (int:makelist(i,i,1,n2), sprm:permutations(int),  a[i,j]:=random(r),    A:genmatrix(a,n2,n2),    est3:10^10, for i:1 thru n2! do   (sum:makelist(0,i,1,n2),  p:first(sprm),   sprm:rest(sprm),    for j:1 thru n2 do      (l:makelist(row(A,p[j])[1,k],k,1,n2),    l:sort(l,ordergreatp),     for k:1 thru j do       sum[j]:sum[j]+l[k]    ),   est:sum[1],    for i:2 thru n2 do      est:est*sum[i],  est3:min(est3,est)  ), print("Permanent:", permanent(A), ", Otsenka3:", est3),   kill(a) );
Permanent: 18530 , Otsenka3: 148120 
Permanent: 46746 , Otsenka3: 104832 
Permanent: 20116 , Otsenka3: 50400 
Permanent: 28386 , Otsenka3: 95472 
Permanent: 55598 , Otsenka3: 146692 
(%o4)                                done
(%i5) 
Run Example
a:[1,2,3];
(%o1)                              [1, 2, 3]
(%i2) b:permutations(a);
(%o2) {[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]}
(%i3) rest(b);
(%o3)       {[1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]}
(%i4) 
Run Example
permutations ([1, 2]);
(%o1)                          {[1, 2], [2, 1]}
(%i2)  permutations ([1, 2, 3]);
(%o2) {[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]}
(%i3) 

Related Help

Help for Permutations