#16295: Faster is_orthogonal_array
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers:
Authors: Nathann Cohen | Work issues:
Report Upstream: N/A | Commit:
Branch: u/ncohen/16295 | 31e84b82913815b2005b5e2e45650c1568a45761
Dependencies: #16236 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
Brett,
Here is the behaviour of your branch
{{{
sage: from sage.combinat.designs.latin_squares import
are_mutually_orthogonal_latin_squares
sage: m1 = matrix([[0,1,0],[2,0,1],[1,2,0]]) # not a latin square
sage: m2 = matrix([[0,1,2],[1,2,0],[2,0,1]]) # not a latin square
sage: are_mutually_orthogonal_latin_squares([m1,m2], verbose=True)
The row and column indices are not orthogonal
False
sage: m1 = matrix([[0,0,0],[1,1,1],[2,2,2]]) # not a latin square
sage: m2 = matrix([[0,1,2],[0,1,2],[0,1,2]]) # not a latin square
sage: are_mutually_orthogonal_latin_squares([m1,m2],verbose=True)
True
sage: a,b,c,d = designs.mutually_orthogonal_latin_squares(11,4)
sage: are_mutually_orthogonal_latin_squares([a,b,c,d,d],verbose=True)
Squares 1 and 2 are not orthogonal
False
}}}
The index issues come from problem I mentionned in comment 51.
> I think if MOLS people are going to be using this code then we should
add the additional 2 columns in when a MOLS gets transformed to a OA. In
that case all the error messages I have changed are correct and this is
what MOLS people will expect
Here is what my branch u/ncohen/16295_v2 (mentionned in comment 50) does :
{{{
sage: from sage.combinat.designs.latin_squares import
are_mutually_orthogonal_latin_squares
sage: m1 = matrix([[0,1,0],[2,0,1],[1,2,0]]) # not a latin square
sage: m2 = matrix([[0,1,2],[1,2,0],[2,0,1]]) # not a latin square
sage: are_mutually_orthogonal_latin_squares([m1,m2], verbose=True)
Matrix 0 is not row latin
False
sage: m1 = matrix([[0,0,0],[1,1,1],[2,2,2]]) # not a latin square
sage: m2 = matrix([[0,1,2],[0,1,2],[0,1,2]]) # not a latin square
sage: are_mutually_orthogonal_latin_squares([m1,m2],verbose=True)
Matrix 0 is not row latin
False
sage: from sage.combinat.designs.latin_squares import
are_mutually_orthogonal_latin_squares
sage: a,b,c,d = designs.mutually_orthogonal_latin_squares(11,4)
sage: are_mutually_orthogonal_latin_squares([a,b,c,d,d],verbose=True)
Matrices 3 and 4 are not orthogonal
False
}}}
Our terminology is almost the same (we can replace "matrix" with "square"
if you prefer). The interest of mine is that you do not have to add MOLS-
specific code to the `is_orthogonal_array` function. Thus do you mind if
we keep my version of the code to make `are_mutually_orthogonal_squares`
correct and include your typo fix ?
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16295#comment:62>
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/d/optout.