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.
Thanks for the answer, Arnau! I have two follow-up questions. Will the procedure you suggested run in polynomial time? Is the procedure a known technique for which there is a literature reference? Thanks!