Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm well aware that this can be efficiently solved. I'm interested in a closed-form because in the problem I'm working on, $w$ would be a decision variable along with $A^+$