write the algorithm how to check if a bulb was not working
Answers
Explanation:
Assume you are in a room with N switches, and there's a light bulb in the next room. The light bulb is glowing only when some specified switches are all turned on.
Set
switches = the set of all switches. |switches| = N.
required = the switches which need to be turned on to make the bulb glowing.
The non-required switches doesn't matter.
You can only check whether the bulb is glowing only if you enter the next room. You can turn some switches on or off, go to the next room to check the bulb, and repeat this process. Let's call this one ATTEMPT.
Assume there is N switches, in WORST CASE, what's the minimum number of attempts needed to find out the set of required switches (using optimized strategy)?
Hope it helps you!!
and don't forget to Mark as brainliest and thank◉‿◉