http://www.perlmonks.org?node_id=805518


in reply to Re: x objects in y containers where all objects are used
in thread x objects in y containers where all objects are used

In bin-packing, the difficulty of the problem comes from the fact that the items are different sizes. In any casting of the OP problem in terms of bin packing, you would have all items the same size, which completely trivializes the problem. Also, in any bin-packing problem there is generally an unlimited supply of bins of fixed capacity, unlike in the OP where there are a fixed number of bins with unlimited capacity. Any references on bin packing (let alone TSP, which seems completely unrelated apart from it also being NP-complete, or knapsack, in which items have both a variable cost and variable weight) will be unlikely to have anything relevant for these variants (let alone the very specific problem of enumerating solutions).

blokhead

Replies are listed 'Best First'.
Re^3: x objects in y containers where all objects are used
by MidLifeXis (Monsignor) on Nov 06, 2009 at 16:53 UTC

    Update: Bad assumption confirmed.

    I am running on moritz's assumption that the bins have limited sizes. Otherwise, you are correct, it is a trivial loop or recursive iteration problem. You are also correct that the TSP is probably casting too large of a net. I tend to be a generalist.

    The solution I have in mind is the general NP solution - exhaustive search with a fitness function. In this case, the fitness function would be to check if the binsize was overshot.

    --MidLifeXis