|
|
|
|
|
by hiker
2292 days ago
|
|
Integer factorization is also reducible to Knapsack: To factorize integer N invoke a Knapsack solver with knapsack size of log(N) and items of size logarithm of all prime numbers up to sqrt(N): [log 2, log 3, log 5, ...]. If N=pq (say p and q are prime) then log(N)=log(p)+log(q). So from all possible items in the item set, only log(p) and log(q) will fill the knapsack as tight as possible leaving zero empty space in it. |
|
[1]: https://en.wikipedia.org/wiki/Merkle%E2%80%93Hellman_knapsac...