8 different items into 5 different boxes

  • Thread starter Thread starter Danijel
  • Start date Start date
  • Tags Tags
    combinatorics
AI Thread Summary
The discussion revolves around counting the arrangements of 8 different items into 5 different boxes, ensuring each box contains at least one item. Initially, a method using injections was proposed, but it was identified as flawed because it only guaranteed that each box could hold at most 2 items. A correct approach involves using inclusion-exclusion formulas to count surjections, ensuring all boxes receive at least one item. Alternative methods were suggested, including counting specific distribution patterns and generating sequences. The conversation emphasizes the importance of accurately accounting for item distribution in combinatorial problems.
Danijel
Messages
43
Reaction score
1
Homework Statement
How many ways are there to arrange 8 different items into 5 different boxes, each containing at least 1 item.
Relevant Equations
Number of injections, surjections, and inclusion-exclusion formulas
My teacher solved this using inclusion-exclusion formulas to count the number of surjections from a set of 8 elemets (containing items) to a set of 5 elements (containing boxes). However, I thought of a different solution. But I have a hunch it's wrong.
What I thought is to first make sure every box gets and item, so we are basically counting number of injections from a set of 5 elements(num. of boxes) to the set of 8 elements (number of items). Then we have to arrange the remaining 3 items into 5 boxes. Here we are counting the number of injections from a set of 3 elemets to the set of 5 elemets. In the end, we multiply these two results to obtain the final one.
Please, let me know what you think.

Edit: I have found a mistake in my reasoning. This only makes sure that every box gets at most 2 items. Which doesn't have to be true. One box can contain up to 4 items, respecting the problem setttings.
 
Last edited:
Physics news on Phys.org
Danijel said:
Problem Statement: How many ways are there to arrange 8 different items into 5 different boxes, each containing at least 1 item.
Relevant Equations: Number of injections, surjections, and inclusion-exclusion formulas

My teacher solved this using inclusion-exclusion formulas to count the number of surjections from a set of 8 elements (containing items) to a set of 5 elements (containing boxes). However, I thought of a different solution. But I have a hunch it's wrong.
What I thought is to first make sure every box gets and item, so we are basically counting number of injections from a set of 5 elements(num. of boxes) to the set of 8 elements (number of items). Then we have to arrange the remaining 3 items into 5 boxes. Here we are counting the number of injections from a set of 3 elements to the set of 5 elements. In the end, we multiply these two results to obtain the final one.
Please, let me know what you think.

Edit: I have found a mistake in my reasoning. This only makes sure that every box gets at most 2 items. Which doesn't have to be true. One box can contain up to 4 items, respecting the problem setttings.
Yes, you have found your mistake. That's good thinking !

Here's a idea.
For arranging the remaining 3 items into 5 boxes, would it work to simply find the number of functions from a set of 3 elements to a set of 5 elements? (I think you would have then account for some duplicate counting.)
 
Another approach is to count the possibilities for each pattern. There are only three:

4, 1, 1, 1, 1
3, 2, 1, 1, 1
2, 2, 2, 1, 1
 
Yet another approach is to generate the iterative sequence (which is actually on OEIS).

If we let ##X_n## be the number of ways of putting 8 different objects into ##n## non-empty boxes, then:

##X_1 = 1##
##X_2 = 2^8 - 2X_1##
##X_3 = 3^8 - 3X_2 - 3X_1##

Etc.
 
@Danijel : So what did you get for your answer?
 
Back
Top