![]() Volume 10, Issue 1 Articles Trott's Corner New Products New Publications Calendar News Bulletins New Resources Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information |
Ordered and Unordered Factorizations of Integers
Unordered FactorizationsThere do not appear to be any explicit formulas for A Product RecursionHarris and Subbarao [6] give the following product recursion for
Alternatively, here is a more elegant construction.
Then we can define P2.
The use of Simplify in P2 is not required, but speeds up the overall computation. Round produces the correct integer value for P2 much faster than by using additional simplification methods to remove the logarithms.
A Recursion for Unordered Factorizations with Largest Part mLet
This particular recursion is easy to explain: Let
All unordered factorizations are counted by
This gives a much faster recursion than P2.
Canfield, Erdös, and Pomerance [8] remarked in their paper that it is not particularly easy to compute
Generating Unordered FactorizationsOne inefficient approach is simply to sort the larger list of ordered factorizations and remove duplicates. However, a better approach is to use the Hughes-Shallit idea to recursively build up a list of ordered factorizations with largest part at most
Now we test this out.
Unordered Factorizations with Distinct PartsA modification of Hughes-Shallit reasoning gives a recursion for unordered factorizations with distinct parts and largest part at most
We program this with necessary boundary conditions to start the recursion.
Here is an example.
Generating Unordered Factorizations with Distinct PartsAgain we can simply select the permissible factorizations from the larger list of all unordered factorizations, but a better approach is to recursively generate them using the idea for the recursion for
Here are the distinct unordered factorizations of 24.
Here are the nondistinct factorizations.
We check that we are generating the right number of cases.
Faster Generation of Ordered Factorization ListsThe lists of unordered factorizations constructed earlier lead to a much faster way of generating the corresponding lists of ordered factorizations. We merely observe that all ordered cases arise as permutations of unordered cases. This gives a different ordering of the factorizations to the earlier method. However, the lists are easily checked to be the same.
The new approach gives a faster method for generating the factorizations list.
Factorizations with Distinct PartsAgain all ordered cases arise as permutations of unordered distinct cases. This also leads to a large speedup in computation time.
Faster Count for Ordered Factorizations with Distinct PartsLet First, we sort our lists of factorizations according to length. For example, here
Then, we split up the different classes with respect to length, count how many of length
This agrees with our previous computation. We put this method together as a oneliner.
In general,
|
||||||||
About Mathematica | Download Mathematica Player © 2006 Wolfram Media, Inc. All rights reserved. |