#15664: Bug in IncidenceStructure.is_block_design
-----------------------------+---------------------------------
   Reporter:  ncohen         |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-6.1
  Component:  combinatorics  |         Keywords:
  Merged in:                 |          Authors:  Nathann Cohen
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:  #15285
   Stopgaps:                 |
-----------------------------+---------------------------------
 This bug has been noticed by Frederic in #15285 :

 {{{
 sage: IncidenceStructure([0,1,2],[[0,1],[0,2],[1,2]]*15).is_block_design()
 (True, [1, 3, 2, 15])
 sage: IncidenceStructure([0,1,2],[[0,1],[0,2],[1,2]]*15).parameters()
 (2, 3, 2, 15)
 }}}

 Turns out that the code of `is_block_design` was rather unclear, and
 rather... Costly. Here is a simpler, faster and more correct version in
 which the bug in solved.

 Before:
 {{{
 sage: D =
 IncidenceStructure(range(32),designs.steiner_quadruple_system(32))
 sage: time D.is_block_design()
 CPU times: user 14.31 s, sys: 0.00 s, total: 14.32 s
 Wall time: 14.33 s
 (True, [3, 32, 4, 1])
 }}}

 After:
 {{{
 sage: D =
 IncidenceStructure(range(32),designs.steiner_quadruple_system(32))
 sage: time D.is_block_design()
 CPU times: user 0.18 s, sys: 0.01 s, total: 0.19 s
 Wall time: 0.17 s
 (True, [2, 32, 4, 15])
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15664>
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to