Probability Two Randomly Started Flower Bloom Periods Overlap
Company: Sig
Role: Quantitative Trader
Category: Statistics & Math
Difficulty: medium
Interview Round: Online Assessment
Two kinds of flowers will each begin blooming on a random day within the next $D$ days, independently of each other. Once it starts, the first kind stays in bloom for $d_1$ consecutive days and the second for $d_2$ consecutive days. What is the probability that at some moment both flowers are in bloom at the same time?
Assume each flower's start day is uniform over days 1 through $D$, and a flower that starts on day $s$ is in bloom on days $s$ through $s + d - 1$, even if that runs past day $D$. Two flowers that are both in bloom on some common day count as overlapping. Derive an expression in $D$, $d_1$ and $d_2$, and explain how the answer changes if start times are continuous instead of whole days. The specific values are generated randomly.
```hint One number decides it
Ask what single quantity built from the two start days determines whether the two bloom periods intersect.
```
### Constraints and Clarifications
- $D$, $d_1$ and $d_2$ are positive integers, and $d_1$ or $d_2$ may exceed $D$.
- The two start days are independent, and each is uniform on $\{1, \dots, D\}$.
### Clarifying Questions
- Is the start day a whole day, or a continuous time within the $D$-day window?
- Must each bloom period finish within the $D$ days, or may it run past the end of the window?
- Do two bloom periods that only touch at a boundary, one ending as the other begins, count as overlapping?
### What a Strong Answer Covers
- Translating "both in bloom at some moment" into a condition on the two start days
- Exact counting of the qualifying start-day pairs, including the asymmetric case where $d_1$ and $d_2$ differ
- Bloom lengths that are as long as the window or longer
- The discrete versus continuous difference and the off-by-one terms it creates
### Follow-up Questions
- What is the expected number of days on which both flowers are in bloom?
- If each bloom period must fit entirely inside the $D$-day window, how does the count change?
- How would you extend the calculation to three flowers that must all be in bloom together?
Overview: A probability question about two flowers that start blooming on random days within a D-day window and stay in bloom for different lengths of time. It asks for the probability that both are in bloom together at some point, testing interval-overlap reasoning, exact counting, and discrete versus continuous modeling.
Read the full Sig Quantitative Trader interview experience this question came from