ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 13 Aug 2016 16:51:01 +0200Can I test that a Cayley table represents a group?https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/Or can I test that the operation satisfies the axioms one at a time?Thu, 11 Aug 2016 19:04:56 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/Comment by Bill_Bell for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34437#post-id-34437You're right of course. But I could do that in Python (say). I'm actually asking for something like a test that you would apply to a single number to know whether it's prime: isPrime(7). I'm new to sage, I admit. _To me_ it seems reasonable to be able to pass a table to a constructor and then ask when it satisfies the group axioms. But I would also admit that this doesn't seem to be the way sage is intended to work.Thu, 11 Aug 2016 22:54:13 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34437#post-id-34437Comment by kcrisman for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34435#post-id-34435You could probably do it, in the sense that you could make a loop that checks every single triple of elements (say) satisfies transitivity (by which I mean associativity) ... I'm not sure how one would do this automatically in any easier way, perhaps you have an example in mind that is more specific? (You should be able to edit your post to do so.)Thu, 11 Aug 2016 21:15:29 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34435#post-id-34435Comment by kcrisman for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34446#post-id-34446Sure, you could make a function that did that. My point is that I don't think anyone has done so, nor that what they implemented would (or could!) necessarily be any faster than checking every single possibility. Maybe there is a result that not every one would have to be checked. If you create such a function, you could consider submitting it to be added to Sage!Fri, 12 Aug 2016 16:58:02 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34446#post-id-34446Comment by A.Alharbi for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34455#post-id-34455As mentioned [here](http://math.stackexchange.com/a/583406), there is a *probabilistic* algorithm which has running time close to $O(n^2)$. I wonder if there is a *deterministic* algorithm with running time less than $O(n^3)$.Fri, 12 Aug 2016 23:26:29 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34455#post-id-34455Comment by Bill_Bell for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34456#post-id-34456I just read what appears to be **the** answer on quora.com: [Justin Rising's answer](https://www.quora.com/How-do-you-know-if-a-Cayley-table-define-a-group-operation/answer/Justin-Rising?srid=uDgC). (Always check wikipedia first.)Sat, 13 Aug 2016 00:18:09 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34456#post-id-34456Comment by A.Alharbi for <p>Or can I test that the operation satisfies the axioms one at a time?</p>
https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34462#post-id-34462The problem with Light's algorithm is that one needs to find generators before applying it, otherwise it would be more expensive than usual exhaustive search (from a memory point of view). That being said, I think it worth to implement those tests in sage. I might write a function in python which performs two tests based on arguments given.Sat, 13 Aug 2016 16:51:01 +0200https://ask.sagemath.org/question/34434/can-i-test-that-a-cayley-table-represents-a-group/?comment=34462#post-id-34462