Top Banner
An Improved FPTAS for 0-1 Knapsack Ce Jin Tsinghua University
58

An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Sep 28, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

An Improved FPTAS for 0-1 Knapsack

Ce Jin

Tsinghua University

Page 2: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑛 items

Each item 𝑖 has weight 0 < 𝑀𝑖 ≀ 𝑊and profit 𝑝𝑖 > 0

Given:

• 𝑀 𝐌 ≔ σ𝑖∈𝐌𝑀𝑖 ≀ 𝑊• 𝑝 𝐌 ≔ σ𝑖∈𝐌 𝑝𝑖 is maximized

Find a subset of items 𝐌 ⊆ 𝑛 such that:

0-1 Knapsack Problem

Knapsack capacity 𝑊 > 0

Page 3: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑛 items

Each item 𝑖 has weight 0 < 𝑀𝑖 ≀ 𝑊and profit 𝑝𝑖 > 0

Given:

• 𝑀 𝐌 ≔ σ𝑖∈𝐌𝑀𝑖 ≀ 𝑊• 𝑝 𝐌 ≔ σ𝑖∈𝐌 𝑝𝑖 is maximized

Find a subset of items 𝐌 ⊆ 𝑛 such that:

A well-known NP-hard problem

0-1 Knapsack Problem

Knapsack capacity 𝑊 > 0

Page 4: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

FPTAS for 0-1 Knapsack

OPT = optimal total profit 𝑝(𝐌)

For 𝜀 > 0, find a subset 𝐌 ⊆ 𝑛 such that:

• 𝑀 𝐌 ≀ 𝑊

• 𝑝 𝐌 ≥OPT

1+

Solvable in poly 𝑛,1

time

Page 5: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Prior Work

• ේ𝑂(𝑛3/𝜀) (textbook algorithm)

• ේ𝑂(𝑛 + 𝜀−4) [Ibarra and Kim, 1975]

• ේ𝑂(𝑛 + 𝜀−3) [Kellerer and Pferschy, 2004]

• ේ𝑂(𝑛 + 𝜀−2.5) [Rhee, 2015]

• ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) [Chan, 2018]

FPTAS for 0-1 Knapsack:

Page 6: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Prior Work

• ේ𝑂(𝑛3/𝜀) (textbook algorithm)

• ේ𝑂(𝑛 + 𝜀−4) [Ibarra and Kim, 1975]

• ේ𝑂(𝑛 + 𝜀−3) [Kellerer and Pferschy, 2004]

• ේ𝑂(𝑛 + 𝜀−2.5) [Rhee, 2015]

• ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) [Chan, 2018]

•෩𝑶(𝒏 + 𝜺−𝟐.𝟐𝟓) (this work)

FPTAS for 0-1 Knapsack:

No 𝑂 𝑛 + 𝜀−1 2−𝛿 time algorithm,

unless 𝐊𝐢𝐧,+ convolution has truly subquadratic algo

[Cygan, Mucha, Węgrzycki, and Włodarczyk, 2017]

Conditional Lower Bound:

Page 7: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

A Special Case

FPTAS for Subset Sum (𝑝𝑖 = 𝑀𝑖):

• ේ𝑂 min 𝒏 + 𝜺−𝟐, 𝑛𝜀−1

[Kellerer, Mansini, Pferschy, and Speranza, 2003]

Page 8: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

A Special Case

FPTAS for Subset Sum (𝑝𝑖 = 𝑀𝑖):

• ේ𝑂 min 𝒏 + 𝜺−𝟐, 𝑛𝜀−1

[Kellerer, Mansini, Pferschy, and Speranza, 2003]

Our 0-1 Knapsack algorithm utilizes this result

Page 9: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Our ෩𝑶(𝒏 + 𝜺−𝟐.𝟐𝟓) algorithm builds on Chan’s ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) algorithm

•Two new ideas

1. Extending Chan’s number-theoretic technique from two levels to multiple levels.

Page 10: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Our ෩𝑶(𝒏 + 𝜺−𝟐.𝟐𝟓) algorithm builds on Chan’s ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) algorithm

