Opened 7 years ago
Closed 7 years ago
#18608 closed enhancement (fixed)
Arc method in BalancedIncompleteBlockDesign class
Reported by:  q.honore  Owned by:  

Priority:  major  Milestone:  sage6.9 
Component:  combinatorial designs  Keywords:  
Cc:  vdelecroix, ncohen  Merged in:  
Authors:  Quentin Honoré, Vincent Delecroix  Reviewers:  Nathann Cohen 
Report Upstream:  N/A  Work issues:  
Branch:  cbc952e (Commits, GitHub, GitLab)  Commit:  cbc952eed400d1785aa9530351b7db06b3232e29 
Dependencies:  Stopgaps: 
Description (last modified by )
Add arc method in BalancedIncompleteBlockDesign?.
Change History (25)
comment:1 Changed 7 years ago by
 Branch changed from u/q.honore/bibd to public/18608
comment:2 Changed 7 years ago by
 Commit set to 8e29523f838e964a3ba618d3644bc74a1cb7db80
comment:3 Changed 7 years ago by
 Status changed from new to needs_review
comment:4 Changed 7 years ago by
Helloooooo ! Isn't 'blocking set' equivalent to 2coloring of hypergraphs (see #17542)?
Nathann
comment:5 Changed 7 years ago by
Yes, you're right, it's exactly the same. Arc may be useful though Quentin
comment:6 Changed 7 years ago by
Hello,
For arcs, there is a more general notion that will not cost a lot to implement:
A
(s,n)
arc is a set ofn
points so that in each block there are at mosts
of them. The case ofs=1
corresponds to independent set in graph. The case ofs=2
corresponds to the current definition you used.
Given a (v,b,r,k)
bibd (with lambda=1
) it is easy to show that the cardinality n
of an (s,n)
arc satisfies
n <= 1 + (r1)(s1)
The arcs for which the above is an equality are called maximal arcs.
Vincent
comment:7 Changed 7 years ago by
 Commit changed from 8e29523f838e964a3ba618d3644bc74a1cb7db80 to 98ed48986340835ee616dbe7c30ee191bee41a35
comment:8 Changed 7 years ago by
 Commit changed from 98ed48986340835ee616dbe7c30ee191bee41a35 to a76436a4bb79e315938816cce5798f0c8099cc03
Branch pushed to git repo; I updated commit sha1. New commits:
a76436a  Description changed

comment:9 Changed 7 years ago by
 Description modified (diff)
 Summary changed from Arc and blocking_set methods in BalancedIncompleteBlockDesign class to Arc method in BalancedIncompleteBlockDesign class
comment:10 Changed 7 years ago by
 Reviewers set to Vincent Delecroix
 Status changed from needs_review to needs_work
Hello,
Sometimes you use one back quote as `(s,n)`
and sometimes two as ``s``
. As you can see, the rendering is quite different in the documentation. The single backquote is used for LaTeX code while the double is used to mention the parameters of the algorithm. Try to not mix them in the same line.
It is dangerous to return self._points
directly as it might be modified by the users. Return rather a copy of it using return self._points[:]
.
The rest looks good.
Vincent
comment:11 Changed 7 years ago by
Would it be possible to replace 'highest cardinality' with 'maximum cardinality'? Also, would it be possible to replace 'number' with 'maximum number' in the definition of 's'?
Thanks,
Nathann
comment:12 Changed 7 years ago by
 Commit changed from a76436a4bb79e315938816cce5798f0c8099cc03 to 831f346f13f8bd439850cec8ddcf912147a75d19
Branch pushed to git repo; I updated commit sha1. New commits:
831f346  Work on description

comment:13 Changed 7 years ago by
 Status changed from needs_work to needs_review
comment:14 Changed 7 years ago by
 Commit changed from 831f346f13f8bd439850cec8ddcf912147a75d19 to a6d38932e82777967163fb725f58a0255c077c59
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
03a7295  Add methods arc and blocking_set in BIBD class

9c198b2  Corrected small errors in documentation

73cc907  Deleted blocking set method, arc method is now for (s,n)arc

31eeaed  Description changed

b38469f  Work on description

a6d3893  Trac #18608: more doc

comment:15 Changed 7 years ago by
 Milestone changed from sage6.8 to sage6.9
Hello,
I rebased above the latest beta and updated the doc. Nathann could you have a look?
Vincent
comment:16 Changed 7 years ago by
sage: b=designs.balanced_incomplete_block_design(7,3) sage: len(b.arc()) 4 sage: b.relabel(list("abcdefg")) sage: len(b.arc()) 7
comment:17 Changed 7 years ago by
 Commit changed from a6d38932e82777967163fb725f58a0255c077c59 to 25ab24491d3cbbab10cb8dbbb95ed3a58d97f171
Branch pushed to git repo; I updated commit sha1. New commits:
25ab244  Trac #18608: fix labelings

comment:18 Changed 7 years ago by
 Commit changed from 25ab24491d3cbbab10cb8dbbb95ed3a58d97f171 to e570d949c8e428ec6cb7c099600bf43f66cf7fe9
Branch pushed to git repo; I updated commit sha1. New commits:
e570d94  Trac #18608: add a doctest

comment:19 Changed 7 years ago by
Sorry for that...
comment:20 Changed 7 years ago by
sage: b = designs.balanced_incomplete_block_design(7,3) sage: b.relabel(list("abcdefg")) sage: b.ground_set() ['a', 'b', 'c', 'd', 'e', 'f', 'g'] sage: b.arc() [0, 1, 2, 5]
comment:21 Changed 7 years ago by
 Commit changed from e570d949c8e428ec6cb7c099600bf43f66cf7fe9 to 9ed9d8e2f624e3b642fb19d02ce527f0250c13c2
Branch pushed to git repo; I updated commit sha1. New commits:
9ed9d8e  Trac #18608: fix labelings again

comment:22 Changed 7 years ago by
Four doctests broke on my machine, since I use a different LP solver. I flagged the dangerous ones with "random" and turned the final test into a boolean one.
I added the commit to that branch since you made it public, and you can change the ticket's status if you agree with it.
Nathann
comment:23 Changed 7 years ago by
 Commit changed from 9ed9d8e2f624e3b642fb19d02ce527f0250c13c2 to cbc952eed400d1785aa9530351b7db06b3232e29
Branch pushed to git repo; I updated commit sha1. New commits:
cbc952e  trac #18608: Reviewer's commit

comment:24 Changed 7 years ago by
 Reviewers changed from Vincent Delecroix to Nathann Cohen
 Status changed from needs_review to positive_review
Thanks Nathann!
comment:25 Changed 7 years ago by
 Branch changed from public/18608 to cbc952eed400d1785aa9530351b7db06b3232e29
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
Add methods arc and blocking_set in BIBD class
Corrected small errors in documentation