D
Dr. Phillip M. Feldman
I've written a recursive class that creates an iterator to solve a general
formulation of the combinatorics problem known as "balls in numbered boxes"
(also known as "indistinguishable balls in distinguishable boxes"). The
code has been extensively tested and appears to work, but isn't terribly
elegant. Any suggestions about how to improve it will be appreciated.
Also, I'd like to get this functionality into the Python's `itertools`
module (the present set of combinatorics functions in `itertools` does not
include "balls in boxes"). Does anyone know whom I should contact about
this?
Phillip
http://old.nabble.com/file/p32440187/balls_in_numbered_boxes.py
balls_in_numbered_boxes.py
formulation of the combinatorics problem known as "balls in numbered boxes"
(also known as "indistinguishable balls in distinguishable boxes"). The
code has been extensively tested and appears to work, but isn't terribly
elegant. Any suggestions about how to improve it will be appreciated.
Also, I'd like to get this functionality into the Python's `itertools`
module (the present set of combinatorics functions in `itertools` does not
include "balls in boxes"). Does anyone know whom I should contact about
this?
Phillip
http://old.nabble.com/file/p32440187/balls_in_numbered_boxes.py
balls_in_numbered_boxes.py