# Formula for calculating combinations of adjacent pairs

#### custard

##### New member
I have X number of light bulbs and I would like to calculate the total number of combinations of 2 adjacent bulbs failing + any other bulb (or no other bulb). For example for five bulbs I think there is 14 combinations (o indicates a bulb and x indicates a failed bulb):

 Combination o o o o o 1 x x 2 x x x 3 x x x 4 x x x 5 x x x x 6 x x x x 7 x x 8 x x x 9 x x x 10 x x x x 11 x x 12 x x x 13 x x x 14 x x x x

I have 35 bulbs, is it possible to calculate this mathematically?

I hope I am in the correct section.

#### stapel

##### Super Moderator
Staff member
I have X number of light bulbs and I would like to calculate the total number of combinations of 2 adjacent bulbs failing + any other bulb (or no other bulb). For example for five bulbs I think there is 14 combinations (o indicates a bulb and x indicates a failed bulb):

 Combination o o o o o 1 x x 2 x x x 3 x x x 4 x x x 5 x x x x 6 x x x x 7 x x 8 x x x 9 x x x 10 x x x x 11 x x 12 x x x 13 x x x 14 x x x x

I have 35 bulbs
What do you mean by "having thirty-five bulbs"? Aren't you finding ways of failure in five bulbs? Or are you trying to figure out the number of bulbs necessary for... something...?

I have X number of light bulbs and I would like to calculate the total number of combinations of 2 adjacent bulbs failing + any other bulb (or no other bulb).
I think you mean that two bulbs will be regarded as one failure unit, and there are three other units which may contain some number of failed bulbs...? (Is it exactly one or zero bulbs, or could it be two or all three other bulbs, too?)

Assuming you have four slots, the double-bulb unit can go in any of the four slots. If it goes in the first slot, then you have three slots which could have failed bulbs. In the second slot, there are two options (failed or not). What we do after that depends on how many failures you're allowed, I think....

If you could provide the full and exact text of the exercise, this will be very helpful. Thank you! #### custard

##### New member
I'm sorry for the poor explanation, this isn't an exercise so there is no exercise text. Anyway, I am trying to calculate the probability of adjacent bulbs failing and I have 35 bulbs in a row. I originally tried to break the problem down into a smaller number of bulbs and then try to come up with a formula to calculate the number of adjacent failed bulb combinations, which could be applied to any number of bulbs-sorry for any confusion. However, I have failed to come up with a formula.

I'll try to illustrate the problem with a couple of examples.

First example, if we only have 4 bulbs in a row (bulb A,B,C,D) then if we assume 2 bulbs have failed, then there are 6 possible combinations of failed bulbs. And out of those 6 only 3 of those combinations will be adjacent failures (A&B(1), B&C(2), C&D(3)). Then if we assume 3 bulbs have failed then (4 possible failure combinations) 4 out of the 4 combinations will be adjacent failures (B&C&D(1), A&C&D(2), A&B&D(3), A&B&C(4)) and finally, if 4 bulbs fail then there is only 1 combination and it will contain an adjacent pair of bulbs.

I would like to be able to calculate the number of adjacent failures for 35 bulbs in a row for each possible failure combination. (i.e 2 failures, 3 failures e.t.c)

Is it possible to do this mathematically?