Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] fitting files into a filesystem

Expand Messages
  • Jeff 'japhy' Pinyan
    ... This is an NP-complete problem known as the knapsack problem , or bin packing . It s no easy task. -- Jeff japhy Pinyan % How can we ever be
    Message 1 of 3 , Sep 5, 2004
    • 0 Attachment
      On Sep 4, Paul Archer said:

      >I have a bunch of files in the 23-30GB range that I need to fit as
      >efficiently as possible onto 250GB hard drives. I have enough files
      >(several terabytes worth) that I should be able to come within a gigabyte or
      >so of filling each drive--but I'm having trouble conceptualizing how to
      >figure out what the best fit would be.

      This is an NP-complete problem known as "the knapsack problem", or "bin
      packing". It's no easy task.

      --
      Jeff "japhy" Pinyan % How can we ever be the sold short or
      RPI Acacia Brother #734 % the cheated, we who for every service
      http://japhy.perlmonk.org/ % have long ago been overpaid?
      http://www.perlmonks.org/ % -- Meister Eckhart
    • Paul Archer
      ... Well, I feel better that I couldn t come up with anything, at least! But it is an easy task (in a Perl sort of way): someone has written
      Message 2 of 3 , Sep 5, 2004
      • 0 Attachment
        9:14am, Jeff 'japhy' Pinyan wrote:

        >
        > On Sep 4, Paul Archer said:
        >
        > >I have a bunch of files in the 23-30GB range that I need to fit as
        > >efficiently as possible onto 250GB hard drives. I have enough files
        > >(several terabytes worth) that I should be able to come within a gigabyte or
        > >so of filling each drive--but I'm having trouble conceptualizing how to
        > >figure out what the best fit would be.
        >
        > This is an NP-complete problem known as "the knapsack problem", or "bin
        > packing". It's no easy task.
        >

        Well, I feel better that I couldn't come up with anything, at least!
        But it is an easy task (in a Perl sort of way): someone has written
        Algorithm::Bucketizer to handle it. Thanks for the name, which led me to the
        module. CPAN (and this mailing list) come through again!

        Paul Archer



        ----------------------------------------------------------------
        Q: What do Winnie-the-Pooh and John the Baptist have in common?
        A: Their middle name.
        ----------------------------------------------------------------
      Your message has been successfully submitted and would be delivered to recipients shortly.