First-fit-decreasing Bin Packing
   HOME





First-fit-decreasing Bin Packing
First-fit-decreasing (FFD) is an algorithm for bin packing. Its input is a list of items of different sizes. Its output is a ''packing'' - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem, so we use an approximately-optimal heuristic. Description The FFD algorithm works as follows. * Order the items from largest to smallest. * Open a new empty bin, bin #1. * For each item from largest to smallest, find the ''first'' bin into which the item fits, if any. ** If such a bin is found, put the new item in it. ** Otherwise, open a new empty bin put the new item in it. In short: FFD orders the items by descending size, and then calls first-fit bin packing. An equivalent description of the FFD algorithm is as follows. * Order the items from largest to smallest. * While there are remaining items: ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Bin Packing
The bin packing problem is an optimization problem, in which items of different sizes must be packed into a finite number of bins or containers, each of a fixed given capacity, in a way that minimizes the number of bins used. The problem has many applications, such as filling up containers, loading trucks with weight capacity constraints, creating file backups in media, splitting a network prefix into multiple subnets, and technology mapping in FPGA semiconductor chip design. Computationally, the problem is NP-hard, and the corresponding decision problem, deciding if items can fit into a specified number of bins, is NP-complete. Despite its worst-case hardness, optimal solutions to very large instances of the problem can be produced with sophisticated algorithms. In addition, many approximation algorithms exist. For example, the first fit algorithm provides a fast but often non-optimal solution, involving placing each item into the first bin in which it will fit. It requires ' ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Heuristic
A heuristic or heuristic technique (''problem solving'', '' mental shortcut'', ''rule of thumb'') is any approach to problem solving that employs a pragmatic method that is not fully optimized, perfected, or rationalized, but is nevertheless "good enough" as an approximation or attribute substitution. Where finding an optimal solution is impossible or impractical, heuristic methods can be used to speed up the process of finding a satisfactory solution. Heuristics can be mental shortcuts that ease the cognitive load of making a decision. Context Gigerenzer & Gaissmaier (2011) state that sub-sets of ''strategy'' include heuristics, regression analysis, and Bayesian inference. Heuristics are strategies based on rules to generate optimal decisions, like the anchoring effect and utility maximization problem. These strategies depend on using readily accessible, though loosely applicable, information to control problem solving in human beings, machines and abstract i ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


First-fit Bin Packing
First-fit (FF) is an online algorithm for bin packing. Its input is a list of items of different sizes. Its output is a ''packing'' - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem. The first-fit algorithm uses the following heuristic: * It keeps a list of open bins, which is initially empty. * When an item arrives, find the ''first'' bin into which the item can fit, if any. ** If such a bin is found, the new item is placed inside it. ** Otherwise, a new bin is opened and the coming item is placed inside it. Approximation ratio Denote by FF(L) the number of bins used by First-Fit, and by OPT(L) the optimal number of bins possible for the list L. The analysis of FF(L) was done in several steps. * The first upper bound of FF(L) \leq 1.7\mathrm+3 for FF was proven by Ullman in 1971. * In 1972, t ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

David S
David (; , "beloved one") was a king of ancient Israel and Judah and the Kings of Israel and Judah, third king of the Kingdom of Israel (united monarchy), United Monarchy, according to the Hebrew Bible and Old Testament. The Tel Dan stele, an Canaanite and Aramaic inscriptions, Aramaic-inscribed stone erected by a king of Aram-Damascus in the late 9th/early 8th centuries BCE to commemorate a victory over two enemy kings, contains the phrase (), which is translated as "Davidic line, House of David" by most scholars. The Mesha Stele, erected by King Mesha of Moab in the 9th century BCE, may also refer to the "House of David", although this is disputed. According to Jewish works such as the ''Seder Olam Rabbah'', ''Seder Olam Zutta'', and ''Sefer ha-Qabbalah'' (all written over a thousand years later), David ascended the throne as the king of Judah in 885 BCE. Apart from this, all that is known of David comes from biblical literature, Historicity of the Bible, the historicit ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Infimum And Supremum
In mathematics, the infimum (abbreviated inf; : infima) of a subset S of a partially ordered set P is the greatest element in P that is less than or equal to each element of S, if such an element exists. If the infimum of S exists, it is unique, and if ''b'' is a lower bound of S, then ''b'' is less than or equal to the infimum of S. Consequently, the term ''greatest lower bound'' (abbreviated as ) is also commonly used. The supremum (abbreviated sup; : suprema) of a subset S of a partially ordered set P is the least element in P that is greater than or equal to each element of S, if such an element exists. If the supremum of S exists, it is unique, and if ''b'' is an upper bound of S, then the supremum of S is less than or equal to ''b''. Consequently, the supremum is also referred to as the ''least upper bound'' (or ). The infimum is, in a precise sense, dual to the concept of a supremum. Infima and suprema of real numbers are common special cases that are important in analys ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Best-fit Bin Packing
Best-fit is an online algorithm for bin packing. Its input is a list of items of different sizes. Its output is a ''packing'' - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem. The best-fit algorithm uses the following heuristic A heuristic or heuristic technique (''problem solving'', '' mental shortcut'', ''rule of thumb'') is any approach to problem solving that employs a pragmatic method that is not fully optimized, perfected, or rationalized, but is nevertheless ...: * It keeps a list of open bins, which is initially empty. * When an item arrives, it finds the bin with the ''maximum load'' into which the item can fit, if any. The ''load'' of a bin is defined as the sum of sizes of existing items in the bin before placing the new item. ** If such a bin is found, the new item is placed i ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Multifit Algorithm
The multifit algorithm is an algorithm for multiway number partitioning, originally developed for the problem of identical-machines scheduling. It was developed by Coffman, Garey and Johnson. Its novelty comes from the fact that it uses an algorithm for another famous problem - the bin packing problem - as a subroutine. The algorithm The input to the algorithm is a set ''S'' of numbers, and a parameter ''n''. The required output is a partition of ''S'' into ''n'' subsets, such that the largest subset sum (also called the makespan) is as small as possible. The algorithm uses as a subroutine, an algorithm called '' first-fit-decreasing bin packing'' (FFD). The FFD algorithm takes as input the same set ''S'' of numbers, and a bin-capacity ''c''. It heuristically packs numbers into bins such that the sum of numbers in each bin is at most ''C'', aiming to use as few bins as possible. Multifit runs FFD multiple times, each time with a different capacity ''C'', until it finds some ''C ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Identical-machines Scheduling
Identical-machines scheduling is an optimization problem in computer science and operations research. We are given ''n'' jobs ''J''1, ''J''2, ..., ''Jn'' of varying processing times, which need to be scheduled on ''m'' identical machines, such that a certain objective function is optimized, for example, the makespan is minimized. Identical machine scheduling is a special case of uniform machine scheduling, which is itself a special case of optimal job scheduling. In the general case, the processing time of each job may be different on different machines; in the case of identical machine scheduling, the processing time of each job is the same on each machine. Therefore, identical machine scheduling is equivalent to multiway number partitioning. A special case of identical machine scheduling is single-machine scheduling. In the standard three-field notation for optimal job scheduling problems, the identical-machines variant is denoted by P in the first field. For example, " P, , C_ ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]