Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unstable results of SecondCohomologyDimension #37

Open
ThomasBreuer opened this issue Feb 5, 2024 · 3 comments
Open

unstable results of SecondCohomologyDimension #37

ThomasBreuer opened this issue Feb 5, 2024 · 3 comments

Comments

@ThomasBreuer
Copy link

Consider the following input for GAP 4.12.2 or the current master branch.

LoadPackage( "cohomolo" );;
G:= GroupWithGenerators( gens );;
chr:= CHR( G, 2, 0, mats );;
SecondCohomologyDimension( chr );

where gens and mats are defined below.

When I enter these lines repeatedly then I get one of the following three outputs.

0

or

Error, 'Cohomolo' failed for some reason.
 at /.../gap/pkg/cohomolo/gap/coho4.g:669 called from
[...]

or

Out of space. Increase RSP.
37

(The output can be changed by calling BaseOfGroup( G ) or Size( G ) before calling CHR, some Random calls seem to be involved.)

Currently I do not see a reason for the differences.

And here are the defining data.

gens:=
[(2,4,9,22)(6,14,36,93)(7,17,43,111)(8,20)(10,25)
(11,27,70,47)(12,30,78,186)(13,33,86,195)(15,39,101,228)
(16,41,106,238)(18,46)(19,49,125,150)(21,54,133,107)
(23,59,127,261)(24,62,90,209)(26,67,105,236)(28,73)
(29,76,161,306)(32,83,194,296)(34,89,206,214)(35,91)
(37,96,219,102)(38,99,148,275)(42,109,198,258)(44,113)
(45,116,249,137)(48,123)(50,120,98,222)(51,129,265,367)
(52,92,212,353)(53,132)(55,136,130,267)(56,139,277,381)
(57,141,281,391)(58,63,151,166)(60,146,287,145)(61,147,289,229)
(64,154,298,250)(65,156,288,345)(66,159,304,310)(68,164)
(69,167,312,292)(71,143)(72,173,104,235)(74,178,144,284)(75,180)
(77,184,313,375)(79,189)(80,160)(82,192,114,202)(84,188,332,402)
(85,134)(87,201,334,331)(88,203)(94,215,245,372)(95,126,260,115)
(97,196,112,244)(100,224)(103,233,333,168)(108,239,183,327)(110,223)
(117,251,323,271)(118,252,376,131)(122,128,263,243)(124,257,343,302)
(135,185,318,279)(138,205)(140,142,282,272)(152,193,274,388)
(153,297,290,319)(155,226,295,393)(157,301)(158,303)(162,300,175,320)
(165,311)(170,308,256,355)(171,283,392,361)(172,247,177,240)
(176,216,294,285)(179,322,341,314)(181,191,299,204)(182,326,401,404)
(190,268)(199,339,362,336)(207,348)(208,350)(210,321,305,246)(211,340)
(213,218)(217,230,364,324)(220,335)(225,359,264,383)(227,360,278,386)
(231,363)(234,349)(237,351)(242,370,253,377)(248,373,262,356)
(259,354,371,269)(266,293)(273,378,385,384)(276,389)(280,346)(291,315)
(307,379)(309,380)(316,366)(328,397,368,374)(329,352)(337,395)
(344,390,396,382)(357,403)(365,400)(369,394),

(1,2,5,12,31,81)(3,7,18,47,121,167)(4,10,26,68,165,301)
(6,15,17,44,114,147)(8,21,55,137,123,256)(9,23,60,78,187,
330)(11,28,74,179,206,346)(13,34,90,58,144,285)(14,37,97,151,
294,111)(16,42)(19,50,128,88,204,177)(20,52,130,103,234,365)
(22,57,142,30,79,190)(24,63,152,296,82,193)(25,65,157,302,293,
370)(27,71,171,314,388,80)(29,77,125,258,251,375)(32,84,196,329,
361,61)(33,87,202,39,102,231)(35,92,213,222,358,400)
(36,94,216,215,86,199)(38,100,226,353,106,120)(40,104,232,355,75,
181)(41,107,49,126,45,117)(43,112,166)(46,119,254,379,387,310)
(48,72,174,319,217,76)(51,53)(54,134)(56,140,279,205,345,401)
(59,145,105,237,311,326)(62,149,292,73,176,304)(64,155,299)
(66,160,163,307,389,322)(67,162,138,185,141,131)(69,143,283,159,244,
286)(70,169,274,369,219,357)(83,195,284,96,93,214)(85,198)(89,207)
(91,95,218,246,221,170)(98,172,208)(99,224,297,212,249,333)
(101,229,363)(108,135,273)(109,240,184,168,313,203)(110,242,132,269,340,
320)(113,245,334,372,228,362)(115,247,122,233,323,350)(116,250,290,133,
271,161)(118,253,378,327,377,381)(124,127,262,287,371,325)(129,266)
(136,275,315,308,220,305)(139,278,390,227,239,367)(146,288,268,257,281,
344)(148,291,235,347,393,230)(150,191,306,154,295,260)(153,210,243,238,
321,298)(156,175,277,373,356,252)(158,276,201,341,402,280)(164,309)
(173,317)(178,188,209,352,392,331)(180,324,197,337,342,200)(182,316,236)
(183,328,385,383,248,359)(186,211,351,380,404,223)(189,300,261,382,272,
354)(194,336)(241,368)(255,259,338,343,405,318)(264,282,374,366,397,391)
(265,384,360,396,386,376)(267,349,395,398,335,364)(270,289,394,332,403,
303)(312,399)(339,348),

(1,3,8)(2,6,16)(4,11,29)
(5,13,35)(7,19,51)(9,24,64)(10,14,38)(12,32,85)
(15,40,105)(17,45,118)(18,48,124)(20,53,121)(21,56,93)
(22,58,117)(23,61,148)(25,66,161)(26,69,168)(27,72,175)
(28,75,182)(30,80,191)(31,82,50)(33,88,205)(34,91,211)
(36,95,165)(37,98,223)(39,103,142)(41,108,74)(42,110,114)
(43,99,225)(44,115,248)(46,120,255)(47,122,157)(49,127,201)
(52,131,83)(54,135,274)(55,138,276)(57,143,180)(59,87,137)
(60,84,197)(62,150,293)(63,153,162)(65,158,251)(67,163,308)
(68,166,116)(70,170,81)(71,172,316)(73,177,237)(76,183,329)
(77,185,199)(78,188,333)(79,147,290)(86,200,340)(89,208,351)
(90,210,311)(92,129,194)(94,217,345)(96,220,326)(97,221,279)
(100,227,361)(101,230,278)(102,232,141)(104,189,334)(106,164,310)
(107,140,280)(109,241,369)(111,243,371)(112,212,354)(113,246,370)
(119,249,265)(123,190,195)(125,259,363)(126,236,294)(128,264,149)
(130,268,379)(132,270,317)(133,187,331)(134,272,196)(136,257,169)
(139,159,305)(144,154,288)(145,286,393)(146,176,321)(151,295,330)
(152,204,344)(155,300,304)(156,292,395)(160,238,360)(167,184,253)
(171,315,327)(173,318,303)(174,281,389)(178,235,186)(179,323,266)
(181,325,289)(192,335,391)(193,306,397)(198,338,219)(202,342,404)
(203,343,394)(206,347,405)(207,349,384)(209,299,277)(213,242,339)
(214,234,366)(215,313,390)(216,355,377)(218,356,245)(222,309,348)
(224,252,362)(226,262,285)(228,337,367)(229,263,261)(231,275,376)
(233,287,283)(239,336,364)(240,302,254)(244,353,359)(247,273,387)
(250,374,346)(256,320,341)(258,380,357)(260,381,322)(267,385,399)
(269,372,365)(271,386,388)(282,284,319)(291,383,402)(296,358,382)
(297,396,352)(298,301,314)(307,398,401)(312,400,368)(324,328,332)
(350,378,403)(373,392,375)];;

