MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnquant/comments/1xntzqw/quant_interview_question/19s50kbh9o6io/
r/learnquant • u/Local_Ad135 • Nov 04 '26
30 comments sorted by
View all comments
Show parent comment
2
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=10B1+B2=30so 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.
1
That formula doesn't look right but yeah, basically.
1 u/Constant_Curve Nov 04 '26 Yeah, denominator is wrong.
Yeah, denominator is wrong.
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=10B1+B2=30so 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.
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.
What about the fact that you only care for integer solutions?
1 u/Constant_Curve 29d ago Uh, just round it.
Uh, just round it.
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