Changeset cbe2b1e in git
 Timestamp:
 Jan 24, 2017, 12:33:14 PM (7 years ago)
 Branches:
 (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
 Children:
 185e5b9f88a9ab0544f0d62312d93e3ee0df7fb4
 Parents:
 f166b4e05ea71a69d6cec02759e596d7d8d8b5a9
 gitauthor:
 Janko Boehm <boehm@mathematik.unikl.de>20170124 12:33:14+01:00
 gitcommitter:
 Yue Ren <ren@mathematik.unikl.de>20170608 18:10:26+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/gitfan.lib
rf166b4e rcbe2b1e 22 22 23 23 Functions produce debug output if printlevel is positive. 24 25 Elements of the symmetric group Sn of type permutation can be created by the function permutationFromIntvec. The images of 1,...,n can be obtained by permutationToIntvec. Composition of permutations can be done by the *Operator, also powers can be computed in the usual way. 26 24 27 25 28 REFERENCES: … … 58 61 GITfanParallelSymmetric(list, intmat, cone, list); Compute GITfan in parallel from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GITcones. 59 62 bigintToBinary(bigint, int); Convert bigint into a sparse binary represenation specifying the indices of the oneentries 63 binaryToBigint(intvec); Convert sparse binary represenation specifying the indices of the oneentries to bigint 64 applyPermutationToIntvec(intvec, permutation); Apply permutation to a set of integers represented as an intvec 60 65 hashToCone(bigint, list); Convert a bigint hash to a GITcone 61 66 hashesToFan(list hashes, list OC) … … 362 367 363 368 364 static proc applyPermutationToIntvec(intvec v, permutation g){ 369 proc applyPermutationToIntvec(intvec v, permutation g) 370 "USAGE: applyPermutationToIntvec(v,g); v: intvec, g:permutation 371 PURPOSE: Apply g to the set of entries of v. The result is a sorted intvec. We assume that the entries of v are valid arguments of g. We do not require that the input is sorted. 372 RETURN: intvec. 373 EXAMPLE: example applyPermutationToIntvec; shows an example 374 " 375 { 365 376 intvec gv = composeIntvecs(permutationToIntvec(g),v); 366 377 //for (int i=1;i<=size(v);i++){ … … 368 379 //} 369 380 return(sort(gv)[1]); 381 } 382 example 383 { 384 permutation g = permutationFromIntvec(intvec(10, 9, 7, 4, 8, 6, 3, 5, 2, 1)); 385 applyPermutationToIntvec(intvec(1, 3, 4, 6, 8),g); 370 386 } 371 387 … … 1022 1038 example { 1023 1039 echo=2; 1040 ring R = 0,(x),dp; 1024 1041 intmat Q[5][10] = 1025 1042 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, … … 1028 1045 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1029 1046 0, 0, 1, 1, 1, 0, 0, 0, 0, 1; 1030 list generatorsG = permutationFromIntvec(intvec( 16, 21, 22, 23, 24, 17, 18, 19, 20, 25, 26, 27, 28, 29, 1031 30, 31, 32, 33, 34, 40, 39, 38, 37, 36, 35 )), 1032 permutationFromIntvec(intvec( 17, 16, 18, 19, 20, 21, 25, 26, 27, 22, 23, 24, 28, 29, 1033 30, 31, 35, 36, 37, 32, 33, 34, 38, 39, 40 )), 1034 permutationFromIntvec(intvec( 16, 18, 17, 19, 20, 22, 21, 23, 24, 25, 28, 29, 26, 27, 1035 30, 32, 31, 33, 34, 35, 38, 39, 36, 37, 40 )), 1036 permutationFromIntvec(intvec( 16, 17, 19, 18, 20, 21, 23, 22, 24, 26, 25, 27, 28, 30, 1037 29, 31, 33, 32, 34, 36, 35, 37, 38, 40, 39 )), 1038 permutationFromIntvec(intvec( 16, 17, 18, 20, 19, 21, 22, 24, 23, 25, 27, 26, 29, 28, 1039 30, 31, 32, 34, 33, 35, 37, 36, 39, 38, 40 )); 1040 apply(generatorsG,print); 1047 list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )), 1048 permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 )); 1041 1049 groupActionOnQImage(generatorsG,Q); 1042 1050 } … … 1132 1140 return(Ind); 1133 1141 } 1134 1142 example 1143 { 1144 ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1); 1145 ideal J = 1146 T(5)*T(10)T(6)*T(9)+T(7)*T(8), 1147 T(1)*T(9)T(2)*T(7)+T(4)*T(5), 1148 T(1)*T(8)T(2)*T(6)+T(3)*T(5), 1149 T(1)*T(10)T(3)*T(7)+T(4)*T(6), 1150 T(2)*T(10)T(3)*T(9)+T(4)*T(8); 1151 intmat Q[5][10] = 1152 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1153 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1154 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1155 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1156 0, 0, 1, 1, 1, 0, 0, 0, 0, 1; 1157 list AF= afaces(J); 1158 list OC = orbitCones(AF,Q); 1159 list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )), 1160 permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 )); 1161 list Asigmagens = groupActionOnQImage(generatorsG,Q); 1162 groupActionOnHashes(Asigmagens,OC); 1163 } 1135 1164 1136 1165 … … 1218 1247 execute("permutation sigma = "+st); 1219 1248 return(sigma);} 1249 example 1250 { 1251 ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1); 1252 ideal J = 1253 T(5)*T(10)T(6)*T(9)+T(7)*T(8), 1254 T(1)*T(9)T(2)*T(7)+T(4)*T(5), 1255 T(1)*T(8)T(2)*T(6)+T(3)*T(5), 1256 T(1)*T(10)T(3)*T(7)+T(4)*T(6), 1257 T(2)*T(10)T(3)*T(9)+T(4)*T(8); 1258 intmat Q[5][10] = 1259 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1260 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1261 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1262 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1263 0, 0, 1, 1, 1, 0, 0, 0, 0, 1; 1264 list AF= afaces(J); 1265 list OC = orbitCones(AF,Q); 1266 list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )), 1267 permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 )); 1268 list Asigmagens = groupActionOnQImage(generatorsG,Q); 1269 list actionOnOrbitconeIndicesForGenerators = groupActionOnHashes(Asigmagens,OC); 1270 string elementInTermsOfGenerators = 1271 "(x2^1*x1^1)^3*x1^1"; 1272 evaluateProduct(actionOnOrbitconeIndicesForGenerators, elementInTermsOfGenerators); 1273 } 1220 1274 1221 1275 … … 1227 1281 " 1228 1282 {return(sigma.image);} 1283 example 1284 { 1285 ///// todo 1286 } 1229 1287 1230 1288 … … 1416 1474 return(hashesOfCones); 1417 1475 } 1476 example 1477 { 1478 ///// todo 1479 } 1480 1418 1481 1419 1482 proc GITfanParallelSymmetric(list OC, bigintmat Q, cone Qgamma, list actiononorbitcones, list #) … … 1545 1608 return(hashesOfCones); 1546 1609 } 1610 example 1611 { 1612 ///// todo 1613 } 1614 1547 1615 1548 1616 // not static to be used in parallel.lib … … 1692 1760 1693 1761 // insert n at position pos and move bigger elements by one index 1694 staticproc insertToList(list L, def elementToInsert, int posToInsert){1762 proc insertToList(list L, def elementToInsert, int posToInsert){ 1695 1763 if(posToInsert == 1){ 1696 1764 return(list(elementToInsert)+L); … … 2412 2480 2413 2481 proc gkzFan(intmat Q) 2414 "USAGE: gkzFan(Q); a: ideal, Q: bigintmat2482 "USAGE: gkzFan(Q); a: ideal, Q:intmat 2415 2483 PURPOSE: Returns the GKZfan of the matrix Q. 2416 2484 RETURN: a fan. … … 2422 2490 // that are simplicial: 2423 2491 list OC = simplicialToricOrbitCones(Q); 2424 //"number of simplicial orbitcones:"; 2425 //print(size(OC)); 2492 print(size(OC)); 2426 2493 cone Qgamma = coneViaPoints(transpose(Q)); 2427 2494 list GIT = GITfanParallel(OC,Q,Qgamma); … … 2500 2567 2501 2568 2502 2569 proc G25Action() 2570 "USAGE: G25Action(Q); 2571 PURPOSE: Returns a representation of S5 as a subgroup of S10 with the action on the Grassmannian G25. 2572 RETURN: list of with elements of type permutation. 2573 EXAMPLE: example G25Action; shows an example 2574 " 2575 { 2576 list simplexSymmetryGroup = permutationFromIntvec(intvec( 1 .. 10 )), 2577 permutationFromIntvec(intvec( 1, 2, 4, 3, 5, 7, 6, 9, 8, 10 )), 2578 permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )), 2579 permutationFromIntvec(intvec( 1, 3, 4, 2, 6, 7, 5, 10, 8, 9 )), 2580 permutationFromIntvec(intvec( 1, 4, 2, 3, 7, 5, 6, 9, 10, 8 )), 2581 permutationFromIntvec(intvec( 1, 4, 3, 2, 7, 6, 5, 10, 9, 8 )), 2582 permutationFromIntvec(intvec( 1, 5, 6, 7, 2, 3, 4, 8, 9, 10 )), 2583 permutationFromIntvec(intvec( 1, 5, 7, 6, 2, 4, 3, 9, 8, 10 )), 2584 permutationFromIntvec(intvec( 1, 6, 5, 7, 3, 2, 4, 8, 10, 9 )), 2585 permutationFromIntvec(intvec( 1, 6, 7, 5, 3, 4, 2, 10, 8, 9 )), 2586 permutationFromIntvec(intvec( 1, 7, 5, 6, 4, 2, 3, 9, 10, 8 )), 2587 permutationFromIntvec(intvec( 1, 7, 6, 5, 4, 3, 2, 10, 9, 8 )), 2588 permutationFromIntvec(intvec( 2, 1, 3, 4, 5, 8, 9, 6, 7, 10 )), 2589 permutationFromIntvec(intvec( 2, 1, 4, 3, 5, 9, 8, 7, 6, 10 )), 2590 permutationFromIntvec(intvec( 2, 3, 1, 4, 8, 5, 9, 6, 10, 7 )), 2591 permutationFromIntvec(intvec( 2, 3, 4, 1, 8, 9, 5, 10, 6, 7 )), 2592 permutationFromIntvec(intvec( 2, 4, 1, 3, 9, 5, 8, 7, 10, 6 )), 2593 permutationFromIntvec(intvec( 2, 4, 3, 1, 9, 8, 5, 10, 7, 6 )), 2594 permutationFromIntvec(intvec( 2, 5, 8, 9, 1, 3, 4, 6, 7, 10 )), 2595 permutationFromIntvec(intvec( 2, 5, 9, 8, 1, 4, 3, 7, 6, 10 )), 2596 permutationFromIntvec(intvec( 2, 8, 5, 9, 3, 1, 4, 6, 10, 7 )), 2597 permutationFromIntvec(intvec( 2, 8, 9, 5, 3, 4, 1, 10, 6, 7 )), 2598 permutationFromIntvec(intvec( 2, 9, 5, 8, 4, 1, 3, 7, 10, 6 )), 2599 permutationFromIntvec(intvec( 2, 9, 8, 5, 4, 3, 1, 10, 7, 6 )), 2600 permutationFromIntvec(intvec( 3, 1, 2, 4, 6, 8, 10, 5, 7, 9 )), 2601 permutationFromIntvec(intvec( 3, 1, 4, 2, 6, 10, 8, 7, 5, 9 )), 2602 permutationFromIntvec(intvec( 3, 2, 1, 4, 8, 6, 10, 5, 9, 7 )), 2603 permutationFromIntvec(intvec( 3, 2, 4, 1, 8, 10, 6, 9, 5, 7 )), 2604 permutationFromIntvec(intvec( 3, 4, 1, 2, 10, 6, 8, 7, 9, 5 )), 2605 permutationFromIntvec(intvec( 3, 4, 2, 1, 10, 8, 6, 9, 7, 5 )), 2606 permutationFromIntvec(intvec( 3, 6, 8, 10, 1, 2, 4, 5, 7, 9 )), 2607 permutationFromIntvec(intvec( 3, 6, 10, 8, 1, 4, 2, 7, 5, 9 )), 2608 permutationFromIntvec(intvec( 3, 8, 6, 10, 2, 1, 4, 5, 9, 7 )), 2609 permutationFromIntvec(intvec( 3, 8, 10, 6, 2, 4, 1, 9, 5, 7 )), 2610 permutationFromIntvec(intvec( 3, 10, 6, 8, 4, 1, 2, 7, 9, 5 )), 2611 permutationFromIntvec(intvec( 3, 10, 8, 6, 4, 2, 1, 9, 7, 5 )), 2612 permutationFromIntvec(intvec( 4, 1, 2, 3, 7, 9, 10, 5, 6, 8 )), 2613 permutationFromIntvec(intvec( 4, 1, 3, 2, 7, 10, 9, 6, 5, 8 )), 2614 permutationFromIntvec(intvec( 4, 2, 1, 3, 9, 7, 10, 5, 8, 6 )), 2615 permutationFromIntvec(intvec( 4, 2, 3, 1, 9, 10, 7, 8, 5, 6 )), 2616 permutationFromIntvec(intvec( 4, 3, 1, 2, 10, 7, 9, 6, 8, 5 )), 2617 permutationFromIntvec(intvec( 4, 3, 2, 1, 10, 9, 7, 8, 6, 5 )), 2618 permutationFromIntvec(intvec( 4, 7, 9, 10, 1, 2, 3, 5, 6, 8 )), 2619 permutationFromIntvec(intvec( 4, 7, 10, 9, 1, 3, 2, 6, 5, 8 )), 2620 permutationFromIntvec(intvec( 4, 9, 7, 10, 2, 1, 3, 5, 8, 6 )), 2621 permutationFromIntvec(intvec( 4, 9, 10, 7, 2, 3, 1, 8, 5, 6 )), 2622 permutationFromIntvec(intvec( 4, 10, 7, 9, 3, 1, 2, 6, 8, 5 )), 2623 permutationFromIntvec(intvec( 4, 10, 9, 7, 3, 2, 1, 8, 6, 5 )), 2624 permutationFromIntvec(intvec( 5, 1, 6, 7, 2, 8, 9, 3, 4, 10 )), 2625 permutationFromIntvec(intvec( 5, 1, 7, 6, 2, 9, 8, 4, 3, 10 )), 2626 permutationFromIntvec(intvec( 5, 2, 8, 9, 1, 6, 7, 3, 4, 10 )), 2627 permutationFromIntvec(intvec( 5, 2, 9, 8, 1, 7, 6, 4, 3, 10 )), 2628 permutationFromIntvec(intvec( 5, 6, 1, 7, 8, 2, 9, 3, 10, 4 )), 2629 permutationFromIntvec(intvec( 5, 6, 7, 1, 8, 9, 2, 10, 3, 4 )), 2630 permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 )), 2631 permutationFromIntvec(intvec( 5, 7, 6, 1, 9, 8, 2, 10, 4, 3 )), 2632 permutationFromIntvec(intvec( 5, 8, 2, 9, 6, 1, 7, 3, 10, 4 )), 2633 permutationFromIntvec(intvec( 5, 8, 9, 2, 6, 7, 1, 10, 3, 4 )), 2634 permutationFromIntvec(intvec( 5, 9, 2, 8, 7, 1, 6, 4, 10, 3 )), 2635 permutationFromIntvec(intvec( 5, 9, 8, 2, 7, 6, 1, 10, 4, 3 )), 2636 permutationFromIntvec(intvec( 6, 1, 5, 7, 3, 8, 10, 2, 4, 9 )), 2637 permutationFromIntvec(intvec( 6, 1, 7, 5, 3, 10, 8, 4, 2, 9 )), 2638 permutationFromIntvec(intvec( 6, 3, 8, 10, 1, 5, 7, 2, 4, 9 )), 2639 permutationFromIntvec(intvec( 6, 3, 10, 8, 1, 7, 5, 4, 2, 9 )), 2640 permutationFromIntvec(intvec( 6, 5, 1, 7, 8, 3, 10, 2, 9, 4 )), 2641 permutationFromIntvec(intvec( 6, 5, 7, 1, 8, 10, 3, 9, 2, 4 )), 2642 permutationFromIntvec(intvec( 6, 7, 1, 5, 10, 3, 8, 4, 9, 2 )), 2643 permutationFromIntvec(intvec( 6, 7, 5, 1, 10, 8, 3, 9, 4, 2 )), 2644 permutationFromIntvec(intvec( 6, 8, 3, 10, 5, 1, 7, 2, 9, 4 )), 2645 permutationFromIntvec(intvec( 6, 8, 10, 3, 5, 7, 1, 9, 2, 4 )), 2646 permutationFromIntvec(intvec( 6, 10, 3, 8, 7, 1, 5, 4, 9, 2 )), 2647 permutationFromIntvec(intvec( 6, 10, 8, 3, 7, 5, 1, 9, 4, 2 )), 2648 permutationFromIntvec(intvec( 7, 1, 5, 6, 4, 9, 10, 2, 3, 8 )), 2649 permutationFromIntvec(intvec( 7, 1, 6, 5, 4, 10, 9, 3, 2, 8 )), 2650 permutationFromIntvec(intvec( 7, 4, 9, 10, 1, 5, 6, 2, 3, 8 )), 2651 permutationFromIntvec(intvec( 7, 4, 10, 9, 1, 6, 5, 3, 2, 8 )), 2652 permutationFromIntvec(intvec( 7, 5, 1, 6, 9, 4, 10, 2, 8, 3 )), 2653 permutationFromIntvec(intvec( 7, 5, 6, 1, 9, 10, 4, 8, 2, 3 )), 2654 permutationFromIntvec(intvec( 7, 6, 1, 5, 10, 4, 9, 3, 8, 2 )), 2655 permutationFromIntvec(intvec( 7, 6, 5, 1, 10, 9, 4, 8, 3, 2 )), 2656 permutationFromIntvec(intvec( 7, 9, 4, 10, 5, 1, 6, 2, 8, 3 )), 2657 permutationFromIntvec(intvec( 7, 9, 10, 4, 5, 6, 1, 8, 2, 3 )), 2658 permutationFromIntvec(intvec( 7, 10, 4, 9, 6, 1, 5, 3, 8, 2 )), 2659 permutationFromIntvec(intvec( 7, 10, 9, 4, 6, 5, 1, 8, 3, 2 )), 2660 permutationFromIntvec(intvec( 8, 2, 5, 9, 3, 6, 10, 1, 4, 7 )), 2661 permutationFromIntvec(intvec( 8, 2, 9, 5, 3, 10, 6, 4, 1, 7 )), 2662 permutationFromIntvec(intvec( 8, 3, 6, 10, 2, 5, 9, 1, 4, 7 )), 2663 permutationFromIntvec(intvec( 8, 3, 10, 6, 2, 9, 5, 4, 1, 7 )), 2664 permutationFromIntvec(intvec( 8, 5, 2, 9, 6, 3, 10, 1, 7, 4 )), 2665 permutationFromIntvec(intvec( 8, 5, 9, 2, 6, 10, 3, 7, 1, 4 )), 2666 permutationFromIntvec(intvec( 8, 6, 3, 10, 5, 2, 9, 1, 7, 4 )), 2667 permutationFromIntvec(intvec( 8, 6, 10, 3, 5, 9, 2, 7, 1, 4 )), 2668 permutationFromIntvec(intvec( 8, 9, 2, 5, 10, 3, 6, 4, 7, 1 )), 2669 permutationFromIntvec(intvec( 8, 9, 5, 2, 10, 6, 3, 7, 4, 1 )), 2670 permutationFromIntvec(intvec( 8, 10, 3, 6, 9, 2, 5, 4, 7, 1 )), 2671 permutationFromIntvec(intvec( 8, 10, 6, 3, 9, 5, 2, 7, 4, 1 )), 2672 permutationFromIntvec(intvec( 9, 2, 5, 8, 4, 7, 10, 1, 3, 6 )), 2673 permutationFromIntvec(intvec( 9, 2, 8, 5, 4, 10, 7, 3, 1, 6 )), 2674 permutationFromIntvec(intvec( 9, 4, 7, 10, 2, 5, 8, 1, 3, 6 )), 2675 permutationFromIntvec(intvec( 9, 4, 10, 7, 2, 8, 5, 3, 1, 6 )), 2676 permutationFromIntvec(intvec( 9, 5, 2, 8, 7, 4, 10, 1, 6, 3 )), 2677 permutationFromIntvec(intvec( 9, 5, 8, 2, 7, 10, 4, 6, 1, 3 )), 2678 permutationFromIntvec(intvec( 9, 7, 4, 10, 5, 2, 8, 1, 6, 3 )), 2679 permutationFromIntvec(intvec( 9, 7, 10, 4, 5, 8, 2, 6, 1, 3 )), 2680 permutationFromIntvec(intvec( 9, 8, 2, 5, 10, 4, 7, 3, 6, 1 )), 2681 permutationFromIntvec(intvec( 9, 8, 5, 2, 10, 7, 4, 6, 3, 1 )), 2682 permutationFromIntvec(intvec( 9, 10, 4, 7, 8, 2, 5, 3, 6, 1 )), 2683 permutationFromIntvec(intvec( 9, 10, 7, 4, 8, 5, 2, 6, 3, 1 )), 2684 permutationFromIntvec(intvec( 10, 3, 6, 8, 4, 7, 9, 1, 2, 5 )), 2685 permutationFromIntvec(intvec( 10, 3, 8, 6, 4, 9, 7, 2, 1, 5 )), 2686 permutationFromIntvec(intvec( 10, 4, 7, 9, 3, 6, 8, 1, 2, 5 )), 2687 permutationFromIntvec(intvec( 10, 4, 9, 7, 3, 8, 6, 2, 1, 5 )), 2688 permutationFromIntvec(intvec( 10, 6, 3, 8, 7, 4, 9, 1, 5, 2 )), 2689 permutationFromIntvec(intvec( 10, 6, 8, 3, 7, 9, 4, 5, 1, 2 )), 2690 permutationFromIntvec(intvec( 10, 7, 4, 9, 6, 3, 8, 1, 5, 2 )), 2691 permutationFromIntvec(intvec( 10, 7, 9, 4, 6, 8, 3, 5, 1, 2 )), 2692 permutationFromIntvec(intvec( 10, 8, 3, 6, 9, 4, 7, 2, 5, 1 )), 2693 permutationFromIntvec(intvec( 10, 8, 6, 3, 9, 7, 4, 5, 2, 1 )), 2694 permutationFromIntvec(intvec( 10, 9, 4, 7, 8, 3, 6, 2, 5, 1 )), 2695 permutationFromIntvec(intvec( 10, 9, 7, 4, 8, 6, 3, 5, 2, 1 )); 2696 return(simplexSymmetryGroup); 2697 } 2698 example 2699 { 2700 echo = 2; 2701 G25Action(); 2702 } 2703 2704 2705 proc findOrbits(list G, int d) 2706 "USAGE: findOrbits(G,d); G list of permutations in a subgroup of the symmetric group; d int minimum cardinality of simplices to be considered 2707 PURPOSE: Computes the orbit decomposition of the action of G. 2708 RETURN: list of intvec. 2709 EXAMPLE: example findOrbits; shows an example 2710 " 2711 { 2712 int n = size(permutationToIntvec(G[1])); 2713 list listOrbits; 2714 list finished; 2715 int tst; 2716 bigint startel; 2717 intvec startelbin; 2718 list neworbit,neworbitint; 2719 int i,posToInsert; 2720 bigint nn; 2721 while (size(finished)<2^n){ 2722 startel=0; 2723 if (size(finished)>0){ 2724 tst=0; 2725 while ((tst==0) and (startel+1<=size(finished))){ 2726 if (finished[int(startel+1)]<>startel){ 2727 tst=1; 2728 } else { 2729 startel=startel+1; 2730 } 2731 } 2732 } 2733 if (startel==0){ 2734 neworbit[1]= list(); 2735 neworbitint[1]=0; 2736 } else { 2737 startelbin=bigintToBinary(startel,n); 2738 neworbitint=list(startel); 2739 for (i=2;i<=size(G);i++){ 2740 nn=binaryToBigint(applyPermutationToIntvec(startelbin,G[i])); 2741 //nn;neworbitint; 2742 //"place to insert"; 2743 posToInsert = findPlaceToInsert(neworbitint,nn); 2744 //"pos";posToInsert; 2745 if(posToInsert > 0) 2746 { 2747 //"vorher";neworbitint; 2748 neworbitint = insertToList(neworbitint,nn,posToInsert); 2749 //"nachher";neworbitint; 2750 } 2751 } 2752 for (i=1;i<=size(neworbitint);i++){ 2753 neworbit[i]=bigintToBinary(neworbitint[i],n); 2754 } 2755 } 2756 if (size(neworbit[1])>=d){ 2757 listOrbits[size(listOrbits)+1]=neworbit; 2758 } 2759 finished=sort(finished+neworbitint)[1]; 2760 } 2761 return(listOrbits);} 2762 example 2763 { 2764 list G = G25Action(); 2765 list orb = findOrbits(G); 2766 for (int i=1;i<=size(orb);i++){orb[i][1];} 2767 } 2768
Note: See TracChangeset
for help on using the changeset viewer.