Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[5540] Bin Packing

Last post 06-22-2008 1:09 AM by Yak. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [5540] Bin Packing

    This thread is for discussions of Bin Packing.

    • Post Points: 50
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 06-24-2006 2:37 PM In reply to

    • drslack
    • Not Ranked
    • Joined on 06-24-2006
    • United States
    • New Member
    • Points 10

    Re: [5540] Bin Packing

    Great article, I was looking for something exactly like this! How difficult would it be to modify the code to allow for varible size bin widths, and then pack each element either horizontal or vertial depending on height and width. If you can figure that out let me know. Thanks and keep up the good work.Smiley Face [:)]

    • Post Points: 10
  • 07-10-2006 10:27 PM In reply to

    • Nimpo
    • Top 25 Contributor
    • Joined on 03-16-2004
    • United States
    • Guru
    • Points 7,515

    Re: [5540] Bin Packing

    Well as for variable sized bins, all you would need to do is have an array of Integers that holds the size for each Bin.  Then in my code, where ever there is a reference to BinHeight, you would simply reference BinHeightArray(ThisBinNumber) instead.  You could incorporate all this code into its own Class as it should be an make the array a property so you can do bounds checking, check for valid values, and all that good stuff.

    As for 2-dimensional Bin Packing...  I'd have to get back to you on that one.  I understand what you mean but I don't think these algorithms are easily translatable into another dimension...  Try to formulate an algorithm that starts filling in the lower left to the lower right, and then starts moving up.  I can't vouch for the efficiency of this idea but its my only lead...






    If you want to know more about me, check out my MySpace.

    Tech & Philosophy - Philosophy in Technology Blog
    Caution, bmp in Road - GDI+ Blog
    • Post Points: 5
  • 10-17-2006 10:13 PM In reply to

    • leisa
    • Not Ranked
    • Joined on 10-17-2006
    • New Member
    • Points 5

    Re: [5540] Bin Packing

    I have a quick question.  Can there ever be more bins in a First Fit Algorithm than a Next Fit algorithm?

    • Post Points: 5
  • 10-28-2006 7:48 PM In reply to

    • mj23
    • Not Ranked
    • Joined on 10-28-2006
    • New Member
    • Points 5

    Re: [5540] Bin Packing

    Hi,

    Excellent article.  Would you know how or have a PHP version of this problem?

    Regards, Michael

    • Post Points: 5
  • 12-12-2006 6:02 PM In reply to

    Re: [5540] Bin Packing

    Great article. Thanks.

     

    • Post Points: 5
  • 01-03-2007 7:22 PM In reply to

    Re: [5540] Bin Packing

    Excellent article. I was looking for something exactly like this. I think it will help me backing up files to the CDs.
    Have you provided all the algorithms that are available to solve Bin Packing ?


    I would also like to see a solution for the 0-1 Knapsack problem where each article(File) have a weight(MB) as well as a value(priority). The sack capacity let's say 700MB.
    Thank  you.


    • Post Points: 10
  • 03-07-2007 4:24 PM In reply to

    Re: [5540] Bin Packing

    Hello,

    I'm new here and maybe missing something. Everybody says 'Great article' - but where the article itself? Same for code - is there code example or algorithm available?

    Thanks.

    • Post Points: 5
  • 04-28-2007 3:09 AM In reply to

    • ritusmart
    • Not Ranked
    • Joined on 04-28-2007
    • United States
    • New Member
    • Points 10

    Re: [5540] Bin Packing

    hey... grt job buddy...

    can u plz send me a 'C' program code for best/first/worst fit algorithms....

    i need it urgently.... i need to submit code as assignment..... by sunday...    

    plz help....

    ritusmart2001@yahoo.com

    • Post Points: 10
  • 06-16-2007 11:48 PM In reply to

    • ROOKIE_07
    • Not Ranked
    • Joined on 06-16-2007
    • Jamaica
    • New Member
    • Points 5

    Re: [5540] Bin Packing

    can u plz send me a 'C' program code for best/first/worst fit algorithms....

    i need it urgently.... i need to submit code as assignment......PLZ HELP

     

    rrookwood_jm@yahoo.com

    • Post Points: 5
  • 06-25-2007 5:19 AM In reply to

    • rickkidd
    • Not Ranked
    • Joined on 06-25-2007
    • Jamaica
    • New Member
    • Points 15

    Re: [5540] Bin Packing

    i am in the same situation can u plz send me a C or C++ code for best/first/worst fit algorithms....

    i need  it to complete my assignment

    bion365@gmail.com

    thanks

    • Post Points: 10
  • 09-11-2007 5:13 AM In reply to

    • Nimpo
    • Top 25 Contributor
    • Joined on 03-16-2004
    • United States
    • Guru
    • Points 7,515

    Re: [5540] Bin Packing

    I have just returned from an extended absence from this forum so I realize this is rather late.


    I believe that the First Fit algorithm will always be better than or equivalent to the Next Fit algorithm.

    I first learned of the Bin Packing problem from an Algebra 3 class in high school.  I implemented all of the algorithms the textbook talked about.  Doing some quick online research, the only other algorithm I found a mention of was the "Almost Worse Fit".  It simply places the object in the second emptiest bin (which is slightly better than Worse Fit apparently).

    I cannot myself convert my code into other languages (I do not have the time or the motivation).  But the concepts used in my code are not very language specific.  It shouldn't take much time to do the conversion.  If you do not know the target language well then you will simply have to search online for the syntax for that particular structure (Arrays, sorting, and drawing is all there really is to it, and I would think that drawing isn't that important).  Plus, that way you'd actually be learning the language you are supposed to learn =)









    If you want to know more about me, check out my MySpace.

    Tech & Philosophy - Philosophy in Technology Blog
    Caution, bmp in Road - GDI+ Blog
    • Post Points: 5
  • 09-12-2007 10:29 AM In reply to

    • kirby
    • Not Ranked
    • Joined on 09-12-2007
    • Philippines
    • New Member
    • Points 10

    Re: [5540] Bin Packing

    can u plz send me a 'C++' or 'C' program code for first fit algorithms....


    i need it urgently.... i need to submit code as my project by saturday 09/15/07...

    example output:

    enter no. of process to be loaded: 4

    Job #      Job size      Arrival time

    1               40K            0 msec

    2               15K            7 msec

    3               10K            5 msec

    4               45K            10 msec

     

    press any key to continue...

     

    note: Job size and Arrival time will be inputted by the user and as you press enter in the Job size, "K" will be automatically displayed as well as the "msec" in the arrival time.


    • Post Points: 10
  • 09-16-2007 6:26 AM In reply to

    • MisSya
    • Not Ranked
    • Joined on 09-16-2007
    • Malaysia
    • New Member
    • Points 10

    Re: [5540] Bin Packing

    Hi,

    i urgently need the codes too before 19/09/07. pls help me. could you send me the C++ and java version of the codes. Tankyou. send to nuranastacia@yahoo.com

    • Post Points: 10
  • 03-16-2008 2:33 PM In reply to

    • Roque
    • Not Ranked
    • Joined on 03-16-2008
    • Poland
    • New Member
    • Points 10

    Re: [5540] Bin Packing

     hallo, i'm from poland.

    can u please send me a C program code for the best, next and first fit algorithms?

     

    my email: roque@poczta.onet.pl 

    thank you:) 

    • Post Points: 10
Page 1 of 2 (17 items) 1 2 Next >