Step 1: Understanding the Concept:
The time period $T$ of a simple pendulum is the time taken for one oscillation. It depends on the length of the string $L$ and the acceleration due to gravity $g$. If the number of oscillations $n$ in a fixed time $t$ changes, the frequency and time period change accordingly.
Step 2: Key Formula or Approach:
1. Time period $T = 2\pi\sqrt{\frac{L}{g}}$.
2. Also, $T = \frac{\text{Total Time}}{\text{Number of Oscillations}} = \frac{t}{n}$.
3. Therefore, $\frac{t}{n} \propto \sqrt{L} \implies n \propto \frac{1}{\sqrt{L}}$ for a constant time $t$.
Step 3: Detailed Explanation:
Let $n_1 = 20$, $L_1 = 30$ cm.
Let $n_2 = 40$, $L_2 = ?$.
Since $n \propto \frac{1}{\sqrt{L}}$, we can write:
\[ \frac{n_1}{n_2} = \sqrt{\frac{L_2}{L_1}} \]
\[ \frac{20}{40} = \sqrt{\frac{L_2}{30}} \]
\[ \frac{1}{2} = \sqrt{\frac{L_2}{30}} \]
Squaring both sides:
\[ \frac{1}{4} = \frac{L_2}{30} \]
\[ L_2 = \frac{30}{4} = 7.5 \text{ cm} \]
Step 4: Final Answer:
The required length of the string is 7.5 cm.