•Two new ideas

1. Extending Chan’s number-theoretic technique from two levels to multiple levels.

2. A greedy argument ⇒ less computationspent on cheap items (small unit profit 𝑝𝑖/𝑀𝑖)

Page 11: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Our ෩𝑶(𝒏 + 𝜺−𝟐.𝟐𝟓) algorithm builds on Chan’s ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) algorithm

•Two new ideas

1. Extending Chan’s number-theoretic technique from two levels to multiple levels.

2. A greedy argument ⇒ less computationspent on cheap items (small unit profit 𝑝𝑖/𝑀𝑖)

This talk

Page 12: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Our ෩𝑶(𝒏 + 𝜺−𝟐.𝟐𝟓) algorithm builds on Chan’s ෩𝑶(𝒏 + 𝜺−𝟐.𝟒) algorithm

•Two new ideas

1. Extending Chan’s number-theoretic technique from two levels to multiple levels.

2. A greedy argument ⇒ less computationspent on cheap items (small unit profit 𝑝𝑖/𝑀𝑖)

This talkUsing Chan’s Lemmas

as blackboxes

෩𝑶(𝒏 + 𝜺−𝟐.𝟑𝟑𝟑) algo

Preliminaries (based

on [Chan, 2018])

Page 13: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

•Assume 𝑛 ≀ poly 𝜀−1 .

•Too cheap items (𝑝𝑖 < 𝑛max𝑗

𝑝𝑗) are

discarded at the beginning (loss ≀ 𝜀 ⋅ OPT)

So max 𝑝𝑗

min 𝑝𝑗≀ poly 𝜀−1

𝑛 items, capacity = 𝑊weight 0 < 𝑀𝑖 ≀ 𝑊 and profit 𝑝𝑖 > 0

Page 14: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊

• “Profit function” (defined over real 𝑥 ≥ 0)𝑓𝐌 𝑥 = max 𝑝 𝐜 : 𝐜 ⊆ 𝐌, 𝑀 𝐜 ≀ 𝑥

Page 15: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊

• “Profit function” (defined over real 𝑥 ≥ 0)𝑓𝐌 𝑥 = max 𝑝 𝐜 : 𝐜 ⊆ 𝐌, 𝑀 𝐜 ≀ 𝑥

•Task: compute a 1 + 𝜀 -approximation of profit function 𝑓𝐌,

෩𝑓𝐌 𝑥 ≀ 𝑓𝐌 𝑥 ≀ 1 + 𝜀 ෩𝑓𝐌 𝑥 , ∀𝑥 ≥ 0

Page 16: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊

• “Profit function” (defined over real 𝑥 ≥ 0)𝑓𝐌 𝑥 = max 𝑝 𝐜 : 𝐜 ⊆ 𝐌, 𝑀 𝐜 ≀ 𝑥

•Task: compute a 1 + 𝜀 -approximation of profit function 𝑓𝐌,

෩𝑓𝐌 𝑥 ≀ 𝑓𝐌 𝑥 ≀ 1 + 𝜀 ෩𝑓𝐌 𝑥 , ∀𝑥 ≥ 0

•For disjoint sets 𝐌, 𝐜 of items,

𝑓𝐌∪𝐜 𝑥 = 𝑓𝐌 ⊕𝑓𝐜 𝑥 ≔ max0≀𝑊≀𝑥

𝑓𝐌 𝑊 + 𝑓𝐜 𝑥 − 𝑊

Page 17: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊

• “Profit function” (defined over real 𝑥 ≥ 0)𝑓𝐌 𝑥 = max 𝑝 𝐜 : 𝐜 ⊆ 𝐌, 𝑀 𝐜 ≀ 𝑥

•Task: compute a 1 + 𝜀 -approximation of profit function 𝑓𝐌,

෩𝑓𝐌 𝑥 ≀ 𝑓𝐌 𝑥 ≀ 1 + 𝜀 ෩𝑓𝐌 𝑥 , ∀𝑥 ≥ 0

•For disjoint sets 𝐌, 𝐜 of items,

