1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Maths question on using the minimum amount of DVD disc

  1. Mar 6, 2013 #1
    this is a practical question

    I have 14 files to burn on a single layer DVD5 disc in which each of them has a size approximately 4.37GB

    Those 14 files are of the size (in GB)


    All values are in GB

    If I want to burn these 14 files into minimum number of DVD discs for environmental and economic purposes, how should these files be arranged? I think at least a few discs could be saved if the files are arranged correctly, and I want to learn the concept. thanks
  2. jcsd
  3. Mar 6, 2013 #2
    Basically you want to pack each disk as much as possible. You could figure it out like this. Start with your largest file and burn it on a disk. Then you'll have 4.37-3.05=1.32 space. There is not enough room for the two smallest files to fit on that disk, so just put the largest file on their with less than 1.32. In other words, the 1.16. So your first disk is
    (3.05, 1.16).
    Cross those off your list and continue this process. Next step you load
    (2.65, 1.36), so cross those off the list.
    Then you load 2.48 and notice you have 1.89 space left. Your largest available file is 1.15 which leaves you enough room to squeeze on the .65, so you got
    (2.48, 1.15, .65)
    (2.40, 1.97) an exact fillup. Hopefully that one actually fits :)
    You could probably figure out the last five.

    Now you only have 7 left...
  4. Mar 6, 2013 #3
    Thanks i ll try
  5. Mar 6, 2013 #4


    User Avatar
    Science Advisor
    Homework Helper

    Several of the files are bigger than half the size of the DVD.

    You con't fit two of those files onto the same DVD, so that gives you the minimum possible number of disks.

    You then need to check that you can actually fit all the files onto that many disks.
  6. Mar 6, 2013 #5
    Your task is what's called the bin packing problem. For such a small number of files, any brute force approach probably will be satisfactory. Another possibility: If you don't need to store the files in their native format, most compression programs will allow you to split the files across multiple discs. That feature allows you to fill up each disc before going to the next one.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook