[Math] How many ways can a row of lights be turned on and off

combinatorics

Say you have a row of 4 lights. Each light-bulb can be turned on/off independently. How many lighting combinations could you come up with?

enter image description here

My research:

Before asking this question I searched the forum to make sure this wasn't a duplicate. I found similar questions, but they had restrictions which I'm not imposing.

For example this question required that a number of lights always be left on, and this question imposed a lighting pattern.

I simply want to know without restrictions how many combinations there could be.

Reading the answers to the linked questions above I learned about Pascals triangle.

enter image description here

Studying the triangle it appeared to me that the number of combinations possible for N (the number of lights in a row) is the sum of all the numbers in the row of pascal's triangle that has the same amount of numbers as n+1.

For example if I had 1 light, there are 2 combinations, on or off.

Pascals second row (the number of lights + 1) the sum of that row adds up to 2. Thus representing the total number of combinations.

Is that correct, and if it is, is there a more formal algorithm to represent this sort of problem without having to draw out a pascal triangle for large data-sets?

Best Answer

Each light has two positions and is independent of the others. By the multiplication principle there are $2^4=16$ possibilities. The row of Pascal's triangle that goes $1-4-6-4-1$ shows that there is one possibility with no lights on, four with one light on and so on. The sum is duly $16$

Related Question