Skip to main content

First Fit Algorithm for Bin Packing

  • Reference work entry
  • First Online:
Encyclopedia of Algorithms

Years and Authors of Summarized Original Work

  • 1974; Johnson, Demers, Ullman, Garey, Graham

  • 2013; Dósa, Sgall

Problem Definition

In the classical bin packing (BP) problem, we are given a set of items with rational sizes between 0 and 1, and we try to pack them into a minimum number of bins of unit size so that no bin contains items with total size more than 1. The problem definition originates in the early 1970s: Johnson’s thesis [10] on bin packing together with Graham’s work on scheduling [8, 9] (among other pioneering works) started and formed the whole area of approximation algorithms. The First Fit (FF) algorithm is one among the first algorithms which were proposed to solve the BP problem and analyzed in the early works. FF performs as follows: The items are first given in some list L and then are handled by the algorithm in this given order. Then, algorithm FF packs each item into the first bin where it fits; in case the item does not fit into any already opened bin, the...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 1,599.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 1,999.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Boyar J, Dósa G, Epstein L (2012) On the absolute approximation ratio for First Fit and related results. Discret Appl Math 160:1914–1923

    Article  MathSciNet  MATH  Google Scholar 

  2. Coffman EG, Garey MR, Johnson DS (1997) Approximation algorithms for bin packing: a survey. In: Hochbaum D (ed) Approximation algorithms. PWS Publishing Company, Boston

    Google Scholar 

  3. Dósa G, Sgall J (2013) First Fit bin packing: a tight analysis. In: Proceedings of the 30th symposium on theoretical aspects of computer science (STACS), LIPIcs vol 3. Schloss Dagstuhl, Kiel, Germany, pp 538–549

    Google Scholar 

  4. Dósa G, Sgall J (2014) Optimal analysis of Best Fit bin packing. In: Esparza J et al (eds) ICALP 2014. LNCS, part I, vol 8572. Springer, Heidelberg, Copenhagen, Denmark, pp 429–441

    Google Scholar 

  5. Dósa G, Li R, Han X, Tuza Zs (2013) Tight absolute bound for First Fit Decreasing bin-packing: FFD(L) < = 11/9 OPT(L) + 6/9. Theor Comput Sci 510:13–61

    Article  MathSciNet  MATH  Google Scholar 

  6. Garey MR, Graham RL, Ullman JD (1973) Worst-case analysis of memory allocation algorithms. In: Proceedings of the 4th symposium on theory of computing (STOC). ACM, Denver, Colorado, USA, pp 143–150

    Google Scholar 

  7. Garey MR, Graham RL, Johnson DS, Yao ACC (1976) Resource constrained scheduling as generalized bin packing. J Combin Theory Ser A 21:257–298

    Article  MathSciNet  MATH  Google Scholar 

  8. Graham RL (1966) Bounds for certain multiprocessing anomalies. Bell Syst Tech J 45:1563–1581

    Article  MATH  Google Scholar 

  9. Graham RL (1969) Bounds on multiprocessing timing anomalies. SIAM J Appl Math 17:263–269

    MathSciNet  MATH  Google Scholar 

  10. Johnson DS (1973) Near-optimal bin packing algorithms. PhD thesis, MIT, Cambridge, MA

    Google Scholar 

  11. Johnson DS (1974) Fast algorithms for bin packing. J Comput Syst Sci 8:272–314

    Article  MathSciNet  MATH  Google Scholar 

  12. Johnson DS, Demers A, Ullman JD, Garey MR, Graham RL (1974) Worst-case performance bounds for simple one-dimensional packing algorithms. SIAM J Comput 3:256–278

    Article  MathSciNet  MATH  Google Scholar 

  13. Sgall J (2012) A new analysis of Best Fit bin packing. In: Kranakis et al (eds) Proceedings of the 6th international conference FUN with algorithms. LNCS, vol 7288. Springer, Venice, Italy, pp 315–321

    Google Scholar 

  14. Simchi-Levi D (1994) New worst case results for the bin-packing problem. Naval Res Logist 41:579–585

    Article  MathSciNet  MATH  Google Scholar 

  15. Ullman JD (1971) The performance of a memory allocation algorithm. Technical report 100, Princeton University, Princeton

    Google Scholar 

  16. Williamson DP, Shmoys DB (2011) The design of approximation algorithms. Cambridge University Press, Cambridge

    Book  MATH  Google Scholar 

  17. Xia B, Tan Z (2010) Tighter bounds of the First Fit algorithm for the bin-packing problem. Discret Appl Math 158:1668–1675

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gyorgy Dosa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer Science+Business Media New York

About this entry

Cite this entry

Dosa, G. (2016). First Fit Algorithm for Bin Packing. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_487

Download citation

Publish with us

Policies and ethics