𝑓𝐌∪𝐜 𝑥 = 𝑓𝐌 ⊕𝑓𝐜 𝑥 ≔ max0≀𝑊≀𝑥

𝑓𝐌 𝑊 + 𝑓𝐜 𝑥 − 𝑊

• ෩𝑓𝐌 ⊕ ෩𝑓𝐜 is a 1 + 𝜀 -approximation of 𝑓𝐌∪𝐜

Page 18: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

•A nondecreasing step function 𝑓 has a (1 + 𝜀)-approx. with only ේ𝑂 1/𝜀 steps (by rounding down to powers of (1 + 𝜀))

Page 19: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Preliminaries

•A nondecreasing step function 𝑓 has a (1 + 𝜀)-approx. with only ේ𝑂 1/𝜀 steps (by rounding down to powers of (1 + 𝜀))

•“Merging Lemma”: Computing (a 1 + 𝜀 -approx. of) 𝑓1 ⊕⋯⊕𝑓𝑚 takes ේ𝑂 𝑚/𝜀2

time.

(log𝑚 depth binary tree. 𝜀′ ≔ 𝜀/ log𝑚)

𝑓 ⊕ 𝑔 ≔ max0≀𝑊≀𝑥

𝑓 𝑊 + 𝑔 𝑥 − 𝑊

Page 20: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Divide items into 𝑂 log 1/𝜀 groups

(group 𝑘: 𝑝𝑖 ∈ [2𝑘 , 2𝑘+1])

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊Merging 𝑓1 ⊕⋯⊕𝑓𝑚: ේ𝑂 𝑚/𝜀2 time.

Page 21: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Divide items into 𝑂 log 1/𝜀 groups

(group 𝑘: 𝑝𝑖 ∈ [2𝑘 , 2𝑘+1])

•Compute all 𝑓𝑘 and merge them in ේ𝑂(1/𝜀2) time

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊Merging 𝑓1 ⊕⋯⊕𝑓𝑚: ේ𝑂 𝑚/𝜀2 time.

Page 22: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Divide items into 𝑂 log 1/𝜀 groups

(group 𝑘: 𝑝𝑖 ∈ [2𝑘 , 2𝑘+1])

•Compute all 𝑓𝑘 and merge them in ේ𝑂(1/𝜀2) time

•Now assume 𝑝𝑖 ∈ [1,2]

Preliminaries

𝑛 ≀ poly 𝜀−1 items

profit max 𝑝𝑗/min 𝑝𝑗 ≀ poly 𝜀−1

weight 0 < 𝑀𝑖 ≀ 𝑊Merging 𝑓1 ⊕⋯⊕𝑓𝑚: ේ𝑂 𝑚/𝜀2 time.

Page 23: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Simple greedy (sort by unit profit 𝑝1

𝑀1≥

𝑝2

𝑀2≥ ⋯)

approximates with additive error 𝑑 ≀ max 𝑝𝑖 =𝑂(1)

profit 𝑝𝑖 ∈ 1,2weight 0 < 𝑀𝑖 ≀ 𝑊

Preliminaries

Page 24: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Simple greedy (sort by unit profit 𝑝1

𝑀1≥

𝑝2

𝑀2≥ ⋯)

approximates with additive error 𝑑 ≀ max 𝑝𝑖 =𝑂(1)

•For 𝑓 𝑀 ≥ Ω(𝜀−1), this is 1 + 𝑂(𝜀)multiplicative approx.

profit 𝑝𝑖 ∈ 1,2weight 0 < 𝑀𝑖 ≀ 𝑊

Preliminaries

Page 25: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Simple greedy (sort by unit profit 𝑝1

𝑀1≥

𝑝2

𝑀2≥ ⋯)

approximates with additive error 𝑑 ≀ max 𝑝𝑖 =𝑂(1)

•For 𝑓 𝑀 ≥ Ω(𝜀−1), this is 1 + 𝑂(𝜀)multiplicative approx.

•Only need to 1 + 𝑂(𝜀) approximate 𝐊𝐢𝐧 𝑩, 𝒇𝑰 for 𝑩 = 𝑶 𝜺−𝟏 !

