Sage: Ticket #16227: Product construction of Transversal Designs
https://trac.sagemath.org/ticket/16227
<p>
This branch implements a product construction of transversal designs. This allows to build new transversal designs that are needed for the general construction of bibd with k=5.
</p>
<p>
Nathann
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/16227
Trac 1.1.6ncohenThu, 24 Apr 2014 13:46:46 GMTstatus changed; commit, branch set
https://trac.sagemath.org/ticket/16227#comment:1
https://trac.sagemath.org/ticket/16227#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
<li><strong>commit</strong>
set to <em>d0e33a6442be6048db925335fd006ab20fc5ffc3</em>
</li>
<li><strong>branch</strong>
set to <em>u/ncohen/16227</em>
</li>
</ul>
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=03f896c363e23a00fabf0b38b87a277354f07327"><span class="icon"></span>03f896c</a></td><td><code>trac #15310: Wilson's construction of Transversal Designs</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=6357236d82dd6714eb59a7e63bb22a7f02c18e88"><span class="icon"></span>6357236</a></td><td><code>trac #15310: Rebase on updated #15431</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=25f5959ec5fe7ccd1479fdbdcd489cf550933c7e"><span class="icon"></span>25f5959</a></td><td><code>trac #15310: Merged into 6.2.rc0</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=d0e33a6442be6048db925335fd006ab20fc5ffc3"><span class="icon"></span>d0e33a6</a></td><td><code>trac #16227: Product construction of Transversal Designs</code>
</td></tr></table>
TicketgitThu, 24 Apr 2014 14:10:40 GMTcommit changed
https://trac.sagemath.org/ticket/16227#comment:2
https://trac.sagemath.org/ticket/16227#comment:2
<ul>
<li><strong>commit</strong>
changed from <em>d0e33a6442be6048db925335fd006ab20fc5ffc3</em> to <em>054d2a2ffa441f675594a09b95cf943f41121b4c</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=054d2a2ffa441f675594a09b95cf943f41121b4c"><span class="icon"></span>054d2a2</a></td><td><code>trac #16227: Product construction of Transversal Designs</code>
</td></tr></table>
TicketvdelecroixThu, 01 May 2014 11:23:27 GMT
https://trac.sagemath.org/ticket/16227#comment:3
https://trac.sagemath.org/ticket/16227#comment:3
<p>
Hi,
</p>
<p>
Once you have fix the merge with <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, here are other problems
</p>
<ul><li>the product is sometimes called the Kronecker product and it should be mentioned in the doc.
</li><li>I do not like the way it works: <code>wilson_construction</code> and <code>TD_product</code> have the same purpose, build more examples of TD. But first of all, the naming scheme are different. Why not TD_wilson_construction? More importantly, in Wilson construction, you do not have to feed the function with the TD(k,m), TD(k,m+1), TD(k+1,t) and TD(k,u) but for the product you have to. From what you started with in Wilson construction, I thought we would have a function <code>def product(k, n1, n2):</code>.
</li></ul><p>
It might be easier to do the whole review in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>. I propose to merge the two tickets and set this one as won't fix.
</p>
TicketvdelecroixThu, 01 May 2014 14:27:29 GMT
https://trac.sagemath.org/ticket/16227#comment:4
https://trac.sagemath.org/ticket/16227#comment:4
<p>
1) As I mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, I would prefer to have <code>TD_product</code> to be something called with arguments <code>k,n1,n2</code> as it is for Wilson construction. Specifications <code>def TD_product(k,n1,n2,TD1=None,TD2=None)</code> might be better. But then, if you provide TD1 and TD2, the arguments k,n1,n2 are redundant.
</p>
<p>
2) Is there any link between this product construction and the one for mols?
</p>
<p>
3) As Brett mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, it would make sense to have a more involved <code>find_wilson_decomposition</code> which also contains product. There are tons of variants of Wilson decomposition and according to Colbourne-Dinitz this is how most of the current records are obtained. We might concentrate all the non-direct constructions into a global function <code>build_TD_from_smaller_ones</code> or <code>generalized_Wilson_construction</code>.
</p>
TicketncohenThu, 01 May 2014 14:33:15 GMT
https://trac.sagemath.org/ticket/16227#comment:5
https://trac.sagemath.org/ticket/16227#comment:5
<p>
Yo !
</p>
<blockquote class="citation">
<p>
1) As I mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, I would prefer to have <code>TD_product</code> to be something called with arguments <code>k,n1,n2</code> as it is for Wilson construction. Specifications <code>def TD_product(k,n1,n2,TD1=None,TD2=None)</code> might be better. But then, if you provide TD1 and TD2, the arguments k,n1,n2 are redundant.
</p>
</blockquote>
<p>
What is the point of having a function <code>TD_product</code> which only takes integer as input ? What can it do that <code>designs.transversal_design(...)</code> does not already do ?
</p>
<p>
What we could do is implement a second function TD_product_from_parameters which calls the other ?
</p>
<blockquote class="citation">
<p>
3) As Brett mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, it would make sense to have a more involved <code>find_wilson_decomposition</code> which also contains product. There are tons of variants of Wilson decomposition and according to Colbourne-Dinitz this is how most of the current records are obtained. We might concentrate all the non-direct constructions into a global function <code>build_TD_from_smaller_ones</code> or <code>generalized_Wilson_construction</code>.
</p>
</blockquote>
<p>
Whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ?
</p>
<p>
Right now I am building all the constructions of OA in such a way that they all take the same parameters :
</p>
<p>
<code>function_that_builds_OA(k,n,availability)</code>
</p>
<p>
and it does what you expect, i.e. try if it is able to build this OA and answers accordingly. If we can make all functions that return OA behave this way, and the constructor can look like this :
</p>
<pre class="wiki">for f in [f1,f2,f3,f4,....]:
# try if f can be the OA we want, otherwise try the next.
</pre><p>
So if we have recursive functions behaving this way, we can just add them to the list !
</p>
<p>
Nathann
</p>
TicketncohenThu, 01 May 2014 14:34:52 GMT
https://trac.sagemath.org/ticket/16227#comment:6
https://trac.sagemath.org/ticket/16227#comment:6
<p>
(scuse me, replace "availability" with "existence")
</p>
TicketgitThu, 01 May 2014 19:00:05 GMTcommit changed
https://trac.sagemath.org/ticket/16227#comment:7
https://trac.sagemath.org/ticket/16227#comment:7
<ul>
<li><strong>commit</strong>
changed from <em>054d2a2ffa441f675594a09b95cf943f41121b4c</em> to <em>a512ab154b21caaf74d6ccef2cf32bf67179eee9</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=f23fa885ee5a080f2a8051f23f7fc9f130541849"><span class="icon"></span>f23fa88</a></td><td><code>trac #15310: useless checks</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=62f0158c281c55523a532d5ef21c666ba9c7dc3d"><span class="icon"></span>62f0158</a></td><td><code>trac #15310: cutting some branches of the exploration</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=d74341411288315f13da3d4383e515b884ba7440"><span class="icon"></span>d743414</a></td><td><code>trac #15310: reviewer's remarks</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=3fc79ba5be0b99e99593ff54bfa075a52cc5937c"><span class="icon"></span>3fc79ba</a></td><td><code>trac #15310: Merged into 6.2.rc1</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=a512ab154b21caaf74d6ccef2cf32bf67179eee9"><span class="icon"></span>a512ab1</a></td><td><code>trac #16227: Merged with updated #15310</code>
</td></tr></table>
TicketvdelecroixThu, 01 May 2014 21:32:19 GMT
https://trac.sagemath.org/ticket/16227#comment:8
https://trac.sagemath.org/ticket/16227#comment:8
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/16227#comment:5" title="Comment 5">ncohen</a>:
</p>
<blockquote class="citation">
<p>
Yo !
</p>
<blockquote class="citation">
<p>
1) As I mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, I would prefer to have <code>TD_product</code> to be something called with arguments <code>k,n1,n2</code> as it is for Wilson construction. Specifications <code>def TD_product(k,n1,n2,TD1=None,TD2=None)</code> might be better. But then, if you provide TD1 and TD2, the arguments k,n1,n2 are redundant.
</p>
</blockquote>
<p>
What is the point of having a function <code>TD_product</code> which only takes integer as input ? What can it do that <code>designs.transversal_design(...)</code> does not already do ?
</p>
<p>
What we could do is implement a second function TD_product_from_parameters which calls the other ?
</p>
</blockquote>
<p>
Sometimes you want only functions with the same prototype and sometimes you claim it is better otherwise...
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
3) As Brett mentioned in <a class="closed ticket" href="https://trac.sagemath.org/ticket/15310" title="enhancement: Wilson's construction of Transversal Designs/Orthogonal Arrays/MOLS (closed: fixed)">#15310</a>, it would make sense to have a more involved <code>find_wilson_decomposition</code> which also contains product. There are tons of variants of Wilson decomposition and according to Colbourne-Dinitz this is how most of the current records are obtained. We might concentrate all the non-direct constructions into a global function <code>build_TD_from_smaller_ones</code> or <code>generalized_Wilson_construction</code>.
</p>
</blockquote>
<p>
Whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy ?
</p>
<p>
Right now I am building all the constructions of OA in such a way that they all take the same parameters :
</p>
<p>
<code>function_that_builds_OA(k,n,availability)</code>
</p>
<p>
and it does what you expect, i.e. try if it is able to build this OA and answers accordingly. If we can make all functions that return OA behave this way, and the constructor can look like this :
</p>
</blockquote>
<p>
All right. What I meant is that it makes sense to try Wilson and product in the same function that builds OA. But on the other hands, calling divisors is relatively cheap on the kind of entries you will have. In a near future (and according to the TODO) the Wilson construction might be much more involved... will see.
</p>
<p>
There was doctest error that I solved on u/vdelecroix/16227. I also added curiosity doctests (the current maximum k that Sage knows from n between 10 and 20).
</p>
<p>
See the changes in u/vdelecroix/16227, if you are happy with them this is good to go.
</p>
TicketncohenThu, 01 May 2014 21:37:58 GMT
https://trac.sagemath.org/ticket/16227#comment:9
https://trac.sagemath.org/ticket/16227#comment:9
<blockquote class="citation">
<p>
Sometimes you want only functions with the same prototype and sometimes you claim it is better otherwise...
</p>
</blockquote>
<p>
1) I think that having a TD product functions that accepts TD as input and not only parameters is useful
</p>
<p>
2) I think that at the moment Wilson's construction with TD as input is not really useful, as it is a complex thing and nobody knows it exists
</p>
<p>
3) I think that all constructors should have the same prototype to give us a clean <code>orthogonal_array</code> function
</p>
<p>
4) Thus creating a second function that calls the current TD and has the same prototype as the others makes sense to me.
</p>
<blockquote class="citation">
<p>
All right. What I meant is that it makes sense to try Wilson and product in the same function that builds OA. But on the other hands, calling divisors is relatively cheap on the kind of entries you will have. In a near future (and according to the TODO) the Wilson construction might be much more involved... will see.
</p>
</blockquote>
<p>
Calling divisors is 100% free compared to the kind of constructions we deal with. We create fields, products, long lists, temporary matrices of thousands of entries. Calling divisors *is* free.
</p>
<blockquote class="citation">
<p>
There was doctest error that I solved on u/vdelecroix/16227. I also added curiosity doctests (the current maximum k that Sage knows from n between 10 and 20).
</p>
<p>
See the changes in u/vdelecroix/16227, if you are happy with them this is good to go.
</p>
</blockquote>
<p>
I will look at this immediately.
</p>
<p>
Nathann
</p>
TicketncohenThu, 01 May 2014 21:39:54 GMT
https://trac.sagemath.org/ticket/16227#comment:10
https://trac.sagemath.org/ticket/16227#comment:10
<p>
Looks cool. Do you mind if I change your "curiosity tests" by using <code>availability=True</code>, so that we have boolean answers instead of exceptions ? And this will become "Unknown" return values in a later patch.
</p>
<p>
Nathann
</p>
TicketgitThu, 01 May 2014 21:44:52 GMTcommit changed
https://trac.sagemath.org/ticket/16227#comment:11
https://trac.sagemath.org/ticket/16227#comment:11
<ul>
<li><strong>commit</strong>
changed from <em>a512ab154b21caaf74d6ccef2cf32bf67179eee9</em> to <em>4d6e964775e4d6734e677a9f281f56aee11bb696</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=e62fae83fadf558f57548c6034e7ef8c48397c0a"><span class="icon"></span>e62fae8</a></td><td><code>corrected doctests + new doctests</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=4d6e964775e4d6734e677a9f281f56aee11bb696"><span class="icon"></span>4d6e964</a></td><td><code>trac #16227: Replace exception with booleans in the doctests</code>
</td></tr></table>
TicketncohenThu, 01 May 2014 21:45:49 GMT
https://trac.sagemath.org/ticket/16227#comment:12
https://trac.sagemath.org/ticket/16227#comment:12
<p>
Well... Actually they were "Unknown" answers already.. So if you don't mind here is the branch, otherwise we can go back to your latest commit, it is not very important. Just easier to read (for me), and it advertises the "Unknown" truth values for those who haven't met them.
</p>
<p>
Nathann
</p>
TicketvdelecroixFri, 02 May 2014 08:48:31 GMTstatus changed
https://trac.sagemath.org/ticket/16227#comment:13
https://trac.sagemath.org/ticket/16227#comment:13
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
Ok. Then it is good for me.
</p>
<p>
Vincent
</p>
TicketgitSun, 04 May 2014 16:08:18 GMTstatus, commit changed
https://trac.sagemath.org/ticket/16227#comment:14
https://trac.sagemath.org/ticket/16227#comment:14
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>needs_review</em>
</li>
<li><strong>commit</strong>
changed from <em>4d6e964775e4d6734e677a9f281f56aee11bb696</em> to <em>5cfee91760bd3b73d19ebc1318a94861d62b226f</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=e86d26cb8126f3e557cc6a27b1727e2055f67321"><span class="icon"></span>e86d26c</a></td><td><code>trac #15310: Merged with 6.2.rc2</code>
</td></tr><tr><td><a class="ext-link" href="http://git.sagemath.org/sage.git/commit/?id=5cfee91760bd3b73d19ebc1318a94861d62b226f"><span class="icon"></span>5cfee91</a></td><td><code>trac #16227: Merged with updated #15310</code>
</td></tr></table>
TicketncohenSun, 04 May 2014 16:10:12 GMTstatus changed; reviewer set
https://trac.sagemath.org/ticket/16227#comment:15
https://trac.sagemath.org/ticket/16227#comment:15
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
<li><strong>reviewer</strong>
set to <em>Vincent Delecroix</em>
</li>
</ul>
<p>
(same trivial conflict with the new release)
</p>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/16227#comment:16
https://trac.sagemath.org/ticket/16227#comment:16
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
TicketvbraunWed, 07 May 2014 08:31:11 GMTstatus, branch changed; resolution set
https://trac.sagemath.org/ticket/16227#comment:17
https://trac.sagemath.org/ticket/16227#comment:17
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>branch</strong>
changed from <em>u/ncohen/16227</em> to <em>5cfee91760bd3b73d19ebc1318a94861d62b226f</em>
</li>
</ul>
Ticket