Question:medium

Consider a linear arrangement of seven bulbs, each of which can be in the ON or OFF states. The initial configuration of the bulbs is shown in the figure. In every Step, the states of the bulbs are changed based on the following rules:
  • Any OFF bulb with exactly one ON neighbor at the end of the previous Step is turned ON.
  • Any ON bulb with both neighbors ON at the end of the previous Step is turned OFF.
  • The state of any bulb not meeting the conditions above is left unchanged.
The state of bulbs at the end of Step 1 and Step 2 are also shown in the figure.
The number of bulbs which are ON at the end of Step 8 is ______

Show Hint

Track the bulb states with 0 for OFF and 1 for ON; the pattern locks into a repeating state after a few steps.
Updated On: Jul 17, 2026
  • 5
  • 4
  • 3
  • 0
Show Solution

The Correct Option is B

Solution and Explanation

Instead of writing out every bulb by rule at each step from scratch, track the total count of ON bulbs and use the end bulbs as an anchor, since end bulbs $1$ and $7$ behave differently from interior bulbs.

  1. Boundary bulbs never turn OFF once ON: bulb $1$ only touches bulb $2$, and bulb $7$ only touches bulb $6$. The OFF rule needs 'both neighbours ON', which is impossible for a bulb with a single neighbour. So once bulb $1$ or bulb $7$ becomes ON, it stays ON for every later step.
  2. Track the ON count step by step: Initial has $1$ ON bulb (bulb $4$). Step $1 = (0,0,1,1,1,0,0)$ has $3$ ON bulbs. Step $2 = (0,1,1,0,1,1,0)$ has $4$ ON bulbs, both given directly in the figure as a checkpoint.
  3. Step 3: using the same rule on Step $2$, bulbs $1$ and $7$ each pick up exactly one ON neighbour and switch ON, while bulb $4$ keeps two ON neighbours and stays OFF. Step $3 = (1,1,1,0,1,1,1)$, so $6$ bulbs are ON.
  4. Step 4: in Step $3$, bulbs $2$ and $6$ each now sit between two ON bulbs, so both switch OFF, while bulbs $1$ and $7$ cannot switch OFF and bulbs $3, 5$ each keep only one ON neighbour and stay ON. Step $4 = (1,0,1,0,1,0,1)$, so $4$ bulbs are ON, in an alternating ON/OFF pattern.
  5. Step 5 onward: in this alternating pattern, every OFF bulb (positions $2,4,6$) sits between two ON neighbours, so 'exactly one ON neighbour' never triggers and they stay OFF forever; every ON bulb (positions $1,3,5,7$) is either a boundary bulb that cannot turn OFF, or has both neighbours OFF (bulbs $3$ and $5$), so the 'both neighbours ON' condition never triggers either. The state $(1,0,1,0,1,0,1)$ repeats unchanged for every later step, including Step $8$.

Since the pattern locks in at Step $4$ and repeats identically after that, the state at Step $8$ is the same as Step $4$: bulbs $1, 3, 5, 7$ ON and bulbs $2, 4, 6$ OFF.

The number of bulbs which are ON at the end of Step 8 is $4$, matching option (B).

Was this answer helpful?
0


Questions Asked in GATE CE exam