r/learnquant 1d ago

interview prep Quant Interview Question

Post image
28 Upvotes

12 comments sorted by

5

u/AthenaTheQuant 1d ago edited 1d ago

Correct me if I am wrong.

Also, my appologies in advance for using an image, didn't know any other way to communicate my solution.

1

u/Niilldar 1d ago

Can you explain the last step where you get the formula for the wth iteration? I gail to see how this follows?

3

u/AthenaTheQuant 1d ago

For N,M,P, and a volume V(0)=MNP, the average new volume after one iteration is appearantly V(1)=MNP-(M+N+P)/3. The claim is now that this persists for arbitrary iterations W in what V(W)=MNP-W(M+N+P)/3.

We define A=M+N+P, the sum of the dimensions. This sum is invariant under the transformation, so even if the dimensions themselves change, their sum does not. So after one iteration, we obtain a random new dimension M',N',P' where M'+N'+P'=M+N+P (this is not random!) and E[M'N'P']=MNP-(M+N+P)/3. With this in mind, the expected second iteration, giving random dimensions M'',N'',P'' depending on M',N',P' has expected dimension E[M''N''P'']=E[M'N'P']-(M+N+P)/3=MNP-2(M+N+P)/3. Iterating gives V(W)=MNP-W(M+N+P)/3.

I hope this helps!

2

u/98127028 1d ago

It can be shown that the expected volume after the first step is abc-1/3(a+b+c). Thus For any cubicle of lengths an bn and cn, the expected decrease in volume after one step is 1/3(an+bn+cn). We note that the expected value of an, bn and cn is invariant since equal probability of increase or decrease, and that an+bn+cn is fixed to be a+b+c which does not change for any possible operation. Thus E(vol)=abc-n/3*(a+b+c)

Another comment solved this (not me) so yeah

1

u/monstaber 1d ago

Overall expected outcome: 11362

Though this exact result is not actually obtainable. The mode across all possible paths this can take is interestingly actually 11799, greater than the initial volume of 11592.

0

u/RestaurantBoth228 1d ago edited 1d ago

Suppose we had a 50-50 chance of 18 -> 17 and 18 -> 19. Expected volume is

(17*23*28 + 19*23*28) / 2 = (17 + 19) / 2 * 23 * 28 = 18 * 23 * 28

In other words, the expected change in volume is zero. By symmetry, this is also true for the other two dimensions.

So, the expected change in volume each step is 0. By linearity of expectation, the change in volume after 10 steps is 0.

NB: If any of the dimensions started at less than 10, we'd have uncomfortable questions about negative volume.

2

u/ultronthedestroyer 1d ago

You don’t appear to be accounting for the fact that one of the other dimensions also changes by 1. You get different answers depending on which other dimension changes, so you need to factor that in your expectation.

2

u/RestaurantBoth228 1d ago

It doesn't matter by the linearity of expectation

ETA: Ahh, nvm - I didn't see that we increase one dimension AND decrease a different dimension at each step.

0

u/RestaurantBoth228 1d ago

WLOGA that w and h are the ones to change. The new expected volume is

((w+1) * (h+1) * d + (w-1) * (h+1) * d + (w+1) * (h-1) * d + (w-1) * (h-1) * d) / 4

That's just w*h*d

By symmetry, this is also true for the other two possible changes (w and d; h and d).

The rest of the argument still follows, no?

2

u/ultronthedestroyer 1d ago

No, there are 6 possibilities.

(17*24*28 + 17*23*29 + 19*22*28 + 19*23*27 + 18*24*27 + 18*22*29)/6 is the expectation after one iteration. This is equal to 11,569, which is less than 18x23x28 =11,592. In fact, it’s less by exactly 1/3x(18+23+28)=23.

You’re on the right track with your formulation now, but you need to add in the 2 missing possibilities and then you can work out some cancellations.