Expected number of light bulbs on

  • Context: MHB 
  • Thread starter Thread starter oyth94
  • Start date Start date
  • Tags Tags
    Light
Click For Summary

Discussion Overview

The discussion revolves around the expected number of light bulbs that remain on after 50 random flips of their switches, starting with all bulbs off. Participants explore various approaches to calculate this expectation, considering both theoretical and experimental perspectives.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant introduces the problem and begins by defining events related to the state of each bulb after the flips, suggesting a probabilistic approach using indicator random variables.
  • Another participant proposes that if each bulb has a 1/2 probability of being switched at each iteration, the expected number of bulbs on would be 25 after 50 flips.
  • A participant generalizes the problem to k switches and presents empirical results for smaller values of k, suggesting a potential formula for the expected number of lit bulbs based on their observations.
  • Another participant agrees with the empirical findings and provides a specific expected value for 50 bulbs after 50 flips, while also noting the results of a simulation that supports their calculations.
  • A later reply details a method to prove the proposed formula for the expected number of bulbs on, using inductive reasoning and probabilities associated with the state of the bulbs.

Areas of Agreement / Disagreement

Participants express various hypotheses and calculations regarding the expected number of bulbs on, but no consensus is reached on a definitive answer. Multiple competing views and approaches are presented, indicating that the discussion remains unresolved.

Contextual Notes

Some participants rely on empirical data and simulations, while others focus on theoretical derivations. The discussion includes assumptions about the random nature of switch flips and the implications of these assumptions on the expected outcomes.

Who May Find This Useful

This discussion may be of interest to those studying probability theory, combinatorial problems, or anyone looking to understand the dynamics of random processes in a mathematical context.

oyth94
Messages
32
Reaction score
0
There are 50 light bulbs in a room each with its own switch. If a light bulb is on, Dick turns it off and if it is off , he turns it on. Initially all light bulbs are off . After 50 flips and assuming that Dick chooses switches to be flipped randomly, what is the expected number of light bulbs on in the room rounded to the nearest natural number?

To be honest, i tried many times but i can;t seem to arrive at an answer. i am stuck. any help would be appreciated!

so i have started with this:
Let Ei be the event that bulb i is on after 50 flips. This is the case if switch i is chosen an odd number of times. Compute Pr(Ei) and let Xi be the indicator random variable for Ei. Then E[Xi]=Pr(Ei). Now, let X be the total number of bulbs on after 50 flips. X=∑Xi, so E[X]=∑E[Xi]=n⋅Pr(Ei).
 
Last edited:
Physics news on Phys.org
oyth94 said:
There are 50 light bulbs in a room each with its own switch. If a light bulb is on, Dick turns it off and if it is off, he turns it on. Initially all light bulbs are off. After 50 flips and assuming that Dick chooses switches to be flipped randomly, what is the expected number of light bulbs on in the room rounded to the nearest natural number?

To be honest, i tried many times but i can;t seem to arrive at an answer. i am stuck. any help would be appreciated!

so i have started with this:
Let Ei be the event that bulb i is on after 50 flips. This is the case if switch i is chosen an odd number of times. Compute Pr(Ei) and let Xi be the indicator random variable for Ei. Then E[Xi]=Pr(Ei). Now, let X be the total number of bulbs on after 50 flips. X=∑Xi, so E[X]=∑E[Xi]=n⋅Pr(Ei).

The core of the problem is the meaning of 'Dick chooses switches to be flipped randomly'... if it means that any bulb has probability 1/2 to be switched by Dick at any iteration it is evident that at the end of each iteration the expected number of switched on bulbs is 25...

Kind regards

$\chi$ $\sigma$
 
oyth94 said:
There are 50 light bulbs in a room each with its own switch. If a light bulb is on, Dick turns it off and if it is off, he turns it on. Initially all light bulbs are off. After 50 flips and assuming that Dick chooses switches to be flipped randomly, what is the expected number of light bulbs on in the room rounded to the nearest natural number?
Fascinating problem! I have wasted half my Sunday morning on it. (Coffee) (Yawn)

Let's generalise it a bit, to the case where there are $k$ switches. Denote by $E(k,n)$ the expected number of lit bulbs after $n$ random flips, given that initially all light bulbs were off. I found $50$ much too large a number to work with, so I did some experiments with smaller numbers. For $k=4$, I found that the values of $E(4,n)$, for $n=1,2,3,4,5,6$ are $$1,\ \frac32,\ \frac74,\ \frac{15}8,\ \frac{31}{16}, \frac{63}{32},$$ which makes it seem likely that $E(4,n) = \dfrac{2^n-1}{2^{n-1}}$.

I then tried $k=6$ and found something even more interesting: for $n=1,2,3,4$, the values of $E(6,n)$ are $$1,\ \frac53,\ \frac{19}9,\ \frac{65}{27},$$ which very strongly suggests that $E(6,n) = \dfrac{3^n-2^n}{3^{n-1}}.$