profit 𝑝𝑖 ∈ 1,2weight 0 < 𝑀𝑖 ≀ 𝑊

Preliminaries

Page 26: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Round 𝑝𝑖 down to 1,1 + 𝜀, 1 + 2𝜀, 
 , 2 − 𝜀

1 + 𝜀 multiplicative error

•Only 𝑚 = 𝑂(1/𝜀) different 𝑝𝑖 ’s!

Preliminaries

𝑝𝑖 ∈ 1,2

Page 27: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

•Round 𝑝𝑖 down to 1,1 + 𝜀, 1 + 2𝜀, 
 , 2 − 𝜀

1 + 𝜀 multiplicative error

•Only 𝑚 = 𝑂(1/𝜀) different 𝑝𝑖 ’s!

•Collect all items with the same profit 𝒑. Then 𝑓𝑝 can be computed by simple greedy (sort 𝑀1 ≀ 𝑀2 ≀ ⋯)

Preliminaries

𝑝𝑖 ∈ 1,2

Page 28: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Recap

𝑝𝑖 ∈ 1,2

Profit functions 𝑓1, 
 , 𝑓𝑚 obtained by simple

greedy (one for every 𝑝𝑖) (𝑚 = 𝑂(1/𝜀) )

Task: 1 + 𝑂 𝜀 approximate

min 𝐵, 𝑓1 ⊕⋯⊕𝑓𝑚 (𝐵 = 𝑂(𝜀−1))

Lemma: Merging 𝑓1 ⊕⋯⊕𝑓𝑚 in ේ𝑂 𝑚/𝜀2 time.

(Immediately gives ේ𝑂(𝑛 + 𝜀−3) algo)

Page 29: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑛 items with 𝑚 = 𝑂(𝜀−1) distinct profit values 𝑝𝑖 ∈ 1,2Task: 1 + 𝑂 𝜀 approximate

min 𝐵, 𝑓1 ⊕⋯⊕𝑓𝑚(𝐵 = 𝑂(𝜀−1))

ේ𝑂 𝜀−1 𝐵𝑚 algo(faster when 𝑩 small)

ේ𝑂(𝜀−4/3𝑛 + 𝜀−2) algo(faster when 𝒏 small)

Chan’s results

Page 30: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

A Greedy Lemma

• the items can be divided into two groups 𝐻, 𝐿 with a large enough gap between their unit profits,

maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

• and group 𝐻 is large enough,

σℎ∈𝐻𝑀ℎ > 𝑊

𝑝𝑖 ∈ 1,2capacity = 𝑊

If

Then

• In an optimal solution, 𝐿-items contribute total profit ≀ 2/𝛌

Page 31: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊

• Suppose the optimal solution is𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

𝑊 −𝑊𝐿𝑊𝐿

𝐻 𝐿

Page 32: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊

•Remove all 𝐿-items, and insert more 𝐻-items (denoted by 𝐟) to fill in the 𝑊𝐿 space

𝑊 −𝑊𝐿𝑊𝐿

𝐻 𝐿

Page 33: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σ𝒉∈𝑯𝒘𝒉 > 𝑟

•Remove all 𝐿-items, and insert more 𝐻-items (denoted by 𝐟) to fill in the 𝑊𝐿 space

•Until 𝑊𝐿 −𝑊𝐟 < maxℎ∈𝐻 𝑀ℎ

𝐻 𝐿

Page 34: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿𝑊𝐿

𝑊𝐟

𝒑𝒊 ∈ 𝟏, 𝟐capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊

•Remove all 𝐿-items, and insert more 𝐻-items (denoted by 𝐟) to fill in the 𝑊𝐿 space

•Until 𝑊𝐿 −𝑊𝐟 < maxℎ∈𝐻 𝑀ℎ ≀ 𝟐/𝒒

𝐻 𝐿

Page 35: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿 𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊𝑊𝐿 −𝑊𝐟 < 2/𝑞

𝑊 −𝑊𝐿 𝑊𝐿

optimal sol:

𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

tot profit ≥ 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑞𝑊𝐟

Page 36: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿 𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊𝑊𝐿 −𝑊𝐟 < 2/𝑞

