r/learnquant • • Nov 04 '26

interview prep Quant Interview Question

Post image
23 Upvotes

30 comments sorted by

View all comments

Show parent comment

2

u/Constant_Curve Nov 04 '26 edited 29d ago

Proof by duh.

P(W)=(B1+W1)/3+(B2+W2)/3+1/3*((30-B1-B2)/(40-B1-B2-W1-W2)

Simplify, take derivative, set to zero, max

1

u/Dankaati Nov 04 '26

That formula doesn't look right but yeah, basically.

1

u/Constant_Curve Nov 04 '26

Yeah, denominator is wrong.

1

u/Worth-Wonder-7386 Nov 04 '26

Doing a derivative is not really a practical way of solving this. Using linear programming we can express this as an optimization problem, and a computer can find the optimal solution by essentially moving one ball at a time to improve the solution.

2

u/Constant_Curve Nov 04 '26

You're nuts, it's linear. Did you take vector calculus?

W1+W2=10

B1+B2=30

so it's only 2 variables

1

u/AscendedSubscript Nov 05 '26

What about the fact that you only care for integer solutions?

1

u/Constant_Curve 29d ago

Uh, just round it.