in reply to Subset Sum Problem
Just some observations.
You are right that this is a hard problem. The factorization of $n alone is an age-of-the-universe problem for large $n. Math::Pari is able to factor numbers of up to 60 digits fairly quickly. It is fast for less than 50 digits.
* Oops, that is not quite right. If an element of @k is greater than 1, there is a binomial coefficient of ways to forms a power of that prime. All those are equivalent, yielding the same factor. That makes the factorial function I leaped at significantly larger than the actual number of distinct factors. The correct number of distinct divisors of $n is do { $prod = 1; $prod *= ($_ + 1) for @k; $prod } . Thanks to OverlordQ for pointing me to the right calculation.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Subset Sum Problem
by tall_man (Parson) on Jun 14, 2003 at 22:04 UTC | |
|
Re: Re: Subset Sum Problem
by OverlordQ (Hermit) on Jun 15, 2003 at 01:53 UTC |