Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Aladdinew
Full download : https://goo.gl/XTCXti Solutions Manual for An Introduction To Abstract Algebra With Notes To The Future Teacher 1st Edition by Nicodemi
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Aladdinew
Full download : https://goo.gl/XTCXti Solutions Manual for An Introduction To Abstract Algebra With Notes To The Future Teacher 1st Edition by Nicodemi
2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الثالث - تطبيقات التفاضلanasKhalaf4
طبعة جديدة ومنقحة
حل تمارين الكتاب
شرح المواضيع الرياضية بالتفصيل وبأسلوب واضح ومفهوم لجميع المستويات
حلول الاسألة الوزارية
اعداد الدكتور أنس ذياب خلف
email: anasdhyiab@gmail.com
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث تطبيقات التفاضلanasKhalaf4
طبعة جديدة ومنقحة
حل تمارين الكتاب
شرح المواضيع الرياضية بالتفصيل وبأسلوب واضح ومفهوم لجميع المستويات
حلول الاسألة الوزارية
اعداد الدكتور أنس ذياب خلف
email: anasdhyiab@gmail.com
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Approximation Algorithms Part Four: APTAS
1. Advanced Algorithms – COMS31900
Approximation algorithms part four
Asymptotic Polynomial Time Approximation Schemes
Benjamin Sach
2. Approximation Algorithms Recap
A polynomial time algorithm A is an α-approximation for problem P if,
it always outputs a solution s with
Opt
α s Opt (for a maximisation problem)
Opt s α · Opt (for a minimisation problem)
A poly-time approximation scheme (PTAS) is a family of algorithms:
For any constant > 0, A is a (1 + )-approximation for P
It is a (fully) FPTAS if A takes time polynomial in both n and 1/
A PTAS is allowed to have A which takes O(n1/ ) time
- which is polynomial in n (for any constant )
i.e. O((n/ )c)
3. Approximation Algorithms Recap
A polynomial time algorithm A is an α-approximation for problem P if,
it always outputs a solution s with
Opt
α s Opt (for a maximisation problem)
Opt s α · Opt (for a minimisation problem)
We have seen various c-approximations with constant c
A poly-time approximation scheme (PTAS) is a family of algorithms:
For any constant > 0, A is a (1 + )-approximation for P
Last lecture we saw an FPTAS for SUBSETSUM
It is a (fully) FPTAS if A takes time polynomial in both n and 1/
A PTAS is allowed to have A which takes O(n1/ ) time
- which is polynomial in n (for any constant )
i.e. O((n/ )c)
5. The SUBSETSUM problem
4 4
7
322
t = 12
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
6. The SUBSETSUM problem
4 4
7
322
t = 12
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = t?
7. The SUBSETSUM problem
4 4
7
322
t = 12
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = t?
where SIZE(S ) = a∈S a
8. The SUBSETSUM problem
t = 12
4
4
2
7
32
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = t?
where SIZE(S ) = a∈S a
9. The SUBSETSUM problem
t = 12
7
3
2
4 42
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = t?
where SIZE(S ) = a∈S a
10. The SUBSETSUM problem
4 4
7
322
t = 12
• Let S be a (multi) set of integers and t be a positive integer
here S = {4, 2, 4, 7, 2, 3} and t = 12
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = t?
where SIZE(S ) = a∈S a
(last lecture we discussed the NP-hard optimisation version)
The decision version is NP-complete
12. The PARTITION problem
4 4
7
322
The input S is a multi-set of integers
The PARTITION problem is a special case of SUBSETSUM
13. The PARTITION problem
4 4
7
322
The input S is a multi-set of integers
but t is always half the sum of item sizes
The PARTITION problem is a special case of SUBSETSUM
14. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
The PARTITION problem is a special case of SUBSETSUM
15. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
16. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
17. The PARTITION problem
t = 11
4
4
2
7
32
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
18. The PARTITION problem
7
22
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
4
4
3
The PARTITION problem is a special case of SUBSETSUM
19. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
20. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
21. The PARTITION problem
4 4
7
322
t = 11
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
Alternatively... Can we pack S into two bins of size SIZE(S)/2?
22. The PARTITION problem
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
Alternatively... Can we pack S into two bins of size SIZE(S)/2?
4 4
7
322
t = 11
23. The PARTITION problem
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
Alternatively... Can we pack S into two bins of size SIZE(S)/2?
4
4
3
7
2
2
t = 11
24. The PARTITION problem
The input S is a multi-set of integers
but t is always half the sum of item sizes
Decision Problem Is there a subset, S ⊆ S with SIZE(S ) = SIZE(S)/2?
t = SIZE(S)/2 = a∈S
a
2
The PARTITION problem is a special case of SUBSETSUM
Alternatively... Can we pack S into two bins of size SIZE(S)/2?
4
4
3
7
2
2
t = 11
The PARTITION problem is also NP-complete
27. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4 4
7
322
t = 11
• Convert the PARTITION instance into a BINPACKING problem
by dividing all item and bin sizes by t = SIZE(S)/2
28. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
• Convert the PARTITION instance into a BINPACKING problem
by dividing all item and bin sizes by t = SIZE(S)/2
4
11
4
11
7
11 3
112
11
2
11
1
29. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
• Convert the PARTITION instance into a BINPACKING problem
by dividing all item and bin sizes by t = SIZE(S)/2
• Now all items are have size at most 1 and the bins have size 1
4
11
4
11
7
11 3
112
11
2
11
1
30. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
• Convert the PARTITION instance into a BINPACKING problem
by dividing all item and bin sizes by t = SIZE(S)/2
• Now all items are have size at most 1 and the bins have size 1
• The optimal number of bins Optb is 2 iff
the answer to the PARTITION instance is ‘yes’
4
11
4
11
7
11 3
112
11
2
11
1
31. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
• Convert the PARTITION instance into a BINPACKING problem
by dividing all item and bin sizes by t = SIZE(S)/2
• Now all items are have size at most 1 and the bins have size 1
• The optimal number of bins Optb is 2 iff
the answer to the PARTITION instance is ‘yes’
4
11
4
11
7
11 3
112
11
2
11
1
• What does this tell us about approximating BINPACKING?
32. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
33. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
34. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
35. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
• If Optb = 2 then 2 s α · Optb < (3/2) · Optb = 3
36. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
• If Optb = 2 then 2 s α · Optb < (3/2) · Optb = 3
37. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
so s = 2• If Optb = 2 then 2 s α · Optb < (3/2) · Optb = 3
38. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
so s = 2
• So A can solve the NP-complete PARTITION problem in polynomial time!
• If Optb = 2 then 2 s α · Optb < (3/2) · Optb = 3
39. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
• Assume A is an α-approximation for BINPACKING with α < 3/2
A outputs a solution using s bins with Optb s α · Optb
• If Optb > 2 then s > 2
so s = 2
• So A can solve the NP-complete PARTITION problem in polynomial time!
which implies that P = NP
• If Optb = 2 then 2 s α · Optb < (3/2) · Optb = 3
40. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
Lemma There is no α-approximation for BINPACKING with α < 3/2
unless P = NP
41. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
Lemma There is no α-approximation for BINPACKING with α < 3/2
unless P = NP
We saw that First Fit Decreasing (FFD) is a 3/2-approximation
42. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
Lemma There is no α-approximation for BINPACKING with α < 3/2
unless P = NP
We saw that First Fit Decreasing (FFD) is a 3/2-approximation
so this is the best we can do?
43. PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4
11
4
11
7
11 3
112
11
2
11
1
Lemma There is no α-approximation for BINPACKING with α < 3/2
unless P = NP
We saw that First Fit Decreasing (FFD) is a 3/2-approximation
so this is the best we can do?
In fact, FFD gives a solution using s bins with
Optb s
11
9
· Optb + 1
44. Asymptotic Polynomial time approximation schemes
An asymptotic polynomial time approximation scheme (APTAS)
for problem P is a family of algorithms:
For any constant > 0, A runs in polynomial time (poly-time)
There is a constant c > 0 such that
and outputs a solution s with Opt s (1 + ) · Opt + c
45. Asymptotic Polynomial time approximation schemes
An asymptotic polynomial time approximation scheme (APTAS)
for problem P is a family of algorithms:
For any constant > 0, A runs in polynomial time (poly-time)
There is a constant c > 0 such that
and outputs a solution s with Opt s (1 + ) · Opt + c
(this is the minimisation version of the definition)
46. Asymptotic Polynomial time approximation schemes
An asymptotic polynomial time approximation scheme (APTAS)
for problem P is a family of algorithms:
For any constant > 0, A runs in polynomial time (poly-time)
An APTAS does not have to have running time polynomial in 1/
There is a constant c > 0 such that
and outputs a solution s with Opt s (1 + ) · Opt + c
(this is the minimisation version of the definition)
47. Asymptotic Polynomial time approximation schemes
An asymptotic polynomial time approximation scheme (APTAS)
for problem P is a family of algorithms:
For any constant > 0, A runs in polynomial time (poly-time)
An APTAS does not have to have running time polynomial in 1/
An asymptotic fully PTAS (AFPTAS) is also polynomial in 1/
There is a constant c > 0 such that
and outputs a solution s with Opt s (1 + ) · Opt + c
(this is the minimisation version of the definition)
48. Asymptotic Polynomial time approximation schemes
An asymptotic polynomial time approximation scheme (APTAS)
for problem P is a family of algorithms:
For any constant > 0, A runs in polynomial time (poly-time)
An APTAS does not have to have running time polynomial in 1/
An asymptotic fully PTAS (AFPTAS) is also polynomial in 1/
There is a constant c > 0 such that
and outputs a solution s with Opt s (1 + ) · Opt + c
(this is the minimisation version of the definition)
We will see an APTAS for BINPACKING
which uses at most (1 + ) · Opt + 1 bins
49. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
50. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
We have n items but
51. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
We have n items but
◦ There are cs (a constant) number of different item sizes
52. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
We have n items but
◦ There are cs (a constant) number of different item sizes
◦ At most cb (another constant) items fit in each bin
53. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
We have n items but
◦ There are cs (a constant) number of different item sizes
◦ At most cb (another constant) items fit in each bin
Here cs = 3 and cb = 2
54. A special case of BINPACKING
We will now see a special case of BINPACKING which we can solve optimally in polynomial time
4
8
7
8
3
8
1
4
8
4
8 7
8
7
8
4
8
3
8
We have n items but
◦ There are cs (a constant) number of different item sizes
◦ At most cb (another constant) items fit in each bin
Here cs = 3 and cb = 2
How many different ways are there to fill a single bin?
55. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
cs diff. item sizes
cb items fit in each bin
56. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
cs diff. item sizes
cb items fit in each bin
57. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
cs diff. item sizes
cb items fit in each bin
58. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
3
8
4
8
cs diff. item sizes
cb items fit in each bin
59. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
cs diff. item sizes
cb items fit in each bin
60. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
cs diff. item sizes
cb items fit in each bin
61. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
There are between 0 and cb items of any one size
cs diff. item sizes
cb items fit in each bin
62. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
There are between 0 and cb items of any one size
There are cs different sizes
cs diff. item sizes
cb items fit in each bin
63. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
There are between 0 and cb items of any one size
There are cs different sizes
The number of types
cs diff. item sizes
cb items fit in each bin
64. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
There are between 0 and cb items of any one size
There are cs different sizes
(cb + 1) × (cb + 1) × . . . × (cb + 1)
cs
The number of types
cs diff. item sizes
cb items fit in each bin
65. A special case of BINPACKING
4
8
3
8
3
8
3
8
4
8
7
8 3
8
4
8
4
8
1 2 3 4 5 6 7
Type:
• We can describe any packing of items into a single bin by its type
• The type of a packed bin determines how many of each item is packed
we ignore rearrangement of items
• How many types can there be?
There are between 0 and cb items of any one size
There are cs different sizes
(cb + 1) × (cb + 1) × . . . × (cb + 1)
cs
= (cb + 1)csThe number of types
cs diff. item sizes
cb items fit in each bin
66. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
cb items fit in each bin
cs diff. item sizes
67. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
68. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
69. A special case of BINPACKING
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
by the number of bins of each type used
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
70. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
71. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
72. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
There are between 0 and n bins of any type
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
73. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
There are between 0 and n bins of any type
There are at most (cb + 1)cs different types
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
74. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
There are between 0 and n bins of any type
There are at most (cb + 1)cs different types
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
number of packings
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
75. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
There are between 0 and n bins of any type
There are at most (cb + 1)cs different types
(n + 1) × (n + 1) × . . . × (n + 1)
(cb + 1)cs
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
number of packings
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
76. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
we ignore rearrangement of bins
• How different packings can there be?
There are between 0 and n bins of any type
There are at most (cb + 1)cs different types
(n + 1) × (n + 1) × . . . × (n + 1)
(cb + 1)cs
= (n+1)(cb+1)cs
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
number of packings
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
77. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
78. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
• However, not all these different packings are valid
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
79. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
• However, not all these different packings are valid
Many of them use too few or many items of a particular size
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
(in particular the example packing uses too many items of size 3/8)
80. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
• However, not all these different packings are valid
Many of them use too few or many items of a particular size
• We check each of the different packings to see if it is valid
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
(in particular the example packing uses too many items of size 3/8)
81. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
• However, not all these different packings are valid
Many of them use too few or many items of a particular size
• We check each of the different packings to see if it is valid
and output the valid one which uses the fewest bins
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
cb items fit in each bin
cs diff. item sizes
(in particular the example packing uses too many items of size 3/8)
82. A special case of BINPACKING
4
8
3
8
3
87
8 3
8
4
8
3 4 5 6
• We can completely describe any packing of S into b n bins
by the number of bins of each type used
7
8
4
3
8
3
8
5
3
8
3
8
5
• However, not all these different packings are valid
Many of them use too few or many items of a particular size
• We check each of the different packings to see if it is valid
and output the valid one which uses the fewest bins
• This takes O(n · (n + 1)(cb+1)cs
) time and exactly solves BINPACKING
1× Type 3
2× Type 4
3× Type 5
1× Type 6
0× Type 1
0× Type 2
0× Type 7
(i.e. it outputs an optimal packing)
cb items fit in each bin
cs diff. item sizes
(in particular the example packing uses too many items of size 3/8)
83. Towards an APTAS
The APTAS for BINPACKING will use a four step process:
Step 1 Remove all the small items
Step 2 Divide the items into a constant number of groups
Only cb of the remaining large items will fit into a single bin
Sizes of items in each group are then rounded up
to match the size of the largest member
This will leave only cs different item sizes
Step 3 Use the poly-time algorithm to optimally pack the remaining special case
the constants cb and cs will depend on
Step 4 Reverse the grouping from Step 2 and then
Remember that the goal is to use b bins where Opt b (1 + ) · Opt + c (for some c)
greedily pack all the small items removed in Step 1
(and the largest group is removed)
84. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
85. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
86. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
87. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
88. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
pack the small items anywhere you like - just but don’t use an extra bin unless you have to
89. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
90. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
After packing of large items (> /2)
91. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
After packing of large items (> /2)
b bins or (1 + )Opt + 1 bins
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
92. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
After packing of large items (> /2)
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
b bins or (1 + )Opt + 1 bins
93. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
After packing of large items (> /2)
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
b bins or (1 + )Opt + 1 bins
94. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
After packing of large items (> /2)
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
b bins or (1 + )Opt + 1 bins
small items don’t fit in here (so they are very well packed)
1 − 2
95. Removing the small items
we pack the small items ( /2) on top of the large items greedily
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
After packing of large items (> /2)
Either: We don’t use any extra bins
or every bin (except possibly the last) is 1 − ( /2) full
b bins or (1 + )Opt + 1 bins
small items don’t fit in here (so they are very well packed)
1 − 2
this is the +1
96. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
We can now ignore all the small items
and focus on finding a good packing of the large items
97. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
We can now ignore all the small items
and focus on finding a good packing of the large items
How many large items fit in a single bin?
98. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
We can now ignore all the small items
and focus on finding a good packing of the large items
How many large items fit in a single bin?
Each large item is larger than /2. . .
99. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
We can now ignore all the small items
and focus on finding a good packing of the large items
How many large items fit in a single bin?
Each large item is larger than /2. . .
so at most 2/
100. Removing the small items
Lemma Let 0 < < 1. Given a packing of the items a ∈ S with size a > /2 into b bins,
in polynomial time we can find a packing of all items in S which either uses:
b bins or (1 + )Opt + 1 bins
We can now ignore all the small items
and focus on finding a good packing of the large items
How many large items fit in a single bin?
Each large item is larger than /2. . .
so at most 2/ which is a constant :)
101. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
102. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
• We define a new set of items S where each item is rounded up
so each item in a group has the same size
103. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
• We define a new set of items S where each item is rounded up
so each item in a group has the same size
104. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
• We define a new set of items S where each item is rounded up
so each item in a group has the same size
and the largest group is removed
105. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
• We define a new set of items S where each item is rounded up
so each item in a group has the same size
• Notice that S contains only n/k distinct item sizes
and the largest group is removed
106. Reducing the number of item sizes
• We divide the items by size, into groups of size k
k k k
1
the smallest group might contain fewer than k items
• We define a new set of items S where each item is rounded up
so each item in a group has the same size
• Notice that S contains only n/k distinct item sizes
and the largest group is removed
(k will be big enough so that n/k 4/ 2 - which is a constant)
107. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
. Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
108. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
Here Opt(S) is the optimal number of bins required to pack S
Similarly Opt(S ) is the optimal number of bins required to pack S
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
109. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
. Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
110. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
111. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
112. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b bins
113. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b bins
Take the packing of S
and replace each item as shown
unpack
these
114. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b bins
Take the packing of S
and replace each item as shown
Each item from S is replaced
with one no larger from S
unpack
these
115. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b bins
Take the packing of S
and replace each item as shown
Each item from S is replaced
with one no larger from S
So the packing is valid and hence
Opt(S ) Opt(S)
unpack
these
116. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
117. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Take the packing of S
and replace each item as shown
118. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Take the packing of S
and replace each item as shown
119. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Take the packing of S
and replace each item as shown
Each item from S is replaced
with one no larger from S
120. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Take the packing of S
and replace each item as shown
Each item from S is replaced
with one no larger from S
The k largest items are
given their own extra bins
give these k items a bin each
121. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
122. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
This gives a valid packing of S
123. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Opt(S) Opt(S ) + k
This gives a valid packing of S
Hence,
124. Reducing the number of item sizes
Proof
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
S
S
If you can pack S into b bins,
you can pack S into b + k bins
Opt(S) Opt(S ) + k
This gives a valid packing of S
Hence,
Note that both transformations
take polynomial time
125. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
. Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
126. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
127. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
k · Opt(S)
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
128. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
k · Opt(S) (because each of the n items in S has size at least /2)
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
129. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
k · Opt(S) (because each of the n items in S has size at least /2)
If we can find the optimal packing of S , which uses Opt(S ) bins
we can convert it into a packing of S which uses
Opt(S ) + k (1 + )Opt(S) bins
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
130. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
k · Opt(S) (because each of the n items in S has size at least /2)
If we can find the optimal packing of S , which uses Opt(S ) bins
we can convert it into a packing of S which uses
Opt(S ) + k (1 + )Opt(S) bins
S contains 4/ 2 distinct item sizes
and only 2/ items fit in each bin. . .
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
131. Reducing the number of item sizes
Lemma Let S be S after linear grouping (with groups of size k).
Opt(S ) Opt(S) Opt(S ) + k .
.
We set k = n · ( 2/2) and let S be the set of large items which implies that. . .
k · Opt(S) (because each of the n items in S has size at least /2)
I.e. we can optimally pack S in polynomial time. . .
If we can find the optimal packing of S , which uses Opt(S ) bins
we can convert it into a packing of S which uses
Opt(S ) + k (1 + )Opt(S) bins
S contains 4/ 2 distinct item sizes
and only 2/ items fit in each bin. . .
n = |S|
Further, any packing of S can be converted into a packing of S in polynomial time
using at most k extra bins
132. The overall APTAS
Step 1 Remove all the small items
Step 2 Divide the items into k = n · ( 2/2) different groups
Only cb = 2/ of the remaining large items will fit into a single bin
Sizes of items in each group are then rounded up
to match the size of the largest member
This will leave only cs = 4/ 2 different item sizes
Step 3 Use the poly-time algorithm to optimally pack the remaining special case
Step 4 Reverse the grouping from Step 2 and then
greedily pack all the small items removed in Step 1
(and the largest group is removed)
This takes O n · (n + 1)(4/ 2
+1)
2/
time
Theorem For any 0 < < 1, the algorithm presented runs in polynomial time and returns a packing
of any set of items using at most (1 + )Opt + 1 bins
3 4 5 64 5 5
133. Conclusions
• There is no α-approximation for BINPACKING with α < 3/2
• We saw an APTAS for BINPACKING. (which uses at most (1 + ) · Opt + 1 bins)
• There is a poly-time algorithm which outputs a solution using at most,
unless P = NP
• This in turn implies that there is no PTAS for BINPACKING
unless P = NP
• The First Fit Decreasing algorithm uses at most,
11
9
· Opt + 1 bins
there is also an AFPTAS for bin packing
Opt+O(log2 Opt) = 1 +
O(log2 Opt)
Opt
·Opt bins
134. Conclusions
• There is no α-approximation for BINPACKING with α < 3/2
• We saw an APTAS for BINPACKING. (which uses at most (1 + ) · Opt + 1 bins)
• There is a poly-time algorithm which outputs a solution using at most,
unless P = NP
• This in turn implies that there is no PTAS for BINPACKING
unless P = NP
• The First Fit Decreasing algorithm uses at most,
11
9
· Opt + 1 bins
there is also an AFPTAS for bin packing
Opt+O(log2 Opt) = 1 +
O(log2 Opt)
Opt
·Opt bins
Whether there is a poly-time algorithm which uses at most Opt + 1 bins is an open problem