Recog An/Sn unknown degree: conder, holt#265
Recog An/Sn unknown degree: conder, holt#265ssiccha wants to merge 32 commits intogap-packages:masterfrom
Conversation
5ae5367 to
d40a988
Compare
|
Rebased the last commit onto the current version of #176. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #265 +/- ##
==========================================
+ Coverage 69.12% 70.48% +1.35%
==========================================
Files 43 43
Lines 18321 18637 +316
==========================================
+ Hits 12665 13136 +471
+ Misses 5656 5501 -155
🚀 New features to boost your workflow:
|
d40a988 to
dc4a895
Compare
dc4a895 to
f162f36
Compare
cca25fd to
35a39de
Compare
|
Link to our Hackmd |
96f9a25 to
705504c
Compare
e63f4a8 to
956884d
Compare
|
We should be almost done. We think there are two TODOs left: clean up the tests and figure out what to do with small classical groups like: And get the tests to pass again. :) And in Make CallMethods directly write into the RecogNode update the docs of And, @FriedrichRober is writing a short text, how all the parts fit together, that is how our implementation differs from a "vanilla" implementation of the JLNP algorithm according to the paper. |
3b12114 to
daceec3
Compare
|
Awesome, thank you! |
|
@FriedrichRober do you think you can finish this on your own, now that @ssiccha is gone? Perhaps I can help a bit? |
|
Yes, I think I can finish this on my own. The code is finished (except for handling small classical groups). What is missing now is to finish the documentation (comments) and looking at the runtime of the test suite. |
d45adbb to
7ba5ec6
Compare
85ca56f to
deb2974
Compare
|
@fingolfin, ich habe nun die Änderungen implementiert, wie wir es besprochen haben. Wir geben früher auf, und speichern uns die Iteratoren im recog node ab, um sie später weiter zu verwenden. Trotzdem dauert die Test-Suite auf meinem Rechner 3-4 Minuten länger als auf dem master. Meiner Meinung nach ist dieser Zustand inakzeptabel, um das einfach so zu mergen :( Ich muss dann nochmal genau schauen, an welchen Stellen wir zu viel Zeit verschwenden, und ob sich da was machen lässt. |
|
@fingolfin, the pull request is ready now. The test suite on my laptop was as quick as on master, however some unrelated errors occures. Two where the stamp is not what was expected in the test file. One where the group was wrongly recognized which would require further investigation. I assume that this is a random error which simply occured from inserting the recognition method into the database. |
|
Fantastic, @FriedrichRober, thank you so much! |
doc/recog.bib
Outdated
| AUTHOR = {Conder, Jonathan}, | ||
| TITLE = {Algorithms for Permutation Groups}, | ||
| YEAR = {2012}, | ||
| NOTE = {TODO}, |
There was a problem hiding this comment.
Could this be filled in by someone? At which university was this thesis written; what kind of thesis was it?
There was a problem hiding this comment.
I talked to @aniemeyer and learned that this was a thesis in Auckland, but I didn't find something initially. But now it seems this was indeed a B.Sc. thesis there, and it was written by @jonathan-conder . I have now pinged them, and will also write an email. Perhaps we get permissions to post the thesis somewhere, or perhaps Jonathan is willing to put it on e.g. the arXiv (I am not sure if they accept such things, but it seems to contain original research, and they definitely have at least phd theses?)
There was a problem hiding this comment.
Jonathan replied to my email and generously gave permission to share copies of his thesis, and he also made it available at https://jonathan-conder.github.io/afpg.pdf -- this should keep working for the foreseeable future, and I also made sure archive.org has a snapshot. Still, we should probably see if we can also get this onto e.g. Zenodo or so.
Anyway, that gives us enough info to complete this bib record. I'll do so eventually (if nobody beats me to it).
There was a problem hiding this comment.
See https://web.archive.org/web/20251219002033/https://jonathan-conder.github.io/afpg.pdf -- we could point there
There was a problem hiding this comment.
| NOTE = {TODO}, | |
| NOTE = {https://web.archive.org/web/20251219002033/https://jonathan-conder.github.io/afpg.pdf}, |
fingolfin
left a comment
There was a problem hiding this comment.
Thank you! I've pushed a bunch of changes (see commit log). I'll try to understand the errors better tomorrow
| # This is usually much smaller than RECOG.SnAnUpperBoundForDegree. | ||
| # The number to compare N with was chosen arbitrarily as a "large" degree. | ||
| # if N > 20 then | ||
| # degreeData := RECOG.GuessSnAnDegree(ri); | ||
| # if degreeData = fail then | ||
| # cache.N := TemporaryFailure; | ||
| # return; | ||
| # fi; | ||
| # N := Minimum(N, degreeData.degree); | ||
| # cache.N := N; | ||
| # fi; |
There was a problem hiding this comment.
Is this the only call to RECOG.GuessSnAnDegree?? If so... do we need it at all?
There was a problem hiding this comment.
I think we want to keep it just for the sake of Issue #348. But right now the code is not used by SnAnUnknownDegree, and we can surely move it somewhere else.
| constants := RECOG.ThreeCycleCandidatesConstants(1. / 4., N); | ||
| for i in [1 .. T] do | ||
| iterator := RECOG.ThreeCycleCandidatesIterator(ri, constants); | ||
| # This is the main method used by RECOG.RecogniseSnAn and RECOG.RecogniseSnAnLazy. |
There was a problem hiding this comment.
As far as I can tell, RECOG.RecogniseSnAn is not used anymore. Can we just remove it then, and perhaps rename RECOG.RecogniseSnAnLazy to RECOG.RecogniseSnAn ?
There was a problem hiding this comment.
So, in theory RECOG.RecogniseSnAn is the algorithm that you can run with an arbitrary epsilon and it guarantees you to recognise SnAn with this error bound, so it is running all iterations as often as computed in the respective paper. However, in practice it is too expensive to run this method for the recog tree, so we wrote the lazy variant that exits the iterations way sooner. Whether we want to keep it or not depends on whether or not it is interesting to have this version of the algorithm to play around with, which I honestly do not have a strong opinion on. We can definitely rename the functions to RECOG.RecogniseSnAnExact or something like this and then drop the lazy from the other :)
There was a problem hiding this comment.
I think we should keep the code, but rename as Friedrich suggested.
The rest of the changes look good to me |
| # eps : real number, the error bound | ||
| # N : integer, upper bound for the degree of G | ||
| # | ||
| # Returns a record of constants used in ThreeCyclesCanditatesIterator. |
There was a problem hiding this comment.
Suggested change
# Returns a record of constants used in ThreeCycleCandidatesIterator.
# The meaning of these constants is documented under "Changes" at the beginning of this file and their values are from [JLNP13, 4.1].
Typo (not from this PR), ThreeCycleCandidatesIterator was misspelled.
I find it difficult to rememer the meaning of the constant names B, T, ..., but it is probably best to follow the notation from [JLNP13].
There was a problem hiding this comment.
Yes, the constants are named as in [JLNP13]. If we ever renamed constants, it should be hopefully noted in a comment above the function.
Co-authored-by: Max Horn <max@quendi.de>
Co-authored-by: Max Horn <max@quendi.de>
gap/generic/SnAnUnknownDegree.gi
Outdated
| # determine this. It is based on the Magma function heuristicThreeCycleTest. | ||
| # R is a list of logInt2N+1 many random elements of the group of ri. | ||
| RECOG.HeuristicThreeCycleTest := function(ri, c, logInt2N, R) | ||
| local r, y, yTo5, k; |
There was a problem hiding this comment.
| local r, y, yTo5, k; | |
| local r, y, y2, y3, k; |
Update local variables.
doc/recog.bib
Outdated
| NOTE = {https://doi.org/10.1017/CBO9780511565830.007}, | ||
| } | ||
|
|
||
| @article{C12, |
There was a problem hiding this comment.
It seems Bibtex and GAPDoc only know mastersthesis and phdthesis but not bscthesis or bachelorthesis. Ah well. Let's then do
| @article{C12, | |
| @misc{C12, |
There was a problem hiding this comment.
I'll check this Pr out locally to try what actually works and then will push an improvement
| # We make a small improvement to the version described in | ||
| # <Cite Key="JLNP13"/>. The order of r ^ M is a 2-power. | ||
| # It can be at most 2 ^ logInt2N. Thus, if we find an r such that | ||
| # (r ^ M) ^ (2 ^ logInt2N) is non-trivial, then we can return | ||
| # NeverApplicable. |
There was a problem hiding this comment.
| # We make a small improvement to the version described in | |
| # <Cite Key="JLNP13"/>. The order of r ^ M is a 2-power. | |
| # It can be at most 2 ^ logInt2N. Thus, if we find an r such that | |
| # (r ^ M) ^ (2 ^ logInt2N) is non-trivial, then we can return | |
| # NeverApplicable. | |
| # We make a small improvement to the version described in | |
| # <Cite Key="JLNP13"/>. The order of r ^ M is a 2-power. | |
| # It can be at most 2 ^ logInt2N. Thus, if we find an r such that | |
| # (r ^ M) ^ (2 ^ logInt2N) is non-trivial, then we can return | |
| # NeverApplicable. I.e. we need one iteration less than in [JLNP13], | |
| # which also computes (r ^ M) ^ (2 ^ (longInt2N + 1)) |
Make the difference between the code and JLNP13 more explicit (hoping that I understood this correctly, I am not sure).
| Li := L; | ||
| Li := Minimum(Li, B); | ||
| Ki := Ki + K; | ||
| Ki := Minimum(Ki, C); | ||
| curInvolutionPos := 1; | ||
| return SnAnTryLater; | ||
| elif curInvolutionPos = Li then | ||
| Li := Li + L; | ||
| Li := Minimum(Li, B); |
There was a problem hiding this comment.
| Li := L; | |
| Li := Minimum(Li, B); | |
| Ki := Ki + K; | |
| Ki := Minimum(Ki, C); | |
| curInvolutionPos := 1; | |
| return SnAnTryLater; | |
| elif curInvolutionPos = Li then | |
| Li := Li + L; | |
| Li := Minimum(Li, B); | |
| # Last involution reached. Restart with next batch of conjugates later. | |
| Li := Minimum(L, B); # Reset Li to initial value | |
| Ki := Minimum(Ki+K, C); # Try up to K more conjugates later | |
| curInvolutionPos := 1; # Restart from first involution | |
| return SnAnTryLater; | |
| elif curInvolutionPos = Li then | |
| # End of batch of involutions reached. Try next batch later. | |
| Li := Minimum(Li+L, B); |
The new Minimum statements should be equivalent to the old ones. Also added some comments.
|
@FriedrichRober I went through |
| curInvolutionPos := 1; | ||
| Ki := Minimum(K, C); | ||
| Li := Minimum(L, B); | ||
| # Counts the elements c in step 4 that we use to conjugate the current |
There was a problem hiding this comment.
| # Counts the elements c in step 4 that we use to conjugate the current | |
| # Entry i of this list counts the elements c in step 4 that we use to conjugate the current |
Clarification.
There was a problem hiding this comment.
It is actually 'commuting' and 'non-commuting' instead of 'commutating' and 'non-commutating"
| # counts the size of the set Gamma_i in step 4 for the current involution | ||
| # t_i |
There was a problem hiding this comment.
| # counts the size of the set Gamma_i in step 4 for the current involution | |
| # t_i | |
| # Entry i of this list counts the size of the set Gamma_i in step 4 | |
| # for the current involution t_i |
As above.
| # counts the actual number of three cycle candidates considered | ||
| # which are filtered from the Gamma_i via heuristic order tests. |
There was a problem hiding this comment.
| # counts the actual number of three cycle candidates considered | |
| # which are filtered from the Gamma_i via heuristic order tests. | |
| # Entry i of this list counts the actual number of three cycle candidates considered | |
| # which are filtered from the Gamma_i via heuristic order tests. |
As above.
A PR based on #176.
We are going to implement the extensions by Conder and Derek Holt's
GuessAltSymDegree.