[issue12961] unlabelled balls in boxes
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file23132/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file23134/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Terry J. Reedy tjre...@udel.edu added the comment: Feature requests only apply to 3.3. To echo Mark: there are an indefinite number of combinatorial generators that could be added. The itertools module should only have a few of the most generally useful, especially in combination with other tools. An extensive combinatorics package would be a different project. (And I have done a bit of work in this direction.) -- nosy: +terry.reedy versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Mark Dickinson dicki...@gmail.com added the comment: unlabelled balls in unlabelled boxes with capacity limits What does this mean? If the boxes are unlabelled, how can they have individual capacity limits? Or do you mean just a single limit that applies to all boxes? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Mark Dickinson dicki...@gmail.com added the comment: unlabelled balls in labelled boxes with capacity limits Out of curiosity, what was the application that you needed this for? This one feels a bit too specialized to me to be worth adding to the itertools library; I see itertools more as providing a collection of general-purpose tools that the user can combine for specific situations, and it's easy to do the above with itertools.combinations plus some filtering of the results to satisfy the capacity constraints. Admittedly, that's less-efficient than a custom-built recursive solution. -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment: Hello Mark, This is a fair question. Suppose that I have three boxes with capacity limits of 3, 2, and 1, and that there are three balls in total. Two of the possible distributions are the following: 2, 0, 1 2, 1, 0 Capacity limits of the individual boxes must be observed when distributing the balls. Even though the second and third boxes have different capacities, we must treat the above two distributions of balls as equivalent. Combinatorics problems involving boxes with capacity limits arise in such application domains as physics and reliability. Phillip On Mon, Sep 12, 2011 at 5:13 AM, Mark Dickinson rep...@bugs.python.orgwrote: Mark Dickinson dicki...@gmail.com added the comment: unlabelled balls in unlabelled boxes with capacity limits What does this mean? If the boxes are unlabelled, how can they have individual capacity limits? Or do you mean just a single limit that applies to all boxes? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ -- nosy: +phillip.m.feld...@gmail.com Added file: http://bugs.python.org/file23132/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___Hello Mark,brbrThis is a fair question. Suppose that I have three boxes with capacity limits of 3, 2, and 1, and that there are three balls in total. Two of the possible distributions are the following:brbr2, 0, 1br 2, 1, 0brbrCapacity limits of the individual boxes must be observed when distributing the balls. Even though the second and third boxes have different capacities, we must treat the above two distributions of balls as equivalent.br brCombinatorics problems involving boxes with capacity limits arise in such application domains as physics and reliability.brbrPhillipbrbrdiv class=gmail_quoteOn Mon, Sep 12, 2011 at 5:13 AM, Mark Dickinson span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:br blockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;br Mark Dickinson lt;a href=mailto:dicki...@gmail.com;dicki...@gmail.com/agt; added the comment:br div class=imbr gt; quot;unlabelled balls in unlabelled boxes with capacity limitsquot;br br /divWhat does this mean?  If the boxes are unlabelled, how can they have individual capacity limits?  Or do you mean just a single limit that applies to all boxes?br br --br nosy: +mark.dickinsonbr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue12961; target=_blankhttp://bugs.python.org/issue12961/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment: Here's an example of a problem from an entirely different domain: An error control coding scheme can correct up to 3 errors in the header of a packet and up to one error in the body of a packet. A given message is divided into four consecutive packets. Find all possible correctible distributions of 6 errors among the four packets, treating the order of the four packets as significant. Phillip On Mon, Sep 12, 2011 at 9:41 AM, Phillip M. Feldman rep...@bugs.python.orgwrote: Phillip M. Feldman phillip.m.feld...@gmail.com added the comment: Hello Mark, This is a fair question. Suppose that I have three boxes with capacity limits of 3, 2, and 1, and that there are three balls in total. Two of the possible distributions are the following: 2, 0, 1 2, 1, 0 Capacity limits of the individual boxes must be observed when distributing the balls. Even though the second and third boxes have different capacities, we must treat the above two distributions of balls as equivalent. Combinatorics problems involving boxes with capacity limits arise in such application domains as physics and reliability. Phillip On Mon, Sep 12, 2011 at 5:13 AM, Mark Dickinson rep...@bugs.python.org wrote: Mark Dickinson dicki...@gmail.com added the comment: unlabelled balls in unlabelled boxes with capacity limits What does this mean? If the boxes are unlabelled, how can they have individual capacity limits? Or do you mean just a single limit that applies to all boxes? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ -- nosy: +phillip.m.feld...@gmail.com Added file: http://bugs.python.org/file23132/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ -- Added file: http://bugs.python.org/file23134/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___Here#39;s an example of a problem from an entirely different domain:brbrAn error control coding scheme can correct up to 3 errors in the header of a packet and up to one error in the body of a packet. A given message is divided into four consecutive packets. Find all possible correctible distributions of 6 errors among the four packets, treating the order of the four packets as significant.br brPhillipbrbrdiv class=gmail_quoteOn Mon, Sep 12, 2011 at 9:41 AM, Phillip M. Feldman span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; br Phillip M. Feldman lt;a href=mailto:phillip.m.feld...@gmail.com;phillip.m.feld...@gmail.com/agt; added the comment:br div class=imbr Hello Mark,br br This is a fair question. Â Suppose that I have three boxes with capacitybr limits of 3, 2, and 1, and that there are three balls in total. Â Two of thebr possible distributions are the following:br br 2, 0, 1br 2, 1, 0br br Capacity limits of the individual boxes must be observed when distributingbr the balls. Â Even though the second and third boxes have differentbr capacities, we must treat the above two distributions of balls asbr equivalent.br br Combinatorics problems involving boxes with capacity limits arise in suchbr application domains as physics and reliability.br br Phillipbr br On Mon, Sep 12, 2011 at 5:13 AM, Mark Dickinson lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;wrote:br br gt;br /divdivdiv/divdiv class=h5gt; Mark Dickinson lt;a href=mailto:dicki...@gmail.com;dicki...@gmail.com/agt; added the comment:br gt;br gt; gt; quot;unlabelled balls in unlabelled boxes with capacity limitsquot;br gt;br gt; What does this mean? Â If the boxes are unlabelled, how can they havebr gt; individual capacity limits? Â Or do you mean just a single limit that appliesbr gt; to all boxes?br gt;br gt; --br gt; nosy: +mark.dickinsonbr gt;br gt; ___br gt; Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br gt; lt;a href=http://bugs.python.org/issue12961; target=_blankhttp://bugs.python.org/issue12961/agt;br gt; ___br gt;br br /div/div--br nosy: +a href=mailto:phillip.m.feld...@gmail.com;phillip.m.feld...@gmail.com/abr Added file: a href=http://bugs.python.org/file23132/unnamed; target=_blankhttp://bugs.python.org/file23132/unnamed/abr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue12961;
[issue12961] unlabelled balls in boxes
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12961] unlabelled balls in boxes
New submission from Phillip Feldman phillip.m.feld...@gmail.com: The current set of combinatorial functions in `itertools` does not include unlabelled balls in labeled boxes and unlabelled balls in unlabelled boxes. If the boxes have no capacity limits (i.e., can store an unlimited number of balls), then the unlabelled balls in labelled boxes can be handled with existing tools. But, this is a special case. Various people have developed working Python implementations for the unlabelled balls in labelled boxes with capacity limits problem. I believe that unlabelled balls in unlabelled boxes with capacity limits can be handled with a minor variation on the same algorithm. It would be a great benefit to have this capability in `itertools`. -- messages: 143874 nosy: Phillip.M.Feldman, rhettinger priority: normal severity: normal status: open title: unlabelled balls in boxes type: feature request versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com