𝑊 −𝑊𝐿 𝑊𝐿

optimal sol:

𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

tot profit ≥ 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑞𝑊𝐟

𝒒𝑟𝑲 ≀ 𝒇𝑳 𝑟𝑳

Page 37: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿 𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊𝑟𝑳 −𝑟𝑲 < 𝟐/𝒒

𝑊 −𝑊𝐿 𝑊𝐿

optimal sol:

𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

tot profit ≥ 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑞𝑊𝐟

𝒒𝑟𝑲 ≀ 𝒇𝑳 𝑟𝑳

1 − 𝛌 ⋅ 𝑞 ⋅ 𝑊𝐿 ≥ 𝑓𝐿 𝑊𝐿

𝑓𝐿 𝑊𝐿 ≥ 𝑞𝑊𝐟

𝑞𝑊𝐟 > 𝑞𝑊𝐿 − 2↓

1 − 𝛌 ⋅ 𝑞𝑊𝐿 > 𝑞𝑊𝐿 − 2

𝛌𝑞𝑊𝐿 < 2

𝑓𝐿 𝑊𝐿 < 2/𝛌

Page 38: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿 𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊𝑟𝑳 −𝑟𝑲 < 𝟐/𝒒

𝑊 −𝑊𝐿 𝑊𝐿

optimal sol:

𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

tot profit ≥ 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑞𝑊𝐟

𝒒𝑟𝑲 ≀ 𝒇𝑳 𝑟𝑳

1 − 𝛌 ⋅ 𝑞 ⋅ 𝑊𝐿 ≥ 𝑓𝐿 𝑊𝐿

𝑓𝐿 𝑊𝐿 ≥ 𝑞𝑊𝐟

𝑞𝑊𝐟 > 𝑞𝑊𝐿 − 2↓

1 − 𝛌 ⋅ 𝑞𝑊𝐿 > 𝑞𝑊𝐿 − 2↓

𝛌𝑞𝑊𝐿 < 2

𝑓𝐿 𝑊𝐿 < 2/𝛌

Page 39: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

𝑊 −𝑊𝐿 𝑊𝐿

𝑊𝐟

𝑝𝑖 ∈ 1,2capacity = 𝑊maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅𝐊𝐢𝐧𝒉∈𝑯

𝒑𝒉/𝒘𝒉 = 1 − 𝛌 ⋅ 𝒒

σℎ∈𝐻𝑀ℎ > 𝑊𝑟𝑳 −𝑟𝑲 < 𝟐/𝒒

𝑊 −𝑊𝐿 𝑊𝐿

optimal sol:

𝑓𝐻∪𝐿 𝑊 = 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑓𝐿 𝑊𝐿

tot profit ≥ 𝑓𝐻 𝑊 −𝑊𝐿 + 𝑞𝑊𝐟

𝒒𝑟𝑲 ≀ 𝒇𝑳 𝑟𝑳

𝟏 − 𝜶 ⋅ 𝒒 ⋅ 𝑟𝑳 ≥ 𝒇𝑳 𝑟𝑳

𝑓𝐿 𝑊𝐿 ≥ 𝑞𝑊𝐟

𝑞𝑊𝐟 > 𝑞𝑊𝐿 − 2↓

1 − 𝛌 ⋅ 𝑞𝑊𝐿 > 𝑞𝑊𝐿 − 2↓

𝜶𝒒𝑟𝑳 < 𝟐↓

𝒇𝑳 𝑟𝑳 < 𝟐/𝜶

Page 40: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Recap

If: maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊Then: In optimal solution of 𝑓𝐻∪𝐿(𝑊), 𝐿-items

contribute total profit ≀ 2/𝛌

Task: 1 + 𝑂 𝜀 approximate min 𝐵, 𝑓𝐌 , 𝐵 = 𝑂(𝜀−1)

𝑚 = 𝑂(𝜀−1) distinct values

𝑝𝑖 ∈ 1,2

ේ𝑂 𝜀−1 𝐵𝑚 algo (Chan)

(faster when 𝑩 small)

