Well, you need to split into integral groups but you need to make sure that
their sum is exactly what you started with.
On May 20, 2016 8:35 PM, "Devon McCormick" <devon...@gmail.com> wrote:

> I don't care about the number of files, only the total size per partition.
> What Pascal suggested was my initial idea - it's probably good enough.
> Another ideas is to generate a lot of random partitions and pick the best
> one but I think Raul points up what's missing from the problem statement: a
> measure of how good a solution is.
>
> I don't see how this is like ensuring that fractional portions sum to
> 100%.  My idea is more to divide up files I want to back up onto a medium
> with a specific capacity, like a writeable DVD, assuming the sum total is
> such that an even number of discs should suffice.
>
> Anyway, I'll try a couple of these ideas and see how they work.
>
> Thanks for everyone's input.
>
> On Fri, May 20, 2016 at 10:27 PM, Don Guinn <dongu...@gmail.com> wrote:
>
> > Sounds like making sure that percentages add to 100%. Why people check
> that
> > is curious.
> > On May 20, 2016 1:11 PM, "'Pascal Jasmin' via Programming" <
> > programm...@jsoftware.com> wrote:
> >
> > > Do you want an almost equal number of files in each group as well?
> > >
> > > A quick approach is to randomly split the files into groups, then
> > > repeatedly take a large file out of a too big group, and place it into
> a
> > > too small group. The average/target group size is quickly calculated.
> > >
> > > Also take a small file out of a too long group, and place it into a too
> > > short group.
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Devon McCormick <devon...@gmail.com>
> > > To: J-programming forum <programm...@jsoftware.com>
> > > Sent: Friday, May 20, 2016 1:37 PM
> > > Subject: Re: [Jprogramming] Even partitions
> > >
> > > It's an arbitrary grouping so that the sum of file sizes in each group
> is
> > > nearly equal between groups.   To roughly approximate a distribution,
> you
> > > could use something like this:
> > > szs=. (+/16 4000?@$400) + (+/8 4000?@$2e3) + (+/4 4000?@$5e5) +
> > 4000?@$1e6
> > > On May 20, 2016 10:48 AM, "David Porter" <dpor...@cissoid.net> wrote:
> > >
> > > > Groups based on what?
> > > >
> > > > Dave
> > > > On 5/20/2016 10:11 AM, Devon McCormick wrote:
> > > >
> > > >> I have a few thousand photos I want to put into a small number of
> > groups
> > > >> as
> > > >> equally-sized as possible.  It looks like a knapsack problem but I
> > only
> > > >> need to get within some tolerant equality.
> > > >>
> > > >> Has anyone done something like this?
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Devon
> > > >>
> ----------------------------------------------------------------------
> > > >> For information about J forums see
> > http://www.jsoftware.com/forums.htm
> > >
> > > >>
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
>
> Devon McCormick, CFA
>
> Quantitative Consultant
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to