0
$\begingroup$

Say I have a long rectangular hole of size n and then a bunch of smaller rectangles of different lengths a, b, c, etc such that the sum of their lengths is <=n.

I am trying to figure out the number of distinct permutations. For instance, if I had a hole of length 4 and two rectangles of length 2, there's only one way to arrange that. But if I had one of length 3 and one of length 1, that's two ways to arrange it.

If I had a hole of length 4 and a sub-rectangle of length 2, there are 3 ways, and so on.

Edit for clarification: The lengths are integers only, and they can only be "snapped" in at integer intervals (so you can't place a rectangle at, say, 1.233249 and then claim there are infinitely many ways to insert a rectangle). Area also doesn't matter... the height of the rectangles are all the same. It's only the lengths that differ.

Is there a simple mathematical combinatoric that can be applied here?

  • 0
    Say the hole looks like this: oooo. The rectangle of length 2 looks like this: RR. There are three ways to arrange: RRoo, oRRo, ooRR2012-04-03

1 Answers 1

1

You are asking about partitions if the order doesn't matter, and compositions if it does. It sounds like 13 is different from 31, so compositions are what you are after.

  • 0
    This is very informative, and even has combinatoric info listed. I'll count this as an answer. Thank you!2012-04-03