Opened 6 years ago

Closed 6 years ago

# Automatic guess of the groups in a GDD

Reported by: Owned by: brett major sage-6.6 combinatorial designs group divisible design, block design ncohen, brett, danziger, vdelecroix Nathann Cohen Vincent Delecroix N/A 7336c5c 7336c5c42f3f6272e55f578d4bbb392ec6ee3f6e

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

### comment:1 Changed 6 years ago by ncohen

• Authors set to Nathann Cohen
• Branch set to public/17941
• 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

New commits:

 ​6859373 `trac #17941: Automatic guess of the groups in a GDD`

### comment:2 Changed 6 years ago by vdelecroix

• 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 git

• Commit changed from 6859373952230f33639e3eb021e2dc0fd1670dc6 to 884a359e7b5cf4d65000bbf67d9fa4aaf63c7bdb

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

 ​a328329 `trac #17941: Automatic guess of the groups in a GDD` ​884a359 `trac #17941: Broken doctest`

### comment:4 Changed 6 years ago by ncohen

• Status changed from needs_work to needs_review

Sorry ! rebased and fixed.

Nathann

### comment:5 follow-up: ↓ 6 Changed 6 years ago by vdelecroix

• 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 ; follow-up: ↓ 8 Changed 6 years ago by ncohen

• 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 git

• 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 vdelecroix

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` or `l`.

right!

This suggest to add an example with `lambd > 1`.

Do you have an example in mind?

I am done with the review. Tell me what you think of `​7336c5c`.

Vincent

### comment:9 Changed 6 years ago by ncohen

• Status changed from needs_review to positive_review

Oops. Thanks for the 'free' I forgot!

Nathann

### comment:10 Changed 6 years ago by vbraun

• Branch changed from public/17941 to 7336c5c42f3f6272e55f578d4bbb392ec6ee3f6e
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.