#13546: Bug in is_perfect
-------------------------------------------+--------------------------------
       Reporter:  azi                      |         Owner:  jason, ncohen, rlm 
            
           Type:  defect                   |        Status:  positive_review    
            
       Priority:  critical                 |     Milestone:  sage-5.7           
            
      Component:  graph theory             |    Resolution:                     
            
       Keywords:  is_perfect,graph theory  |   Work issues:                     
            
Report Upstream:  N/A                      |     Reviewers:  Jernej Azarija, 
Sébastien Labbé
        Authors:  Nathann Cohen            |     Merged in:                     
            
   Dependencies:  #8952                    |      Stopgaps:                     
            
-------------------------------------------+--------------------------------
Changes (by ncohen):

  * status:  needs_work => positive_review


Old description:

> The method for recognizing perfect graphs if flawed. Consider the
> following sage function:
> {{{
> def f(n):
>     c= 0
>     for g in graphs.nauty_geng(str(n)):
>         if g.is_perfect():
>             c+=1
>     return c
>
> }}}
>
> one can readily see that f(7) = 607 and f(8) = 8899 which is, (according
> to oeis http://oeis.org/A052431) incorrect. What should be true is that
> f(7) = 906 and f(7) = 8887.
>
> I propose to rewrite a correct algorithm perhaps using the  polynomial
> algorithm (www.comp.leeds.ac.uk/vuskovi/FOCS03final.ps).

New description:

 The method for recognizing perfect graphs if flawed. Consider the
 following sage function:
 {{{
 def f(n):
     c= 0
     for g in graphs.nauty_geng(str(n)):
         if g.is_perfect():
             c+=1
     return c

 }}}

 one can readily see that f(7) = 607 and f(8) = 8899 which is, (according
 to oeis http://oeis.org/A052431) incorrect. What should be true is that
 f(7) = 906 and f(7) = 8887.

 I propose to rewrite a correct algorithm perhaps using the  polynomial
 algorithm (www.comp.leeds.ac.uk/vuskovi/FOCS03final.ps).

 Apply :
     * [attachment:trac_13546.2.patch]

--

Comment:

 Good to go ! I had to ask David to check it on his computer as Sage
 segfaults on mine on exit,  which prevents me from running tests `:-/`

 Nathann

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13546#comment:37>
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.


Reply via email to