4 ms·
> you need a solution that only applies each available perturbation zero or one times I'd usually go to wagner's k-tree algorithm for a modular subset sum pro
by nullc 4y ago
> you need a solution that only applies each available perturbation zero or one times
I'd usually go to wagner's k-tree algorithm for a modular subset sum problem.
But these are pretty small instances and you shouldn't need to use a particularly memory efficient algorithm. So for example, splitting the space of all choices in two, enumerating all combinations on each side and searching for a meet-in-the middle should also work.