> Sorry, I missed the post where you clarified that you weren't just
> looking for factor pairs.  There's got to be a way to extend this idea
> to make it more arbitrary, but I haven't figured it out yet.  At least
> we know there's going to be an upper bound on the number of elements you
> have in a factor list (the sum of the exponents of the prime factors).
>
> What if my approach were extended to recursively fill out some sort of
> tree structure?  If you took the list of factor pairs and then made the
> function search for each of the left or right factor's binary pairs then
> you'd be building the list for size=3.  Unless we did something tricky
> here, we'd get back a bunch of duplicate entries and it would only get
> worse as we descend deeper into the tree.  I'll see if I can come up
> with the 'trick'.

That is essentially what I have been playing with.  I begin by
computing the factor pairs, and then recursively compute the factor
pairs of the left and right factors of each pair.  I don't have the
recursion working properly yet, but I think that is a good approach.

And yes, it does sound like this ends up being a factor tree or sorts.
 But not exactly, I just sketched the tree and it is more like the set
of all possible factor trees.

Brian

> -Jake
>
> > -Jake
> >
> >> On 23/01/2008, Brian Granger <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> I am working on a parallel/distributed array library for
> >>> python/ipython.  For this library I need to be able to compute the
> >>> multiplicative partitions of positive integers:
> >>>
> >>> 12 => (2,6), (3,4)
> >>>
> >>> A few questions about this:
> >>>
> >>> 1) Is there a good algorithm for computing these.  I can think of
> >>> silly ways of doing it, but I imagine there are more efficient ways.
> >>>
> >>> 2) Does anyone know of a implementation of such an algorithms (python, c, 
> >>> etc.)
> >>>
> >>> 3) Does anyone know of a BSD license compatible (please don't shoot me
> >>> :) ) implementation.  Because these distributed arrays are being
> >>> developed as a part of ipython, it needs to be BSD.
> >>>
> >>> Thanks!
> >>>
> >>> Brian
> >>>
> >>>
> >>>
> >>
> >>
> >
> > >
> >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to