MHB Expected number of light bulbs on

  • Thread starter Thread starter oyth94
  • Start date Start date
  • Tags Tags
    Light
AI Thread Summary
The discussion revolves around calculating the expected number of light bulbs that remain on after Dick randomly flips the switches of 50 bulbs, starting with all bulbs off. The expected number of bulbs on is derived from the probability of each bulb being flipped an odd number of times. It is suggested that the expected value can be generalized for any number of switches, leading to a formula E(2k,n) = (k^n - (k-1)^n) / k^(n-1). Simulation results support that the mean number of bulbs on after 50 flips is approximately 21.74. The participants express enthusiasm for the problem and share insights on their approaches to derive the expected value.
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.
 
I'm taking a look at intuitionistic propositional logic (IPL). Basically it exclude Double Negation Elimination (DNE) from the set of axiom schemas replacing it with Ex falso quodlibet: ⊥ → p for any proposition p (including both atomic and composite propositions). In IPL, for instance, the Law of Excluded Middle (LEM) p ∨ ¬p is no longer a theorem. My question: aside from the logic formal perspective, is IPL supposed to model/address some specific "kind of world" ? Thanks.
I was reading a Bachelor thesis on Peano Arithmetic (PA). PA has the following axioms (not including the induction schema): $$\begin{align} & (A1) ~~~~ \forall x \neg (x + 1 = 0) \nonumber \\ & (A2) ~~~~ \forall xy (x + 1 =y + 1 \to x = y) \nonumber \\ & (A3) ~~~~ \forall x (x + 0 = x) \nonumber \\ & (A4) ~~~~ \forall xy (x + (y +1) = (x + y ) + 1) \nonumber \\ & (A5) ~~~~ \forall x (x \cdot 0 = 0) \nonumber \\ & (A6) ~~~~ \forall xy (x \cdot (y + 1) = (x \cdot y) + x) \nonumber...

Similar threads

Replies
3
Views
1K
Replies
5
Views
1K
Replies
11
Views
3K
Replies
15
Views
2K
Replies
1
Views
2K
Replies
4
Views
3K
Replies
11
Views
3K
Back
Top