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

Quelle  isomorph.tst   Sprache: unbekannt

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

#############################################################################
##
#W  extreme/isomorph.tst
#Y  Copyright (C) 2014-15                                James D. Mitchell
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

#@local G, H, gr, gr1, gr2, graph5, group5, p, treeAuts, trees
gap> START_TEST("Digraphs package: extreme/isomorph.tst");
gap> LoadPackage("digraphs", false);;

#
gap> DIGRAPHS_StartTest();

#  AutomorphismGroup: for a digraph, 1
# All graphs of 5 vertices, compare with GRAPE
gap> graph5 := ReadDigraphs(Concatenation(DIGRAPHS_Dir(),
>                                         "/data/graph5.g6.gz"));
[ <immutable empty digraph with 5 vertices>, 
  <immutable symmetric digraph with 5 vertices, 2 edges>, 
  <immutable symmetric digraph with 5 vertices, 4 edges>, 
  <immutable symmetric digraph with 5 vertices, 6 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 4 edges>, 
  <immutable symmetric digraph with 5 vertices, 6 edges>, 
  <immutable symmetric digraph with 5 vertices, 6 edges>, 
  <immutable symmetric digraph with 5 vertices, 6 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 14 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 8 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 14 edges>, 
  <immutable symmetric digraph with 5 vertices, 10 edges>, 
  <immutable symmetric digraph with 5 vertices, 12 edges>, 
  <immutable symmetric digraph with 5 vertices, 14 edges>, 
  <immutable symmetric digraph with 5 vertices, 16 edges>, 
  <immutable symmetric digraph with 5 vertices, 14 edges>, 
  <immutable symmetric digraph with 5 vertices, 16 edges>, 
  <immutable symmetric digraph with 5 vertices, 18 edges>, 
  <immutable symmetric digraph with 5 vertices, 20 edges> ]
gap> group5 := [
>  Group([(45), (34), (23), (12)]), Group([(15), (34), (23)]),
>  Group([(12), (34)]), Group([(23), (12)]), Group([(34), (23), (1,
>   2)]), Group([(25), (12)(45)]), Group([(14), (23)]),
>  Group([(45), (14), (23)]), Group([(15)(24)]), Group([(14)]),
>  Group([(23)]), Group([(14), (23)]), Group([(23)(45)]),
>  Group([(45), (12), (14)(25)]), Group([(45), (12)]),
>  Group([(12)]), Group([(12)]), Group([(45), (23), (12)]),
>  Group([(45), (23), (12)]), Group([(35), (13), (24)]),
>  Group([(12)(34)]), Group([(13)]), Group([(24), (12)(34)]),
>  Group([(45), (34), (13)]), Group([(13)]), Group([(34), (13)]),
>  Group([(25)(34), (12345)]), Group([(15)(24)]), Group([(14)
>  (23)]), Group([(45), (13)]), Group([(35), (12)]),
>  Group([(34), (12), (13)(24)]), Group([(45), (34), (12)]),
>  Group([(45), (34), (23), (12)])];;
gap> List(graph5, AutomorphismGroup) = group5;
true
gap> trees := ReadDigraphs(Concatenation(DIGRAPHS_Dir(), "/data/tree9.4.txt"));
[ <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges>, 
  <immutable digraph with 9 vertices, 8 edges> ]
gap> treeAuts := [
>  Group([(67), (56), (45), (34)]), Group([(67), (56), (45),
>  (23)]), Group([(34), (23), (67), (56), (25)(36)(47)(89)]),
>  Group([(56), (45), (34), (12)(78)]), Group([(56), (45),
>  (34)]), Group([(56), (45), (23)]), Group([(56), (45), (23)]),
>  Group([(56), (34), (23)]), Group([(56), (45), (23)(78)]),
>  Group([(56), (34), (12), (13)(24)(78)]), Group([(45), (23)
>  (78), (12)(67)]), Group([(34), (12)(67)]), Group([(45),
>  (23), (24)(35)(78)]), Group([(34)(78), (23)(67),
>  (12)(56)])];;
gap> List(trees, AutomorphismGroup) = treeAuts;
true

