Thanks for the solution! I was hoping for a more algebraic solution as opposed to an iterative one. Is there a way to know if an algebraic solution - if any exists for this problem? And if it does, how can I find it? Because expanding upon nodes and checking every branch is still a form of brute forcing the problem. I'm wondering if there is some elegant solution to this.
brilliant!
Nice. I don't know why I thought the two were related...