Suppose you have an 8x8 grid of electric bulbs. So you have 8 rows and 8 columns.

Now you can either switch on and supply power to entire row(or column), or switch it off and supply no power at all. A bulb only lights up if there is differential in power in row and column.

So, a bulb at coordinates (n,m) will only light up if power in row 'n' is on and power at column 'm' is off or vice versa. If power at both row 'n' and column 'm' are on, or both are off, the bulb will not light up.

Now, initially all power is switched off. Each day, a person, randomly flips power in 1 row and 1 column. One bulb consumes 100kWh in one day. What is the expected energy consumed after 365 days?

  • 2
    $\begingroup$ 100 kWh per day? What kind of light bulbs are these? $\endgroup$ Jul 29, 2023 at 13:38
  • $\begingroup$ Very old ones :( $\endgroup$ Jul 30, 2023 at 2:53

1 Answer 1


By linearity of expectation, on any given day, the expected number of lights on is simply the number of lights (64) times the probability that a specific light is on, which is the same for all 64 lights. If we let $p_k$ be the chance that a specific row (or equivalently, column) is powered on day $k$, then there's a $2p_k(1-p_k)$ chance the light is on then, from adding the two options of row-on column-off and vice-versa.

We compute $p_k$ as the chance of getting an odd number of success in a $k$-trial binomial with probability $1/8$ for hitting that column on each day. We could compute this, or look it up and see that it's

$$p_k = \frac{1}{2} \left(1 - (3/4)^{k} \right).$$

This gives the chance that a given light is on as

$$2p_k(1-p_k) = \frac{1}{2} \left(1 - (3/4)^{2k} \right).$$

Now to get the total expected number of days the light is on, we sum this from $k=1$ to $365$, which gives, summing a geometric series:

$$ \sum_{k=1}^{365} 2p_k(1-p_k) = \frac{1}{2} \left(365 - \frac{(3/4)^2- (3/4)^{2 \cdot 366}}{1-(3/4)^2} \right).$$

That value of $(3/4)^{2 \cdot 366}$ is so vanishingly small that we can ignore it for the final numerical value, leaving us with $\approx \frac{1}{2}(365-9/7) \approx 181.857$ expected on-days per bulb. This makes heuristic sense as being on for about half of days, minus a few for the startup time. Multiplying by the 64 bulbs and the 100 kWh per day gives a total expected power usage of 1,163,885.714 kWh.

  • $\begingroup$ Simulation gives a result of about 1,163,800 kWh with an average of 181.85 on-days per bulb. $\endgroup$ Jul 29, 2023 at 14:40
  • $\begingroup$ The sum has a value of $\frac{1273}{7}\approx 181.857$, for a total expected power usage of 1,163,885.7 kWh. $\endgroup$ Jul 29, 2023 at 14:52
  • $\begingroup$ @DanielMathias Thanks for checking this. I did mis-sum the series, now it matches your figures. $\endgroup$
    – xnor
    Jul 29, 2023 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.