# Combinatorics Problem

• iScience
In summary, the number of different arrangements for a set of pens of different colors can be found using the formula $$_nC_r = \frac{n!}{r!(n-r)!}$$However, if there are identical pens of the same color, the number of arrangements must be divided by the number of ways to arrange those identical pens amongst themselves. This can be represented by a product of combinations, where the indices represent the number of identical pens for each color. Therefore, the correct formula to find the number of arrangements for a set of pens with different colors and some identical pens is $$\prod_{i=1}^m {_{n - \sum_{j=1}^{i-1} r_j #### iScience ## Homework Statement I have: 4 Blue pens 16 Green pens 7 Red pens 11 Yellow pens If I lay out all the pens in a single row, how many different arrangements does this system have? ## Homework Equations$$_nC_r = \frac{n!}{r!(n-r)!}$$## The Attempt at a Solution Procedure: Basically the number of ways I can arrange the 4 blue pens within the 38 spaces, and then the number of ways I can arrange the 16 green pens within the 38-4 spaces, etc.$$n = Total pens = 38$$Total Number of Arrangements$$ = \sum(_{(n - \sum r_i)}C_{(r_i)}) _{(38)}C_4 + _{(38-4)}C_{16} + _{(38-4-16)}C_7 +_{(38-4-16-7)}C_{11}$$But doing it this way depends on the order in which I calculate the combinations. Clearly doing something wrong. You can arrange the second colour in the same number of ways for each way in which you arranged the first colour. Answer is 38! (38 factorial). The colours are irrelevant - just because two pens have of the same colour, that doesn't mean you can't distinguish between them (this isn't quantum mechanics where you have particles of the same type that can't be distinguished from each other). You can swap around two, say red, pens and it gives different arrangement, just like swapping around two pens of different colours gives a different arrangement . Colour is irrelevant. Last edited: julian said: The colours are irrelevant - just because two pens have of the same colour, that doesn't mean you can't distinguish between them It is absolutely standard in this kind of problem that you should treat pens of the same colour as indistinguishable. That is, "arrangements" means visually distinct arrangements. haruspex said: It is absolutely standard in this kind of problem that you should treat pens of the same colour as indistinguishable. That is, "arrangements" means visually distinct arrangements. I take your point! It had occurred to me. Yes, the question wouldn't be interesting if there wasn't some assumption that swapping around two pens of the same colour is not a different arrangement. In which case I would say the answer is 38! divided by the number of ways of arranging the blue pens amongst each other, the number of ways of arranging the green pens amongst each other, the number of ways of arranging the red pens amongst each other, and the number of ways of arranging the yellow pens amongst each other. However, strictly speaking, given any arrangement of the pens you can literally pick up one red pen, and another red pen and swap them around, knowing that the actual pens are now in a different arrangement. Last edited: julian said: Answer is 38! (38 factorial). The colours are irrelevant - just because two pens have of the same colour, that doesn't mean you can't distinguish between them (this isn't quantum mechanics where you have particles of the same type that can't be distinguished from each other). You can swap around two, say red, pens and it gives different arrangement, just like swapping around two pens of different colours gives a different arrangement . Colour is irrelevant. The purpose of mentioning the colors is so that one would treat them the same. haruspex said: You can arrange the second colour in the same number of ways for each way in which you arranged the first colour. I don't quite follow. Can you elaborate? Hello iScience. Sorry, I'm a physicist and was being pernickety. You mention the formula ## {n! \over r! (n-r)!} . ## do you understand that this is the formula would work straight away as a single expression if you only had pens of two different colours. Understand how to derive this formula first and that you should help you understand how to write down a single expression in the case where you have pens of four different colours - it is easily written as manifestly independent of the order. Last edited: iScience said: I don't quite follow. Can you elaborate? Try a much simpler case, two pens, each a different colour. The formula you used originally would give 2C1+1C1=3. Can you see why that is wrong? Try three of one colour and two of another. • iScience haruspex said: Try a much simpler case, two pens, each a different colour. The formula you used originally would give 2C1+1C1=3. Can you see why that is wrong? Try three of one colour and two of another. Ah okay, from the point you make then I can see that I am over-counting somewhere, but having a number of different colors greater than two... Hmm... ooh is it a multiplicitive system?? Since, for each case of pen_type arrangement, there are .. sub-states for each arrangement of the other colors. So then it would be$$\prod {_{n - \sum r_i}C_{r_i}}$$yes?? iScience said: Ah okay, from the point you make then I can see that I am over-counting somewhere, but having a number of different colors greater than two... Hmm... ooh is it a multiplicitive system?? Since, for each case of pen_type arrangement, there are .. sub-states for each arrangement of the other colors. So then it would be$$\prod {_{n - \sum r_i}C_{r_i}}$$yes?? Yes (with suitable bounds on that sum). Hmm? I mean the bounds are just 1 to however many colors I have right? iScience said: Hmm? I mean the bounds are just 1 to however many colors I have right? I meant that if i is the index in the product then you need a different index in the sum, j say, and its range would be up to i-1. iScience said: ## Homework Statement I have: 4 Blue pens 16 Green pens 7 Red pens 11 Yellow pens If I lay out all the pens in a single row, how many different arrangements does this system have? ## Homework Equations$$_nC_r = \frac{n!}{r!(n-r)!}
Your relevant equation would hold if there were only two colors. Assume you have 6 pens, 3 of them blue, the other are of different colors.
If all pen were of different color, you would have 6! arrangements - permutations. If two pens look the same, those arrangements are the same where only these identical pens are interchanged. So you have only half of the original permutations. If you have 3 identical blue pens, you can not distinguish those permutations where only these blue pens are permuted. You can collect all those permutations where the blue pens are on the same places, and replace them with a single arrangement. See figure, both arrangements are the same, they are identical, as we can see the colors only.
3 blue pens can be arranged in 6 ways, so the number of the arrangement of the 6 pens has to be divided by 3! to get the distinguishable arrangements. If there are to more pens of the same color - say red, we divide again, with 2! now, and so on. 