#  AutomorphismGroup: for a digraph, 2
# PJC example, 45 vertices.
# This example is broken if we use Digraphs rather than Graphs in the bliss
# code
gap> gr := DigraphFromDigraph6String(Concatenation(
> "+l??O?C?A_@???CE????GAAG?C??M?????@_?OO??G??@?IC???_C?G?o??C?AO???c_??A?",
> "A?S???OAA???OG???G_A??C?@?cC????_@G???S??C_?C???[??A?A?OA?O?@?A?@A???GGO",
> "??`?_O??G?@?A??G?@AH????AA?O@??_??b???Cg??C???_??W?G????d?G?C@A?C???GC?W",
> "?????K???__O[??????O?W???O@??_G?@?CG??G?@G?C??@G???_Q?O?O?c???OAO?C??C?G",
> "?O??A@??D??G?C_?A??O?_GA??@@?_?G???E?IW??????_@G?C??"));
<immutable digraph with 45 vertices, 180 edges>
gap> H := AutomorphismGroup(gr);;
gap> IsPermGroup(H) and Length(GeneratorsOfGroup(H)) = 4;
true
gap> Size(H);
1440

# G = PrimitiveGroup(453);
gap> G := Group([
> (121820)(3402519)(4333530)(529439)(6361226)
> (7273913)(817)(10413132)(14374522)(15283821)
> (16342442)(2344),
> (1441625334031393438)(21412372861394230)
> (34554111364271510)(71943835)
> (17232624222029211832)]);;
gap> IsomorphismGroups(G, H) <> fail;
true

#  AutomorphismGroup: for a digraph, 3
# Random examples
gap> AutomorphismGroup(Digraph([]));
Group(())
gap> gr := Digraph([[67], [69], [134589],
> [123456710], [156710], [245910],
> [345678910], [135789], [125],
> [124678]]);;
gap> AutomorphismGroup(gr);
Group(())
gap> gr := CycleDigraph(1000);
<immutable cycle digraph with 1000 vertices>
gap> AutomorphismGroup(gr);;
gap> Size(last);
1000
gap> IsPermGroup(last2) and IsCyclic(last2);
true
gap> AutomorphismGroup(CompleteDigraph(6)) = SymmetricGroup(6);
true

#  CanonicalLabelling: for a digraph, 1
# PJC example, 45 vertices
gap> gr := DigraphFromDigraph6String(Concatenation(
> "+l??O?C?A_@???CE????GAAG?C??M?????@_?OO??G??@?IC???_C?G?o??C?AO???c_??A?",
> "A?S???OAA???OG???G_A??C?@?cC????_@G???S??C_?C???[??A?A?OA?O?@?A?@A???GGO",
> "??`?_O??G?@?A??G?@AH????AA?O@??_??b???Cg??C???_??W?G????d?G?C@A?C???GC?W",
> "?????K???__O[??????O?W???O@??_G?@?CG??G?@G?C??@G???_Q?O?O?c???OAO?C??C?G",
> "?O??A@??D??G?C_?A??O?_GA??@@?_?G???E?IW??????_@G?C??"));
<immutable digraph with 45 vertices, 180 edges>
gap> BlissCanonicalLabelling(gr);
(1,45,9,40,35,25,39,38,16,11,22,17,34,10,13,27,4,30,20,21)(2,32,36,3,23,18,19,
12)(5,28,43,41,42,37,15,33,26,7,29)(6,24,8,14,44)
gap> not DIGRAPHS_NautyAvailable or NautyCanonicalLabelling(gr) =
> (22233353481337628)(32915459387241744,
14)(4253940424153619211131233243)(1012)(16,
203026)(1827);
true

