SlideShare a Scribd company logo
Advanced Algorithms – COMS31900
Approximation algorithms part four
Asymptotic Polynomial Time Approximation Schemes
Benjamin Sach
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)
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)
The SUBSETSUM problem
4 4
7
322
t = 12
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
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?
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
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
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
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
The PARTITION problem
4 4
7
322
The PARTITION problem is a special case of SUBSETSUM
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
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
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
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
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
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
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
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
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
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?
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
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
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
PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
PARTITION and BINPACKING
Key Idea Solve the PARTITION problem by approximating BINPACKING
4 4
7
322
t = 11
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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?
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
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
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)
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)
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)
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
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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)
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)
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)
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)
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
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)
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)
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)
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
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)
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)
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
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
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
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
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
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
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?
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. . .
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/
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 :)
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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

More Related Content

What's hot

Geometric series
Geometric seriesGeometric series
Geometric series
JJkedst
 
Arithmetic sequences and series[1]
Arithmetic sequences and series[1]Arithmetic sequences and series[1]
Arithmetic sequences and series[1]indu psthakur
 
Algebra
AlgebraAlgebra
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Aladdinew
 
Sequence and series
Sequence and series Sequence and series
Sequence and series
Sukhtej Sethi
 
Group Theory and Its Application: Beamer Presentation (PPT)
Group Theory and Its Application:   Beamer Presentation (PPT)Group Theory and Its Application:   Beamer Presentation (PPT)
Group Theory and Its Application: Beamer Presentation (PPT)
SIRAJAHMAD36
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
Leo Crisologo
 
Set theory
Set theorySet theory
Set theory
Gaditek
 
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكروDiscrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Dr. Khaled Bakro
 
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Amr Rashed
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
anithaselvakumar271
 
Geometric Progressions
Geometric ProgressionsGeometric Progressions
Geometric Progressionsitutor
 
Set theory
Set theorySet theory
Set theory
Shiwani Gupta
 
Maths revision year 7 to year 11
Maths revision year 7 to year 11Maths revision year 7 to year 11
Maths revision year 7 to year 11
Caitlin Gregory
 
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theoryBCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
Rai University
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetMoe Han
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematic
Naralaswapna
 

What's hot (19)

Geometric series
Geometric seriesGeometric series
Geometric series
 
Arithmetic sequences and series[1]
Arithmetic sequences and series[1]Arithmetic sequences and series[1]
Arithmetic sequences and series[1]
 
Algebra
AlgebraAlgebra
Algebra
 
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
 
Sequence and series
Sequence and series Sequence and series
Sequence and series
 
Sequence and series
Sequence and seriesSequence and series
Sequence and series
 
Group Theory and Its Application: Beamer Presentation (PPT)
Group Theory and Its Application:   Beamer Presentation (PPT)Group Theory and Its Application:   Beamer Presentation (PPT)
Group Theory and Its Application: Beamer Presentation (PPT)
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
 
Set theory
Set theorySet theory
Set theory
 
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكروDiscrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
 
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
 
Geometric Progressions
Geometric ProgressionsGeometric Progressions
Geometric Progressions
 
Set theory
Set theorySet theory
Set theory
 
Maths revision year 7 to year 11
Maths revision year 7 to year 11Maths revision year 7 to year 11
Maths revision year 7 to year 11
 
Maths project work - Arithmetic Sequences
Maths project work - Arithmetic SequencesMaths project work - Arithmetic Sequences
Maths project work - Arithmetic Sequences
 
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theoryBCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat Sheet
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematic
 

Similar to Approximation Algorithms Part Four: APTAS

mba10_ppt_0204 (1).ppt
mba10_ppt_0204 (1).pptmba10_ppt_0204 (1).ppt
mba10_ppt_0204 (1).ppt
elyse43
 
Dynamic programming (dp) in Algorithm
Dynamic programming (dp) in AlgorithmDynamic programming (dp) in Algorithm
Dynamic programming (dp) in Algorithm
RaihanIslamSonet
 
