Given a set of integral numbers (e.g. [2, 3, 7, 10]) and a positive number (e.g. 22) min_expand() expands the given integer into the base numbers so that the sum of coefficients is minimum.
For example, 22 can be expanded into [2, 3, 7, 10] in the following ways:
[11, 0, 0, 0] [1, 0, 0, 2] [4, 0, 2, 0] ...
But the expansion [1, 0, 0, 2] uses minimum number of coefficients (3).