News for hackers. Stuff that matters.
Re:Suits, Money Laundering, and Linear Programming by TacticalCoder on Friday November 01, 2024 @09:40AM (#42016821)
Can't subset sum like in TFA be solved by dynamic programming using a modified 0-1 knapsack? (modified to keep track of selected items)
Re:Suits, Money Laundering, and Linear Programming by JohnKemeny on Friday November 01, 2024 @11:56AM (#42018248)
Yup, in time (and space) O(M • n), so with M = 1 million and let's say n = 1 million, it takes space 1 trillion. Given a byte per number, it takes a TB of memory, but is otherwise doable.

Ps, you don't want to risk a running time of form O(Mn²).