Master method
Master method Master method
Master method
Rajendran
 
Dividing integers
Dividing integersDividing integers
Dividing integers
bweldon
 
5617723.pptx
5617723.pptx5617723.pptx
5617723.pptx
MatthewMhlongo
 
10-Sequences and summation.pptx
10-Sequences and summation.pptx10-Sequences and summation.pptx
10-Sequences and summation.pptx
jaffarbikat
 
Daa chapter 3
Daa chapter 3Daa chapter 3
Daa chapter 3
B.Kirron Reddi
 
Section 4.1 And 4.2 Plus Warm Ups
Section 4.1 And 4.2 Plus Warm UpsSection 4.1 And 4.2 Plus Warm Ups
Section 4.1 And 4.2 Plus Warm Ups
Jessca Lundin
 
Open sentences.ppt
Open sentences.pptOpen sentences.ppt
Open sentences.pptaikes88
 
2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الثالث - تطبيقات التفاضل
 2022 ملزمة الرياضيات للصف السادس التطبيقي   الفصل الثالث - تطبيقات التفاضل 2022 ملزمة الرياضيات للصف السادس التطبيقي   الفصل الثالث - تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الثالث - تطبيقات التفاضل
anasKhalaf4
 
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث   تطبيقات التفاضل2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث   تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث تطبيقات التفاضل
anasKhalaf4
 
Open sentences
Open sentencesOpen sentences
Open sentencesRichChapin
 
1.6 Rational and Radical Equations
1.6 Rational and Radical Equations1.6 Rational and Radical Equations
1.6 Rational and Radical Equations
smiller5
 
Linear Programming- Leacture-16-lp1.pptx
Linear Programming- Leacture-16-lp1.pptxLinear Programming- Leacture-16-lp1.pptx
Linear Programming- Leacture-16-lp1.pptx
SarahKoech1
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
jyothimonc
 
1.6 Other Types of Equations
1.6 Other Types of Equations1.6 Other Types of Equations
1.6 Other Types of Equations
smiller5
 
1.4 Quadratic Equations
1.4 Quadratic Equations1.4 Quadratic Equations
1.4 Quadratic Equations
smiller5
 

Similar to Approximation Algorithms Part Four: APTAS (20)

mba10_ppt_0204 (1).ppt
mba10_ppt_0204 (1).pptmba10_ppt_0204 (1).ppt
mba10_ppt_0204 (1).ppt
 
Dynamic programming (dp) in Algorithm
Dynamic programming (dp) in AlgorithmDynamic programming (dp) in Algorithm
Dynamic programming (dp) in Algorithm
 
Master method
Master method Master method
Master method
 
Dividing integers
Dividing integersDividing integers
Dividing integers
 
Whiz Kid 4th Grade Math
Whiz Kid 4th Grade MathWhiz Kid 4th Grade Math
Whiz Kid 4th Grade Math
 
5617723.pptx
5617723.pptx5617723.pptx
5617723.pptx
 
10-Sequences and summation.pptx
10-Sequences and summation.pptx10-Sequences and summation.pptx
10-Sequences and summation.pptx
 
Daa chapter 3
Daa chapter 3Daa chapter 3
Daa chapter 3
 
Section 4.1 And 4.2 Plus Warm Ups
Section 4.1 And 4.2 Plus Warm UpsSection 4.1 And 4.2 Plus Warm Ups
Section 4.1 And 4.2 Plus Warm Ups
 
Open sentences.ppt
Open sentences.pptOpen sentences.ppt
Open sentences.ppt
 
2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الثالث - تطبيقات التفاضل
 2022 ملزمة الرياضيات للصف السادس التطبيقي   الفصل الثالث - تطبيقات التفاضل 2022 ملزمة الرياضيات للصف السادس التطبيقي   الفصل الثالث - تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الثالث - تطبيقات التفاضل
 
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث   تطبيقات التفاضل2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث   تطبيقات التفاضل
2022 ملزمة الرياضيات للصف السادس الاحيائي الفصل الثالث تطبيقات التفاضل
 
