If the probability of current flowing in circuit is known, how can I know the probability that a certain bulb will work?

Here the schema is very important:

The probability that a bulb will work is 0,5. The probability that the current will flow in circuit is 0,3984375. What is the probability that the bulb C will work. It is clear from the schema, that in order for current to flow $$e$$ or $$f$$ or $$(a \lor b) \land c \land d$$ must work. So if it is known that current flows it is $$1/3$$ chance that the $$(a \lor b) \land c \land d$$ works. But I don't know where to go from here.

$$p(w)=\frac{51}{128}$$ where $$w$$ is the event "the current flows" in the given circuit.
By using the same approach, if $$c$$ works then $$p((a\lor b)\land c\land d)=\left(1-\left(\frac{1}{2}\right)^2\right)\cdot 1\cdot \frac{1}{2}=\frac{3}{8},$$ and therefore $$p(w|c)=\frac{1}{2}\cdot\left(1-\left(1-\frac{3}{8}\right)\cdot \left(1-\frac{1}{2}\right)\cdot \left(1-\frac{1}{2}\right)\right)=\frac{1}{2}\cdot\left(1-\frac{5}{32}\right)=\frac{27}{64}.$$ Hence, it follows that $$p(c|w)=\frac{p(c)\cdot p(w|c)}{p(w)}=\frac{\frac{1}{2}\cdot \frac{27}{64}}{\frac{51}{128}}=\frac{27}{51}\approx0.529$$ which is a bit greater then $$p(c)=0.5$$.
• So as I understand the only thing you do when calculating the probability $p(w|c)$ is putting value $1$ instead of $\frac{1}{2}$ in place of the $c$? I don't understand fully the second formula. I don't understand why $p(w)$ is in denominator. Why do we multiply $p(c)\cdot p(w|c)$? I know that you are using Bayes formula in order to get the probability of an elementary event if a probability of a complex event is known. But I don't get the logic behind it. – user Oct 12 '19 at 20:37
• @user Yes, given that bulb $c$ works, I computed the probability that current flows. Then I used the definition of conditional probability $p(w)p(c|w)=p(c)p(w|c)=p(w\land c)$. See en.wikipedia.org It seems that my approach is not very convincing... – Robert Z Oct 12 '19 at 21:21