http://qs321.pair.com?node_id=496495


in reply to Re: Distribute MP3 recordings optimally to CD-Rs
in thread Distribute MP3 recordings optimally to CD-Rs

That's basically the algorithm I used in Algorithm::BinPack. Sort by biggest-first, then iterate on each item. If it doesn't fit in the first bin, try the next bin. Rinse, repeat.

  • Comment on Re^2: Distribute MP3 recordings optimally to CD-Rs

Replies are listed 'Best First'.
Re^3: Distribute MP3 recordings optimally to CD-Rs
by tweetiepooh (Hermit) on Oct 06, 2005 at 09:09 UTC
    Don't know if this is relevant but do you need to allow space for overheads like directories etc?

    Is that part of the rough 700Mb per CD?

    Does that overhead change with number of files? ie can you fit 2 x 349 Mb files (698Mb) but only 195 x 3.49 Mb (680Mb).

    Doesn't really change the principal behind the algorithm.

    Although not directly relevent to computer files there is also the issue of retrieval. The best packing method my be less efficient if the files you most want to retrieve are scattered. This is part of programming for loading a lorry for a drop load. You need to make the best packing but also take into account the best route for the drop and how they will get stuff off.