Length of a closed bouncing-ball path in a 2 m by 1 m rectangle
Company: Viridien
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Technical Screen
A rectangle ABCD has sides AB = CD = 1 m and BC = DA = 2 m. D is the top-left corner, A the top-right, B the bottom-right and C the bottom-left, so DA is the top side, AB the right side, BC the bottom side and CD the left side.
```text
D ----a----------------------- A
| |
| |
| |
C ---------------------------- B
```
A ball starts at point a on side DA, 0.5 m from D. It is struck so that it bounces once off each of the sides AB, BC and CD, in that order, at points b, c and d, and then travels straight back to a. Each bounce is a perfect mirror reflection: the angle of incidence equals the angle of reflection, and the ball moves in a straight line between bounces. What is the total length of the closed path a → b → c → d → a?
The question comes from a math assessment taken on camera without a calculator, with five minutes to solve and five minutes to explain the reasoning. The report gives only this question's worked answer; the rectangle's dimensions, the order of the bounces and the starting point are reconstructed from that worked answer.
```hint Straighten the path
Instead of turning the ball at a wall, mirror the rectangle across that wall and let the ball keep going straight.
```
```hint Follow the starting point
Track where the image of a ends up after one mirroring for each side the ball touches before returning.
```
### Constraints and Clarifications
- The ball is a point, so it touches each side at a single point, and it never hits a corner.
- An exact answer is expected; the computation must be doable by hand.
### Clarifying Questions
- Is the starting point fixed at 0.5 m from D, or should the answer hold for any starting point on DA?
- Does the ball touch each of AB, BC and CD exactly once, and no side twice, before returning to a?
### What a Strong Answer Covers
- A model of the reflections that turns the broken path into one straight segment
- The horizontal and vertical displacement of that segment and its exact length
- A check, either by computing every bounce point or by confirming that the segment meets the walls in the required order
- An observation about which inputs the answer depends on and which it does not
### Follow-up Questions
- Does the length change if a is moved elsewhere on DA? For which starting points does such a path exist?
- At what angle to side DA must the ball be struck?
- For a rectangle of width W and height H, what is the length of a closed path that touches each side exactly once?
Overview: A geometry question from a no-calculator math assessment: a ball starts on the long side of a 2 m by 1 m rectangle, bounces once off each other side and returns to its start. Find the exact length of the closed path, testing reflection reasoning, careful checking and clear explanation.