If so, then it seems inevitable that the general formula must be $\boxed{E(2k,n) = \dfrac{k^n - (k-1)^n}{k^{n-1}}}.$

I'm not prepared to put money on it, but I'm 99% sure that $$E(50,50) = \dfrac{25^{50} - 24^{50}}{25^{49}} = 25 - 24\Bigl(\frac{24}{25}\Bigr)^{\!49} \approx 21.75.$$

Now it's time for Sunday lunch, so I'll leave it to others to see if those results can be proved.
 
Opalg said:
Fascinating problem! I have wasted half my Sunday morning on it. (Coffee) (Yawn)

Let's generalise it a bit, to the case where there are $k$ switches. Denote by $E(k,n)$ the expected number of lit bulbs after $n$ random flips, given that initially all light bulbs were off. I found $50$ much too large a number to work with, so I did some experiments with smaller numbers. For $k=4$, I found that the values of $E(4,n)$, for $n=1,2,3,4,5,6$ are $$1,\ \frac32,\ \frac74,\ \frac{15}8,\ \frac{31}{16}, \frac{63}{32},$$ which makes it seem likely that $E(4,n) = \dfrac{2^n-1}{2^{n-1}}$.

I then tried $k=6$ and found something even more interesting: for $n=1,2,3,4$, the values of $E(6,n)$ are $$1,\ \frac53,\ \frac{19}9,\ \frac{65}{27},$$ which very strongly suggests that $E(6,n) = \dfrac{3^n-2^n}{3^{n-1}}.$

If so, then it seems inevitable that the general formula must be $\boxed{E(2k,n) = \dfrac{k^n - (k-1)^n}{k^{n-1}}}.$

I'm not prepared to put money on it, but I'm 99% sure that $$E(50,50) = \dfrac{25^{50} - 24^{50}}{25^{49}} = 25 - 24\Bigl(\frac{24}{25}\Bigr)^{\!49} \approx 21.75.$$

Now it's time for Sunday lunch, so I'll leave it to others to see if those results can be proved.

Thank you so much! I arrived with the same answer but I used either Poisson or Binomial. But my approach I didn't involve expected value...which I should...
 
Opalg said:
Fascinating problem! I have wasted half my Sunday morning on it. (Coffee) (Yawn)

Let's generalise it a bit, to the case where there are $k$ switches. Denote by $E(k,n)$ the expected number of lit bulbs after $n$ random flips, given that initially all light bulbs were off. I found $50$ much too large a number to work with, so I did some experiments with smaller numbers. For $k=4$, I found that the values of $E(4,n)$, for $n=1,2,3,4,5,6$ are $$1,\ \frac32,\ \frac74,\ \frac{15}8,\ \frac{31}{16}, \frac{63}{32},$$ which makes it seem likely that $E(4,n) = \dfrac{2^n-1}{2^{n-1}}$.

I then tried $k=6$ and found something even more interesting: for $n=1,2,3,4$, the values of $E(6,n)$ are $$1,\ \frac53,\ \frac{19}9,\ \frac{65}{27},$$ which very strongly suggests that $E(6,n) = \dfrac{3^n-2^n}{3^{n-1}}.$

If so, then it seems inevitable that the general formula must be $\boxed{E(2k,n) = \dfrac{k^n - (k-1)^n}{k^{n-1}}}.$

I'm not prepared to put money on it, but I'm 99% sure that $$E(50,50) = \dfrac{25^{50} - 24^{50}}{25^{49}} = 25 - 24\Bigl(\frac{24}{25}\Bigr)^{\!49} \approx 21.75.$$

Now it's time for Sunday lunch, so I'll leave it to others to see if those results can be proved.

I can report that simulation gives the mean number off after 50 flips of the 50 switchs is 21.74 with a standard error ~0.034

(another exercise on my Python learning curve)

.
 
Last edited:
I now see how to prove the formula for $E(2k,n)$, and it's really quite easy. When the $(n+1)$th switch is flipped, the probability that it is already on is $\dfrac{E(2k,n)}{2k}$, in which case the flip turns it off, and the number of "on" switches is reduced by $1$. Likewise, the probability that the $(n+1)$th switch is off is $\dfrac{2k-E(2k,n)}{2k}$, in which case the flip turns it on, and the number of "on" swiches is increased by $1$. Therefore $$E(2k,n+1) = \frac{E(2k,n)}{2k}(E(2k,n)-1) + \frac{2k-E(2k,n)}{2k}(E(2k,n)+1) = \frac{(k-1)E(2k,n) + k}k.$$ Now assume as an inductive hypothesis that $E(2k,n) = \dfrac{k^n-(k-1)^n}{k^{n-1}}$. Then $$E(2k,n+1) = \frac{(k-1)E(2k,n) + k}k = \frac{(k-1)k^n-(k-1)^{n+1} + k^n}{k^n} = \frac{k^{n+1} - (k-1)^{n+1}}{k^n},$$ which completes the inductive step. The base case $E(2k,1) = 1$ is easy to check, so the result is proved.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K