#  CanonicalLabelling: for a digraph, 2
gap> gr := DigraphFromDiSparse6String(Concatenation(
> ".~?@caOa??gGEA?e@?oOIb_SIc?MQBhOQCwIV?PY@B@IRDGgL__sYao{ODWCNC@MKBOwUEHG",
> "TdPmEBwkXFGoV_ogNCGCIBO{ZGGGFD@U?APGUDwW_GWGGFAU??PKUE@eDA`?TFAi?A_{da@G",
> "gaosVEQciIwOJC@eCA_oVE@wbHH}IApGlb`caGq{p`@WXEqCq_pS]HQ{oepo^JHKdHwSHC`O",
> "VEps_GxWibPGSHQclKbQD@_kMEaou`OcYEpo\\HagmMGKDA?kcKWsRDakwNBu@E@srMRuEEq",
> "CaJb?xapGT`OkKBPG]GqmcNwOFE@{oNCABAOkMCPo`IQkqbpo_Lbc}eQswMbpBPW{[MwCFAO",
> "kUFQ?bbP?ZJWOFB@O\\IWWLGQiUEq_yNcUJErdHRG{cHacvMCyKNRy@AO{VFQOhJBCqNc@EQ",
> "CeTFa?kJrk|NsiHB@SbHA{vMSHJ_qGdHsY?@__\\Ha_hJBGrMblFQstOb`CWQg[HDpsxPg[G",
> "APO\\ISHEQspR_@SVIR?|QDQ@B?sQCpc]Fq{vRwGYEpo`HbCwNb|XgAstQC|SUw{gKBhESdP",
> "TaooPDPcZGq[nOCdOcqCdHbSuOcPHRt\\X_occKbOtQGCGB`glJbGvNCDRVTx___gLB`CQLR",
> "lFTddYWWGEDBKuPCTHRDTYxGO?a?AK?g{GA_kKBwGCAGMGBOyB_O[PCgCD@woPaOgNCwMJ_@",
> "[W`PGYEwQJC@QKCPGV`?gMFg?KBp]J``W\\_`GUcp_]FqECBPG^GQINC`SYi?{OGwg^_OkNE",
> "QIHCpOWFaeBIamDA`OVEgWTIG_KkO?CAPgkJW?NC@KZFa?iJbEC@`okKBINEpohIbIEA_oQF",
> "aGeKGWKBP[p_?CA@?WJBqY@?_kZIA{oKhKWEQeA@r]DBPCRFa[jJbe??_KPDA?`Ga_z_aWhJ",
> "gOMC`cZHawu`OcLGQKgJb[~c@SZFQclKbSyNwOPD`kaGrOy`okTJraQEa_qLsIOGqSfIAklN",
> "sQLCQ{yNwo_KCAE@p?ZF`{fJAszNxSWGaoxaPgeIbE??oS[HackNW{_HQxI_?SOGq{s`@KYG",
> "A[qRGSIDa[jKCPH`OgPDasmMcTFQw?CEB?wNC@Ma?cXGaO}NshO`@?_JRCrOgkUGQgmKBGwM",
> "RlA`_[ICp_\\GQkkLbuEApCRE@c^HR[xOchJapCRGqOgIasoNCDDPsu?AOoRFQGbHQ[gISLH",
> "_okZGagvMSLJ_ocLMCdL`O_OC`gZGa[hPCYHDbCyMseMFAknKBCtMcXISx?QDPg^Jb|APCXI",
> "RtHUTte@@O[PCp_eIRpSTWK\\FqGgIRGwNDM?CA{xRTHS_OKQIb[}Qd@]WWKGCaWjJQx@Qw?",
> "AA`[dHrSxU^"));
<immutable digraph with 100 vertices, 1011 edges>
gap> BlissCanonicalLabelling(gr);
(1,89,57,93,12,97,17,76,50,16,46,64,82,95,86,99,83,61,88,21,11,73)(2,13,80,32,
44,79,8,18,59,94,31,70,74,67,84,68)(3,37,7,42,91,65,34,30,35,90,51,77,4,55,9,
22,20,75,52,15,10,48,47,100,58,41,69,62,26,19,92,54,40,85,24,28,81)(5,71,43,
87)(6,53,25,78,33,29,27,63,39,66)(14,23)(38,60,56,45,49,98,96,72)
gap> not DIGRAPHS_NautyAvailable or NautyCanonicalLabelling(gr) =
> (189532882967237912971865448466577662,
31764850157342578385991648355824293240,
81458454999851773)(221104657882074707551,
677911714290521419931647100605441696194,
3033261386989580276343873363968)(359256);
true

