[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NP-complete whatever, solve the knapsack problem!



On Tue, Jul 15, 2003 at 01:55:30PM +0200, Rogier Wolff wrote:
> On Tue, Jul 15, 2003 at 06:35:31AM -0500, Ron Johnson wrote:
> > On Tue, 2003-07-15 at 05:10, martin f krafft wrote:
> > > Scenario: 100 Files between 100-200Mb.
> > > Desired Result: These burned to CD in any order, so that to minimise
> > >   the number of CDRs
> > > 
> > > Question: is there a tool to automate this?
> > 
> > When I've had very similar problems, I've created a 2 column file
> > with filenames and sizes, and import it into a spreadsheet.
> > 
> > Sort it by size descending, and start playing "best fit".  With
> > Cut-and-paste and sum(), it really goes pretty quickly.
> 
> I do the same with "du | sort -n" and a couple of directories. 
> 
> But if someone knows a tool, I'd appreciate it!

I'll just chip in here. Lost the message of the original sender.

I wrote this dirty Perl script. It works for me and I wrote about 30
CD's with it.

-- 
Danie Roux *shuffle* Adore Unix


Attachment: cdgroup.pl
Description: Perl program


Reply to: