Bin Packing
- Bin Packing, What is It?
- Next Fit Algorithm
- First Fit Algorithm
- Worst Fit Algorithm
- Best Fit Algorithm
- Decreasing Algorithms
- Displaying the Data
Bin Packing, What is It?
Bin: A fixed-size container that can hold Elements.
Bin Height: The specified amount that each Bin can hold.
Element: An item that is to be placed in a Bin having a certain Element Height.
Element Height: The amount of Bin space the Element will take up if placed in that Bin.
Now, why is this useful? Several real-world problems can be optimized and made to run more efficient by employing this solution. Image for a moment that you have a package of blank CDs that can hold 80 minutes of music each. You have 100 songs of varying lengths. You want to use the least amount of blank CDs to fit all of your songs on. This is a Bin Packing problem.
Bin: The blank CDs.
Bin Height: 80 (minutes) or 4,800 (seconds).
Element: One song.
Element Height: The length of each song in minutes or seconds.
Other examples include: Using the least amount of boards to cut out small pieces for a construction project, fitting large files onto small capacity hard drives, etc.
There is one hitch with a Bin Packing problem, that is a Bin Packing problem is classified as NP-Complete. This basically means that their is no way of being guaranteed the best solution without checking every possible solution. This is not to say that a solution reached by one of the following algorithms is not optimal, it may be. The classic NP-Complete problem is the Traveling Salesman Problem. The algorithms presented here do give reasonable, practical solutions however.
You might also like...
VB.NET books
-
VB.NET for AutoCAD 2010 - Level 1
VB.NET can be used to customize AutoCAD with nearly unlimited power and flexibility. And for those who have been customizing AutoCAD with VBA, VB.NET is the logical language of choice once VBA is completely phased out of AutoCAD.This book is the edit...
VB.NET forum discussion
-
ICSharp ZIP library C# to VB.NET Port
by Garry Wang (6 replies)
-
Printing with formatting in VB.NET
by jclebon (7 replies)
-
IP2Location Geolocation .NET Component in VB.NET
by dunking (5 replies)
-
Watching Folder Activity in VB.NET
by emmaddai (17 replies)
-
print a document file without using print dialog control in Vb.net
by konikula (1 replies)
VB.NET podcasts
-
.NET Rocks: Eric Lippert Talks About Project Roslyn
Published 9 years ago, running time 0h56m
Recorded on PI day, Carl and Richard talk to the one-and-only Eric Lippert from the C# Compiler team. But we don't only talk about C#! The conversation wanders around all the languages, a little F#, a little IronPython, heck, even VB.NET! Eric talks about Project Roslyn, Microsoft's efforts to ma.
Comments