mats:=[
[[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0],
[0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1,1,1,0,0,1,1,1],
[0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,1,0,1,0,1,0,0],
[0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1],
[0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0],
[0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,1,1,0,0,1,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1,0,1,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,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1,0,1,0,0,0,1,1,0,0,0],
[1,1,1,0,1,1,0,1,1,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,0,1],
[1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0],
[1,1,0,1,0,1,0,1,1,0,0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1],
[0,0,1,1,1,0,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1],
[0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,0,1,1,1,0,1,0,0,0,1],
[0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,0,1,1,1]]] * Z(2);;

Perform( mats, x -> ConvertToMatrixRep( x, 2 ) );
@fingolfin
Copy link
Member

I can reproduce the issue.

Part of the problem is the user of Exec which does not allow checking the exec code (shameless plug for my GAP PR that adds a better alternative called Exec2).

These should be replaced by calls to Process.

Then I hope the Out of space. Increase RSP. can at least be detected as an error.

Of course that leaves the question whether there is something to be done there, like, well, increasing the hardcoded RSP value.

@fingolfin
Copy link
Member

The use of Exec is also a problem in kbmag, I've opened gap-packages/kbmag#33

@ThomasBreuer
Copy link
Author

Just for the record:
The function TwoCohomologyGeneric from the GAP library (implemented by @hulpke) confirms that the result 0 is correct. (GAP 4.12.2 is good enough for this computation, and the version from the master branch needs less time.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants