0

Problem Statement:

There are three different types of cabinets with width (40 cm, 60 cm, 80cm). Then we have LED light strips of dimensions - 40 cm, 60 cm, 80 cm, a starter kit of 40 cm and a special 'power socket' of 20 cm.

These cabinets can be arranged together/adjacent to each other in any way (40,40,40 / 40,60,40 /40,80,80 etc.) -- lets call it an adjacent run.

The LED light strip can be added/attached incrementally (max. 9 pieces) but the first component always needs to be a Starter kit(dimension 40 cm). That means in an adjacent run you always need to add the starter kit of 40 cm (only) and then you can choose to add either a 40cm light strip or 60 cm light strip or 80 cm light strip or a socket strip (max 2 in an adjacent run). The only restriction is the total width of the adjacent run.

E.g., an adjacent run of 40, 40, 40 (total width 120 cm) can have light strips arranged in the following fashion:

  • 40 cm starter kit + power socket
  • 40 cm starter kit + power socket + 40 cm light strip
  • 40 cm starter kit + 2(40 cm light strip)
  • 40 cm starter kit + 80 cm light strip
  • 40 cm starter kit + 60 cm light strip

and so on and so forth

I need help with a formula that can give me all the combinations for a given adjacent run .

I ask the smart folks around the globe to have a look at my problem and come back with feedback. Kindly excuse me if my text is confusing - I can rephrase it, should it be confusing.

  • So, the total length of the LED light strip must be at least 40 cm and at most the width of the "adjacent run?" Is the desired formula a function of the widtth of the adjacent run? Is the width of an adjacent run $20(2+k)$ cm for some $k \geq 0$? Or are there other restrictions? – Fabio Somenzi Mar 20 '17 at 16:49
  • How wide is a socket strip? Is the socket in the second example the same as a socket strip? Does the maximum of $2$ apply to socket strips? Are there limits on anything else? Can you use another starter kit, or just one? – Ross Millikan Mar 20 '17 at 19:16
  • @fabio- Answer to your first question - that is correct. Min - 40cms (starter kit ) and max - width of the ''adjacent run '' provided only 9 total units are used including the starter kit. – Ajoshman1 Mar 21 '17 at 08:40
  • @Ross- The power Socket is of width - 20cms , a max of 2 power sockets can be added in 9 component lighting system for an adjacent run. You start and can use only one starter kit of 40 cms – Ajoshman1 Mar 21 '17 at 08:42
  • When you say "all combinations" do you want to make a list or just count how many there are. For a list, just make a tree. List all the possibilities you can start with (just a starter kit). Then add on each possibility for the next unit. Keep going until the length gets as long as you want. There is not magic. – Ross Millikan Mar 21 '17 at 15:07

1 Answers1

0

If you just want to count how many combinations there are, you can use a generating function. We can measure in units of $20$ cm and ignore the first two units because they must be filled with a starter kit. You have as many light strips of length $2,3,4$ as you want plus up to two sockets of width $1$. The number of strips of length $n$ is the coefficient of $x^n$ in the generating function. The light strips of length $2$ give a factor $1+x^2+x^4+x^6+\ldots=\frac 1{1-x^2}$. Similarly the ones of length $3,4$ give $\frac 1{1-x^3}$ and $\frac 1{1-x^4}$ respectively. The sockets give $1+x+x^2$ because we can only have zero to two of them. Per Alpha this expands to $1 + x + 2 x^2 + 2 x^3 + 4 x^4 + 4 x^5 + 6 x^6 + 6 x^7 + 9 x^8 + 9 x^9 + 12 x^{10} + \ldots$ so there are $12$ ways to make a strip of length $10$. This corresponds to $240$ cm with a starter kit plus another $20 \cdot 10$ cm.

Ross Millikan
  • 374,822