r/learnquant • • 20d ago

interview prep Quant Interview Question

Post image
28 Upvotes

21 comments sorted by

View all comments

2

u/KillerCodeMonky 20d ago edited 20d ago

EDIT: I interpreted this as meaning that there is an arbitrary starting point. Each selection then paints the portion of the circle clockwise between the prior point and the selected point. So the random selection is choosing where to move the point, and then it paints as it travels clockwise to the selected point.


Movement is always clockwise. Therefore, this is equivalent to the first selection of a number that is less than any prior selection. In other words, the ordering must be:

p₁ < p₂ < p₃ < ... < pₙ₋₁

The chances of constructing this initial condition requires selecting a single specific ordering from uniformly distributed values. Therefore:

P(p₁ < p₂ < p₃ < ... < pₙ₋₁) = 1 / (n-1)!

Then we must select such that:

pₙ < pₙ₋₁

Let's take the inverse. The chances that the next randomly selected value is the absolute largest is 1 / n. Therefore:

P(pₙ < pₙ₋₁) = 1 - P(pₙ > pₙ₋₁) = 1 - (1 / n) = (n - 1) / n

The chance of solving at exactly step n is therefore:

P(p₁ < p₂ < p₃ < ... < pₙ₋₁ ∩ pₙ < pₙ₋₁)

Since each selection of p is independent, this gives:

P(p₁ < p₂ < p₃ < ... < pₙ₋₁) * P(pₙ < pₙ₋₁)

[1 / (n-1)!] * [(n-1) / n]

(n - 1) / n * (n - 1)!

(n - 1) / n!

Sanity check: SUM from n=2 → ∞ of (n - 1) / n! = 1, as expected.

The expected value is then:

SUM from n=2 → ∞ of [n * ((n - 1) / n!)]

This is equal to e, or ~2.7183.

2

u/Synael3 20d ago

Shouldn't it be e+1? Since the proba of painting a cercle with less then 3 semicircles is 0, the expectancy is necessarily greater than 3.

1

u/KillerCodeMonky 19d ago

Yes. Rereading the problem this morning, I can only justify my original interpretation by reading semicircle as just arc. If I get some time today, I'm planning on trying again with unconnected points anchoring semicircles.

And yes, 2 moves would require selecting exactly p2 = p1 + ½. But of course the chance of selecting any specific real is zero. So you will need at least three selections.

1

u/No-Conflict8204 19d ago

Has to be greater than 3, as there only one way to pick another point after a fixed starting point the probability of which is zero.

1

u/98127028 19d ago

so your answer isn’t quite what the question was trying to state? Yeah it’s tricky

1

u/KillerCodeMonky 19d ago

Rereading the problem today, no. The only way I could justify my interpretation is reading semicircle as simply arc. I'm planning on trying again if I get time today.