Open sentences
Open sentencesOpen sentences
Open sentences
 
1.6 Rational and Radical Equations
1.6 Rational and Radical Equations1.6 Rational and Radical Equations
1.6 Rational and Radical Equations
 
Integers
IntegersIntegers
Integers
 
Linear Programming- Leacture-16-lp1.pptx
Linear Programming- Leacture-16-lp1.pptxLinear Programming- Leacture-16-lp1.pptx
Linear Programming- Leacture-16-lp1.pptx
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
1.6 Other Types of Equations
1.6 Other Types of Equations1.6 Other Types of Equations
1.6 Other Types of Equations
 
1.4 Quadratic Equations
1.4 Quadratic Equations1.4 Quadratic Equations
1.4 Quadratic Equations
 
Msm1 fl ch01_03
Msm1 fl ch01_03Msm1 fl ch01_03
Msm1 fl ch01_03
 

More from Benjamin Sach

Approximation Algorithms Part Two: More Constant factor approximations
Approximation Algorithms Part Two: More Constant factor approximationsApproximation Algorithms Part Two: More Constant factor approximations
Approximation Algorithms Part Two: More Constant factor approximations
Benjamin Sach
 
Approximation Algorithms Part One: Constant factor approximations
Approximation Algorithms Part One: Constant factor approximationsApproximation Algorithms Part One: Constant factor approximations
Approximation Algorithms Part One: Constant factor approximations
Benjamin Sach
 
van Emde Boas trees
van Emde Boas treesvan Emde Boas trees
van Emde Boas trees
Benjamin Sach
 
Orthogonal Range Searching
Orthogonal Range SearchingOrthogonal Range Searching
Orthogonal Range Searching
Benjamin Sach
 
Pattern Matching Part Two: k-mismatches
Pattern Matching Part Two: k-mismatchesPattern Matching Part Two: k-mismatches
Pattern Matching Part Two: k-mismatches
Benjamin Sach
 
Pattern Matching Part Three: Hamming Distance
Pattern Matching Part Three: Hamming DistancePattern Matching Part Three: Hamming Distance
Pattern Matching Part Three: Hamming Distance
Benjamin Sach
 
Lowest Common Ancestor
Lowest Common AncestorLowest Common Ancestor
Lowest Common Ancestor
Benjamin Sach
 
Range Minimum Queries
Range Minimum QueriesRange Minimum Queries
Range Minimum Queries
Benjamin Sach
 
Pattern Matching Part Two: Suffix Arrays
Pattern Matching Part Two: Suffix ArraysPattern Matching Part Two: Suffix Arrays
Pattern Matching Part Two: Suffix Arrays
Benjamin Sach
 
Pattern Matching Part One: Suffix Trees
Pattern Matching Part One: Suffix TreesPattern Matching Part One: Suffix Trees
Pattern Matching Part One: Suffix Trees
Benjamin Sach
 
Hashing Part Two: Cuckoo Hashing
Hashing Part Two: Cuckoo HashingHashing Part Two: Cuckoo Hashing
Hashing Part Two: Cuckoo Hashing
Benjamin Sach
 
Hashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect HashingHashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect Hashing
Benjamin Sach
 
Hashing Part One
Hashing Part OneHashing Part One
Hashing Part One
Benjamin Sach
 
Probability Recap
Probability RecapProbability Recap
Probability Recap
Benjamin Sach
 
Bloom Filters
Bloom FiltersBloom Filters
Bloom Filters
Benjamin Sach
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
Benjamin Sach
 
Minimum Spanning Trees (via Disjoint Sets)
Minimum Spanning Trees (via Disjoint Sets)Minimum Spanning Trees (via Disjoint Sets)
Minimum Spanning Trees (via Disjoint Sets)
Benjamin Sach
 
Shortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
Shortest Paths Part 1: Priority Queues and Dijkstra's AlgorithmShortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
Shortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
Benjamin Sach
 