ේ𝑂(𝜀−4/3𝑛 + 𝜀−2) algo (Chan)(faster when 𝒏 small)

Page 41: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

•Sort the items by 𝑝𝑖/𝑀𝑖, and divide into three groups

𝑝𝑖 ∈ 1,2

Page 42: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

•Sort the items by 𝑝𝑖/𝑀𝑖, and divide into three groups

𝐻: top

Θ 𝜀−1

items

𝑝𝑖 ∈ 1,2

Page 43: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

•Sort the items by 𝑝𝑖/𝑀𝑖, and divide into three groups

𝐻: top

Θ 𝜀−1

items

𝐿: (1 − 𝛌)multiplicative

gap

𝒒 (𝟏 − 𝜶)𝒒

𝑝𝑖 ∈ 1,2

Page 44: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

•Sort the items by 𝑝𝑖/𝑀𝑖, and divide into three groups

𝐻: top

Θ 𝜀−1

items

𝐿: (1 − 𝛌)multiplicative

gap

𝑞 (1 − 𝛌)𝑞

𝑀: items in

between

𝑝𝑖 ∈ 1,2

Page 45: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞𝐻 = Θ(𝜀−1)

𝐻 𝑀 𝐿

If: maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊Then: In optimal solution of 𝑓𝐻∪𝐿(𝑊), 𝐿-items

contribute total profit ≀ 2/𝛌

Task: 1 + 𝑂 𝜀 approximate min 𝑂(𝜀−1), 𝑓𝐌

𝑝𝑖 ∈ 1,2

Page 46: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

If: maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊Then: In optimal solution of 𝑓𝐻∪𝐿(𝑊), 𝐿-items

contribute total profit ≀ 2/𝛌

Improved Algorithm

𝑞 (1 − 𝛌)𝑞𝐻 = Θ(𝜀−1)

𝐻 𝑀 𝐿

𝑝𝑖 ∈ 1,2

Task: 1 + 𝑂 𝜀 approximate min 𝑂(𝜀−1), 𝑓𝐌

Page 47: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞𝑯 = 𝚯(𝜺−𝟏)

𝐻 𝑀 𝐿

(If 𝒇𝑰 𝑟 < 𝑶(𝜺−𝟏) then 𝑟 < 𝒘(𝑯))

Task: 1 + 𝑂 𝜀 approximate 𝐊𝐢𝐧 𝑶(𝜺−𝟏), 𝒇𝑰

If: maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊Then: In optimal solution of 𝑓𝐻∪𝐿(𝑊), 𝐿-items

contribute total profit ≀ 2/𝛌𝒑𝒊 ∈ 𝟏, 𝟐

Page 48: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞𝐻 = Θ(𝜀−1)

𝐻 𝑀 𝐿

Task: 1 + 𝑂 𝜀 approximate min 𝑂(𝜀−1), 𝑓𝐌

If: maxℓ∈𝐿

𝑝ℓ/𝑀ℓ ≀ 1 − 𝛌 ⋅minℎ∈𝐻

𝑝ℎ/𝑀ℎ

σℎ∈𝐻𝑀ℎ > 𝑊Then: In optimal solution of 𝑓𝐻∪𝐿(𝑊), 𝐿-items

contribute total profit ≀ 2/𝛌𝑝𝑖 ∈ 1,2

𝐊𝐢𝐧{𝒇𝑳 , 𝟐/𝜶}

Page 49: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞𝐻 = Θ(𝜀−1)

𝐻 𝑀 𝑳

min{𝑓𝐿 , 2/𝛌}

ේ𝑂 𝜀−1 𝐵𝑚 algo (Chan)

(faster when 𝑩 small)ේ𝑂(𝜀−4/3𝑛 + 𝜀−2) algo (Chan)

(faster when 𝒏 small)

Let 𝜶 = 𝜺𝟐/𝟑෩𝑶(𝜺−𝟕/𝟑)

෩𝑶(𝜺−𝟕/𝟑)

𝒏 ≔ 𝑯 ≈ 𝟏/𝜺 𝑩 ≔ 𝟐/𝜶

