Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/utils/tst/   (GAP Algebra Version 4.15.1©)  Datei vom 11.8.2025 mit Größe 3 kB image not shown  

Quelle  lists.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#@local  C, c4, d16, gens, i, J, K, L, n, P, trans

##############################################################################
##
#W  lists.tst                   Utils Package                    
##
#Y  Copyright (C) 2015-2022, The GAP Group
##  

gap> ReadPackage( "utils", "tst/loadall.g" );;
gap> UtilsLoadingComplete;
true

## SubSection 3.1.1 
gap> List( [1..12], n->n^3 );
182764125216343512729100013311728 ]
gap> DifferencesList( last );
719376191127169217271331397 ]
gap> DifferencesList( last );
12182430364248546066 ]
gap> DifferencesList( last );
666666666 ]
gap> L := [ 0 ];;         
gap> DifferencesList( L );
[  ]
gap> L := [ ];;           
gap> DifferencesList( L );
[  ]

## SubSection 3.1.2 
gap> List( [0..10], n -> Factorial(n) );
1126241207205040403203628803628800 ]
gap> QuotientsList( last );
12345678910 ]
gap> L := [ 135, -1, -3, -5 ];;
gap> QuotientsList( L );
35/3, -1/535/3 ]
gap> FloatQuotientsList( L );
3., 1.66667, -0.23., 1.66667 ]
gap> QuotientsList( [ 210, -1, -2 ] );
1/20, fail, 2 ]
gap> FloatQuotientsList( [1..10] );
2., 1.51.333331.251.21.166671.142861.1251.11111 ]
gap> Product( last );
10.

## SubSection 3.1.3 
gap> L := [1..20];;  L[1]:=13;;                                              
gap> for i in [1..19] do                                                     
>        if IsOddInt(L[i]) then L[i+1]:=3*L[i]+1; else L[i+1]:=L[i]/2; fi;
>    od;                                                                  
gap> L;                                                                      
1340201051684214214214214 ]
gap> SearchCycle( L );                                                       
142 ]
gap> n := 1;;  L := [n];;
gap> for i in [1..100] do  n:=(n^2+1) mod 1093;  Add(L,n);  od;
gap> L; 
12526677363610481739715795272754157604848
  10042712118025213787952727541576048481004271
  2118025213787952727541576048481004271211802521
  3787952727541576048481004271211802521378795272
  7541576048481004271211802521378795272754157604
  84810042712118025213787952727541576048481004
  2712118025213787952727541576048481004 ]
gap> C := SearchCycle( L );
1576048481004271211802521378795272754 ]
gap> P := Positions( L, 157 );
1426385062748698 ]
gap> Length( C );  DifferencesList( P );
12
12121212121212 ]

## SubSection 3.1.4 
## this manual example not tested as answers vary from run to run 
## gap> RandomCombination( [1..49], 6 );
## [ 3521242731 ]


## SubSection 3.2.1 
gap> J := [ [1,2,3], [3,4], [3,4], [1,2,4] ];;
gap> DistinctRepresentatives( J );
1342 ]
gap> K := [ [3,4], [1,2], [2,3], [2,3,4] ];;
gap> CommonRepresentatives( J, K );
[ [ 3331 ], [ 1342 ] ]
gap> d16 := DihedralGroup( IsPermGroup, 16 );  SetName( d16, "d16" );
Group([ (1,2,3,4,5,6,7,8), (2,8)(3,7)(4,6) ])
gap> c4 := Subgroup( d16, [ d16.1^2 ] );  SetName( c4, "c4" );
Group([ (1,3,5,7)(2,4,6,8) ])
gap> RightCosets( d16, c4 );
[ RightCoset(c4,()), RightCoset(c4,(2,8)(3,7)(4,6)), RightCoset(c4,(1,8,7,6,5,
   4,3,2)), RightCoset(c4,(1,8)(2,7)(3,6)(4,5)) ]
gap> trans := CommonTransversal( d16, c4 );
[ (), (2,8)(3,7)(4,6), (1,2,3,4,5,6,7,8), (1,2)(3,8)(4,7)(5,6) ]
gap> IsCommonTransversal( d16, c4, trans );
true

## SubSection 3.3.1 
gap> gens := GeneratorsOfGroup( DihedralGroup(12) );
[ f1, f2, f3 ]
gap> String( gens );                                
"[ f1, f2, f3 ]"
gap> BlankFreeString( gens );                       
"[f1,f2,f3]"

#############################################################################
##
#E  lists.tst . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here

[Dauer der Verarbeitung: 0.3 Sekunden, vorverarbeitet 2026-06-18]