Depth First Search and Breadth First Search
Depth First Search and Breadth First SearchDepth First Search and Breadth First Search
Depth First Search and Breadth First Search
Benjamin Sach
 
Shortest Paths Part 2: Negative Weights and All-pairs
Shortest Paths Part 2: Negative Weights and All-pairsShortest Paths Part 2: Negative Weights and All-pairs
Shortest Paths Part 2: Negative Weights and All-pairs
Benjamin Sach
 

More from Benjamin Sach (20)

Approximation Algorithms Part Two: More Constant factor approximations
Approximation Algorithms Part Two: More Constant factor approximationsApproximation Algorithms Part Two: More Constant factor approximations
Approximation Algorithms Part Two: More Constant factor approximations
 
Approximation Algorithms Part One: Constant factor approximations
Approximation Algorithms Part One: Constant factor approximationsApproximation Algorithms Part One: Constant factor approximations
Approximation Algorithms Part One: Constant factor approximations
 
van Emde Boas trees
van Emde Boas treesvan Emde Boas trees
van Emde Boas trees
 
Orthogonal Range Searching
Orthogonal Range SearchingOrthogonal Range Searching
Orthogonal Range Searching
 
Pattern Matching Part Two: k-mismatches
Pattern Matching Part Two: k-mismatchesPattern Matching Part Two: k-mismatches
Pattern Matching Part Two: k-mismatches
 
Pattern Matching Part Three: Hamming Distance
Pattern Matching Part Three: Hamming DistancePattern Matching Part Three: Hamming Distance
Pattern Matching Part Three: Hamming Distance
 
Lowest Common Ancestor
Lowest Common AncestorLowest Common Ancestor
Lowest Common Ancestor
 
Range Minimum Queries
Range Minimum QueriesRange Minimum Queries
Range Minimum Queries
 
Pattern Matching Part Two: Suffix Arrays
Pattern Matching Part Two: Suffix ArraysPattern Matching Part Two: Suffix Arrays
Pattern Matching Part Two: Suffix Arrays
 
Pattern Matching Part One: Suffix Trees
Pattern Matching Part One: Suffix TreesPattern Matching Part One: Suffix Trees
Pattern Matching Part One: Suffix Trees
 
Hashing Part Two: Cuckoo Hashing
Hashing Part Two: Cuckoo HashingHashing Part Two: Cuckoo Hashing
Hashing Part Two: Cuckoo Hashing
 
Hashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect HashingHashing Part Two: Static Perfect Hashing
Hashing Part Two: Static Perfect Hashing
 
Hashing Part One
Hashing Part OneHashing Part One
Hashing Part One
 
Probability Recap
Probability RecapProbability Recap
Probability Recap
 
Bloom Filters
Bloom FiltersBloom Filters
Bloom Filters
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Minimum Spanning Trees (via Disjoint Sets)
Minimum Spanning Trees (via Disjoint Sets)Minimum Spanning Trees (via Disjoint Sets)
Minimum Spanning Trees (via Disjoint Sets)
 
Shortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
Shortest Paths Part 1: Priority Queues and Dijkstra's AlgorithmShortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
Shortest Paths Part 1: Priority Queues and Dijkstra's Algorithm
 
Depth First Search and Breadth First Search
Depth First Search and Breadth First SearchDepth First Search and Breadth First Search
Depth First Search and Breadth First Search
 
Shortest Paths Part 2: Negative Weights and All-pairs
Shortest Paths Part 2: Negative Weights and All-pairsShortest Paths Part 2: Negative Weights and All-pairs
Shortest Paths Part 2: Negative Weights and All-pairs
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
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)
  • 4. The SUBSETSUM problem 4 4 7 322 t = 12
  • 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
  • 11. The PARTITION problem 4 4 7 322 The PARTITION problem is a special case of SUBSETSUM
  • 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
  • 25. PARTITION and BINPACKING Key Idea Solve the PARTITION problem by approximating BINPACKING
  • 26. PARTITION and BINPACKING Key Idea Solve the PARTITION problem by approximating BINPACKING 4 4 7 322 t = 11
  • 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