Opened 6 years ago
Closed 6 years ago
#17941 closed enhancement (fixed)
Automatic guess of the groups in a GDD
Reported by:  brett  Owned by:  

Priority:  major  Milestone:  sage6.6 
Component:  combinatorial designs  Keywords:  group divisible design, block design 
Cc:  ncohen, brett, danziger, vdelecroix  Merged in:  
Authors:  Nathann Cohen  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  7336c5c (Commits, GitHub, GitLab)  Commit:  7336c5c42f3f6272e55f578d4bbb392ec6ee3f6e 
Dependencies:  Stopgaps: 
Description (last modified by )
This branch lets one define a GDD without specifying its groups. The automatic guess is performed in the is_group_divisible_design
routine, as it also requires to list the pairs which appear in a block.
Nathann
Change History (10)
comment:1 Changed 6 years ago by
 Branch set to public/17941
 Cc vdelecroix added
 Commit set to 6859373952230f33639e3eb021e2dc0fd1670dc6
 Description modified (diff)
 Status changed from new to needs_review
 Summary changed from is_group_divisible_design enhancement to Automatic guess of the groups in a GDD
comment:2 Changed 6 years ago by
 Reviewers set to Vincent Delecroix
 Status changed from needs_review to needs_work
sage t long src/sage/combinat/designs/designs_pyx.pyx ********************************************************************** File "src/sage/combinat/designs/designs_pyx.pyx", line 207, in sage.combinat.designs.designs_pyx.is_group_divisible_design Failed example: is_group_divisible_design([range(40)],[["e",2]],40,G=[5],lambd=1,verbose=True) Expected: a group has size 40 while G=[5] False Got: e does not belong to [0,...,39] False **********************************************************************
comment:3 Changed 6 years ago by
 Commit changed from 6859373952230f33639e3eb021e2dc0fd1670dc6 to 884a359e7b5cf4d65000bbf67d9fa4aaf63c7bdb
comment:4 Changed 6 years ago by
 Status changed from needs_work to needs_review
Sorry ! rebased and fixed.
Nathann
comment:5 followup: ↓ 6 Changed 6 years ago by
 Status changed from needs_review to needs_info
Hello,
Shouldn't
if matrix[i*n+j] == 0: ...
be
if matrix[i*n+j] < l: ...
This suggest to add an example with lambd > 1
.
Vincent
comment:6 in reply to: ↑ 5 ; followup: ↓ 8 Changed 6 years ago by
 Status changed from needs_info to needs_review
Hello,
Shouldn't
if matrix[i*n+j] == 0: ...be
if matrix[i*n+j] < l: ...
Both work. Consider the whole matrix: for the design to be a GDD, it must have two types of entries only: 0
or l
.
1) If the matrix is a real GDD, you can see that the two are equivalent 2) If the matrix is not a GDD, the 'error' message will differ. (wrong size of groups, or a pair not present the right number of times, or two points of a group contained in the same set, ...)
This suggest to add an example with
lambd > 1
.
Do you have an example in mind?
Nathann
comment:7 Changed 6 years ago by
 Commit changed from 884a359e7b5cf4d65000bbf67d9fa4aaf63c7bdb to 7336c5c42f3f6272e55f578d4bbb392ec6ee3f6e
Branch pushed to git repo; I updated commit sha1. New commits:
7336c5c  Trac #17941: one missing sage_free + doc

comment:8 in reply to: ↑ 6 Changed 6 years ago by
Replying to ncohen:
Hello,
Shouldn't <SNIP>
Both work. Consider the whole matrix: for the design to be a GDD, it must have two types of entries only:
0
orl
.
right!
This suggest to add an example with
lambd > 1
.Do you have an example in mind?
I added a dummy example.
I am done with the review. Tell me what you think of 7336c5c
.
Vincent
comment:9 Changed 6 years ago by
 Status changed from needs_review to positive_review
Oops. Thanks for the 'free' I forgot!
Nathann
comment:10 Changed 6 years ago by
 Branch changed from public/17941 to 7336c5c42f3f6272e55f578d4bbb392ec6ee3f6e
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
trac #17941: Automatic guess of the groups in a GDD