I know this is NP-complete proven, and that's fine. I am currently solving it with a branch and snapping where I set an initial upper limit on the number of multiplications that it will use for the normal binary square / multiplication algorithm, and it gives the correct answers, but I am not satisfied with the work (this may take a few seconds for numbers about 200). This is an NP-complete problem, I do not expect anything impressive; but often there are tricks to slightly affect the actual time.
Are there any faster ways to do this in practice? If so, what are they?
source
share