#  CanonicalLabelling: for a digraph, 3
gap> gr := ReadDigraphs(
> Concatenation(DIGRAPHS_Dir(), "/data/test-1.d6"))[1];
<immutable digraph with 1000 vertices, 100368 edges>
gap> BlissCanonicalLabelling(gr);
(1,183,193,706,986,184,826,282,306,880,934,890,871,713,528,288,443,409,132,84,
460,583,260,866,342,393,917,841,695,376,915,373,927,725,136,331,822,209,277,
507,712,410,191,166,360,597,903,856,936,223,940,620,219,478,263,225,273,947,
709,499,649,885,613,571,916,80,379,488,995,635,952,13,665,248,867,466,951,99,
689,146,984,910,323,811,40,485,227,838,463,101,255,807,555,591,524,818,574,
640,51,599,465,157,222,344,294,991,642,801,680,483,522,853,588,21,7,196,619,
772,42,15,564,293,200,911,888,185,586,33,727,477,655,861,659,805,365,899,214,
744,734,732,533,764,941,199,920,452,111,577,686,999,498,332)(2,714,467,660,
256,670,1000,762,843,912,251,973,825,584,201,366,198,397,627,312,392,252,396,
171,23,309,966,53,902,28,757,539,974,526,135,419,78,579,959,292,567,284,106,
968,472,261,786,671,422,52,823,350,63,302,229,546,76,518,647,182,673,954,462,
187,356,231)( [...] )
gap> not DIGRAPHS_NautyAvailable or NautyCanonicalLabelling(gr) =
> (120090066840510893489156488995648428833241,
>   94222817690337986204373930644299261801699809,
>   76895211114467662747476103568324959292598302,
>   22195753159647715947709469273943621750805360,
>   5512531251129596844225391499297291706987,
>   755244951899616056011450997752782246734713,
>   52543321948671029319719430925632665213161620,
>   2389225154782645897377853599509869220359814,
>   196625504765248326989983426153948128112336,
>   70384757190384054814315651765437075464159366,
>   184830674303858655865489275276281880936226498,
>   32820137146876136411043198991993159099693458,
>   13538474473375152830792771974832420650217692,
>   89087488925872063063594413639339306864206634,
>   16433023413986384167394641584931727622803309,
>   9666070165114954878589871732521175758418434,
>   762845536166372544738392254534280821778807574,
>   6579298680495225271956342396173579965308487,
>   388532899212831210402555567255797286770704789,
>   712409117763115945145608236788671457700911896,
>   190981147154823522425758384518366272939578,
>   565962119721614443385539971232218792285885628,
>   73517866161141018556138778046695040786855563,
>   55987976584193708985705369728629848195158222,
>   3167724617961494381647202851542685186344296,
>   4303587713426210981993258793290338585682739,
>   93887970768410128495736121169822252399660272,
>   606416368616799146984913266345257499663779485,
>   24516860961038095443517150291267327753461126,
>   818558624953642785894689137320808375470627294,
>   9905204036887144965875566035039389566502837,
>   96039520535383721514080697268447669783917,
>   8526841233182027856977485314473760804270484,
>   439216465174631100513453155866319935554335125,
>   116218340235408122617479191176157239872183,
>   1984044561309262278573506947163336727483549,
>   580425649886741764940600861659786683993749765,
>   66473044623734799636239042990616290226138163,
>    836384272596686279016062370144411905450978,
>   573607526133636777211357287247318203812152967,
>   854148423643480189421559478145582558251588,
>    2330141713293545355233474300560773351326676,
>   8675012295228598441185928737771438448843915,
>   363406181573676411074425239292897219868440,
>   85693779818269157693951040493743248860398414,
>   968477653446458036199497926961358633717912,
>   243455276268028114112724982251969963716754,
>   4973103485002092796983949980757540591516519,
>   916718881803439232083143975557533745846612,
>   887505492214766512274475884397619775313452106,
>   9585141661812054679436835311970322672507724,
>   842167720525711875151604325941199928321230,
>   6953659186798767023047263748889279117129333,
>   39455240481681955597904883393908131767506530,
>   3345776701000746988207354745956778151064052,
>   82625669728229834188148282337690138218541924,
>   89542168699950817017766746056261573173742459,
>   796129463104759827696795386666538305472277490,
>    78564297349250283136332)(2723834383991646898,
>   1246490973816656907964113909111583263223933,
>   58122478465832957081043274048228550537637882,
>   265529794718910346829687462188172553105187378,
>   445454424401787231)(4543920444974547192353312,
>   41981977358141602356249722678391694437379491,
>   40059267572)(3480016583965)(4987385092176963,
>  315756518652123552288441)(7741394323813725142,
>   449675)(102776893260870824828);;

