#14297: is_strongly_regular does not handle complete graphs
-------------------------------------+--------------------------------------
Reporter: azi | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.10
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Frédéric Chapoton | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Comment (by azi):
Replying to [comment:9 ncohen]:
> > Eeeehm just checked in the book
(http://www.win.tue.nl/~aeb/2WF02/spectra.pdf page 123 lol) by Brower and
Haemers they exclude the complete graph and its complement as well.
>
> Well, they are free to have their own opinion too. Mine is that I like
to consider them as strongly regular graphs. Now we can put whatever you
want in Sage, the one who agrees with a book is usually the one who is
acknowledged to be right, nowadays `:-P`
Luckily we don't have as many books saying different things as religions
do :-)
Anyways, I personally like to have it that way because then there are
other theorems for strongly regular graphs that follow naturally. For
example a strongly regular graphs has precisely three distinct eigenvalues
(which does not hold for the empty graph and complete graph)
That said I don't care what we do with this as long as its fine with you
guys. Hence I let you and Frederic decide!
> > I like gambling so we can toss a coin though I prefer to exclude
complete graphs.
> >
> > Also while we are at it:
> >
> > {{{
> > 2293 degree = self.degree()
> > 2294 k = degree[0]
> > 2295 if not all(d == k for d in degree):
> > 2296 return False
> > 2297
> > 2298 if self.is_clique():
> > }}}
> >
> > is it perhaps better to call self.is_regular()? I would like that
since it somehow leaves any optimizations that is_regular *could* do and
has the added benefit that this method does not break for the EmptyGraph
(corner cases lol)
>
> Oh. Well, then one would first have to take "any" vertex of the graph,
compute its degree, then call `is_regular` on it with this degree as
parameter. Otherwise it will call `self.degree()` twice. It's up to you !
You got a point I overlooked that! BUT we can at least remove the
is_clique part and check if the degree is order()-1 once we know its
regular right??
>
> Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14297#comment:10>
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 http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.