Professional Web Applications Themes

NP-complete whatever, solve the knapsack problem! - Debian

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? -- Please do not CC me when replying to lists; I read them! .''`. martin f. krafft <madduckdebian.org> : :' : proud Debian developer, admin, and user `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/E9L9IgvIgzMMSnURAtrqAKCBYLEaejnW0LC9X/I6QnpMq6depwCgz3pe yn5/2v7G7kZMFFBh3rAMOXY= =gKXk -----END PGP SIGNATURE-----...

  1. #1

    Default NP-complete whatever, solve the knapsack problem!

    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?

    --
    Please do not CC me when replying to lists; I read them!

    .''`. martin f. krafft <madduckdebian.org>
    : :' : proud Debian developer, admin, and user
    `. `'`
    `- Debian - when you have better things to do than fixing a system

    Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.2 (GNU/Linux)

    iD8DBQE/E9L9IgvIgzMMSnURAtrqAKCBYLEaejnW0LC9X/I6QnpMq6depwCgz3pe
    yn5/2v7G7kZMFFBh3rAMOXY=
    =gKXk
    -----END PGP SIGNATURE-----

    martin f krafft Guest

  2. #2

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

    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.

    --
    +-----------------------------------------------------------+
    | Ron Johnson, Jr. Home: [email]ron.l.johnsoncox.net[/email] |
    | Jefferson, LA USA [url]http://members.cox.net/ron.l.johnson[/url] |
    | |
    | 4 degrees from Vladimir Putin
    +-----------------------------------------------------------+


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Ron Johnson Guest

  3. #3

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

    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!

    (Note that I'd be willing to accept a non-optimal solution as long as
    it isn't too far off. Note that we would normally move to DVDs if the
    number of CDs becomes too large. So the number of disks is usually not
    very large.)

    Roger.

    --
    ** [email]R.E.WolffBitWizard.nl[/email] ** [url]http://www.BitWizard.nl/[/url] ** +31-15-2600998 **
    *-- BitWizard writes Linux device drivers for any device you may have! --*
    * I didn't say it was your fault. I said I was going to blame it on you. *


    --
    To UNSUBSCRIBE, email to [email]debian-user-requestlists.debian.org[/email]
    with a subject of "unsubscribe". Trouble? Contact [email]listmasterlists.debian.org[/email]
    Rogier Wolff Guest

  4. #4

    Default 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



    Danie Roux Guest

Similar Threads

  1. How to solve this problem using .NET?
    By jeroen in forum ASP.NET Web Services
    Replies: 0
    Last Post: September 30th, 06:45 PM
  2. how can i solve this problem?
    By Joseph Gellidon via .NET 247 in forum ASP.NET Security
    Replies: 0
    Last Post: June 18th, 06:38 AM
  3. Replies: 2
    Last Post: April 6th, 12:58 PM
  4. Big problem!! Please solve it...
    By raladin webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: November 6th, 04:14 PM
  5. Replies: 3
    Last Post: August 26th, 10:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139