#  IsIsomorphicDigraph: for digraphs, 1
gap> gr1 := DigraphDisjointUnion(CycleDigraph(3), CycleDigraph(3));;
gap> p := Random(SymmetricGroup(1000));;
gap> gr2 := OnDigraphs(gr, p);
<immutable digraph with 1000 vertices, 100368 edges>
gap> gr = gr2;
false
gap> IsIsomorphicDigraph(gr, gr2);
true
gap> IsIsomorphicDigraph(gr2, gr);
true
gap> ForAny(graph5, x -> Number(graph5, y -> IsIsomorphicDigraph(x, y)) <> 1);
false

#  IsomorphismDigraphs: for digraphs, 2
gap> gr1 := CompleteBipartiteDigraph(10050);
<immutable complete bipartite digraph with bicomponent sizes 100 and 50>
gap> gr2 := CompleteBipartiteDigraph(50100);
<immutable complete bipartite digraph with bicomponent sizes 50 and 100>
gap> p := IsomorphismDigraphs(gr1, gr2);
(1,51,101)(2,52,102)(3,53,103)(4,54,104)(5,55,105)(6,56,106)(7,57,107)(8,58,
108)(9,59,109)(10,60,110)(11,61,111)(12,62,112)(13,63,113)(14,64,114)(15,65,
115)(16,66,116)(17,67,117)(18,68,118)(19,69,119)(20,70,120)(21,71,121)(22,72,
122)(23,73,123)(24,74,124)(25,75,125)(26,76,126)(27,77,127)(28,78,128)(29,79,
129)(30,80,130)(31,81,131)(32,82,132)(33,83,133)(34,84,134)(35,85,135)(36,86,
136)(37,87,137)(38,88,138)(39,89,139)(40,90,140)(41,91,141)(42,92,142)(43,93,
143)(44,94,144)(45,95,145)(46,96,146)(47,97,147)(48,98,148)(49,99,149)(50,100,
150)
gap> OnDigraphs(gr1, p) = gr2;
true
gap> IsomorphismDigraphs(EmptyDigraph(1), gr1);
fail

#
gap> DIGRAPHS_StopTest();
gap> STOP_TEST("Digraphs package: extreme/isomorph.tst", 0);

[Dauer der Verarbeitung: 0.13 Sekunden, vorverarbeitet 2026-06-17]