#19586: Add is_cayley_graph
-------------------------------------+-------------------------------------
       Reporter:  jaanos             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.10
      Component:  graph theory       |   Resolution:
       Keywords:  Cayley graphs      |    Merged in:
  groups                             |    Reviewers:  Nathann Cohen
        Authors:  Janoš Vidali       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  8685628455d2364bbb1896bf28e18c637bfab50c
  u/jaanos/add_is_cayley_graph       |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 > Yes, I was a bit worried about that. Anyway, this was intended more as a
 demonstration that the method works on non-simple graphs, so maybe it
 should be moved to the Examples section. Instead of printing out the
 generating set, maybe we should just print its length and the number of
 distinct elements, and maybe check that it contains the identity element.

 If you meant it as a 'pedagogical' doctest, then there is an easy way out:
 just add a '# random' flag to the doctest.

 file:///home/ncohen/.Sage/src/doc/output/html/en/developer/coding_basics.html
 #special-markup-to-influence-tests

 > Yes, because the generating set of a Cayley graph is not the same as the
 set of generators of a group.

 Arg... Sorry. Not only I am an idiot, but I already asked the same
 question and you gave me the very same answer `>_<`

 > This reminds me that I should probably add a further optimization: if a
 (simple) graph is connected and dense (say, vertex degree more than half
 the order), then it may be more efficient to check for Cayleyness of its
 complement (in case it is disconnected it will be more efficient,
 otherwise the same).

 The .density() and .complement() method raise exceptions on non-simple
 graphs. I think that it is better to not care about this, unless you
 really need those cases and the speedup is obvious.

 > No, because we are not guaranteed that a tuple will be returned.

 Weird. I thought you said in the doctest that a tuple will always be
 returned, whether the graph is a cayley graph or not, and that the
 additional values would be set to `None` if necessary.

 > True, but other methods returning multiple data also return tuples, so I
 think it should stay (IMO lists should be used when the size of the output
 is not predetermined, and its members have the same type).

 `O_o`

 Okay. Well. Tastes `:-P`

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/19586#comment:64>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to