𝑚 ≔ 𝑂 𝜀−1

Page 50: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Page 51: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Only log1+1

1−𝛌≈ 𝛌/𝜀 = 𝜺−𝟏/𝟑

distinct values of 𝑝𝑖/𝑀𝑖

Page 52: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Only log1+1

1−𝛌≈ 𝛌/𝜀 = 𝜺−𝟏/𝟑

distinct values of 𝑝𝑖/𝑀𝑖

Items with the same 𝑝𝑖/𝑀𝑖

(profit ∝ weight ): a Subset

Sum instance

ේ𝑂(𝑛 + 𝜀−2) time [KMPS03]

Page 53: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Only log1+1

1−𝛌≈ 𝛌/𝜀 = 𝜺−𝟏/𝟑

distinct values of 𝑝𝑖/𝑀𝑖

Items with the same 𝑝𝑖/𝑀𝑖

(profit ∝ weight ): a Subset

Sum instance

ේ𝑂(𝑛 + 𝜀−2) time [KMPS03]

Merge 𝜺−𝟏/𝟑 groups

Page 54: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Only log1+1

1−𝛌≈ 𝛌/𝜀 = 𝜺−𝟏/𝟑

distinct values of 𝑝𝑖/𝑀𝑖

Items with the same 𝑝𝑖/𝑀𝑖

(profit ∝ weight ): a Subset

Sum instance

ේ𝑂(𝑛 + 𝜀−2) time [KMPS03]

𝑛 + 𝜺−𝟏/𝟑 ⋅ 𝜀−2

Merge 𝜺−𝟏/𝟑 groups

Page 55: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Improved Algorithm

𝑞 (1 − 𝛌)𝑞

𝐻 𝑀 𝑳

Let 𝜶 = 𝜺𝟐/𝟑

ේ𝑂 𝜀−7/3 -time ේ𝑂(𝜀−7/3)-time

Group 𝑀: Round 𝑝𝑖/𝑀𝑖

down to powers of (1 + 𝜀)

Only log1+1

1−𝛌≈ 𝛌/𝜀 = 𝜺−𝟏/𝟑

distinct values of 𝑝𝑖/𝑀𝑖

Items with the same 𝑝𝑖/𝑀𝑖

(profit ∝ weight ): a Subset

Sum instance

ේ𝑂(𝑛 + 𝜀−2) time [KMPS03]

𝑛 + 𝜺−𝟏/𝟑 ⋅ 𝜀−2

Merge 𝜺−𝟏/𝟑 groups

Total time:෩𝑶 𝒏 + 𝜺−𝟕/𝟑

Page 56: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Further improvement

ේ𝑂 𝜀−1 𝐵𝑚 (Chan)

(faster when 𝑩 small)

ේ𝑂(𝜀−4/3𝑛 + 𝜀−2) (Chan)(faster when 𝒏 small)

ේ𝑂(𝜀−3/2𝑛3/4 + 𝑛 + 𝜀−2)(faster when 𝒏 small)

ේ𝑂 𝜀−4/3𝐵1/3𝑚2/3(𝑚2 ≫ 𝜀−2/𝐵)

(faster when 𝑩 small)

ේ𝑂(𝑛 + 𝜀−9/4)

Greedy argument (this talk)

extending Chan’s

techniques from two levels

to multiple levels

Page 57: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Open problem

Unbounded Knapsack (each item has infinitely

many copies) which easily reduces to 0-1

Knapsack:

ේ𝑂(𝑛 + 𝜀−2) [Jansen and Kraft, 2015]

Improve 0-1 Knapsack to ේ𝑂(𝑛 + 𝜀−2) time?

ේ𝑂 min 𝒏 + 𝜺−𝟐, 𝑛𝜀−1

[Kellerer, Mansini, Pferschy, and Speranza, 2003]

Subset Sum:

Page 58: An Improved FPTAS for 0-1 Knapsack · FPTAS for 0-1 Knapsack OPT = optimal total profit ( ) For 𝜀>0, find a subset ⊆ such that: • Q𝑊 • RT 1+ Solvable in poly ,1 time

Thank you!