The Subset Sum Game Revisited

Slides:



Advertisements
Similar presentations
Combinatorial Auction
Advertisements

On allocations that maximize fairness Uriel Feige Microsoft Research and Weizmann Institute.
Lecture 7 Paradigm #5 Greedy Algorithms
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
The Communication Complexity of Approximate Set Packing and Covering
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Greedy Algorithms Basic idea Connection to dynamic programming Proof Techniques.
PTAS for Bin-Packing. Special Cases of Bin Packing 1. All item sizes smaller than Claim 1: Proof: If then So assume Therefore:
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Polynomial time approximation scheme Lecture 17: Mar 13.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Dynamic Programming 0-1 Knapsack These notes are taken from the notes by Dr. Steve Goddard at
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
1 Approximation Through Scaling Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Approximation Algorithms: The Subset-sum Problem
Chapter 15 Approximation Algorithm Introduction Basic Definition Difference Bounds Relative Performance Bounds Polynomial approximation Schemes Fully Polynomial.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
Vasilis Syrgkanis Cornell University
The bin packing problem. For n objects with sizes s 1, …, s n where 0 < s i ≤1, find the smallest number of bins with capacity one, such that n objects.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
Network Formation Games. NFGs model distinct ways in which selfish agents might create and evaluate networks We’ll see two models: Global Connection Game.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
The Theory of NP-Completeness
The NP class. NP-completeness
More NP-Complete and NP-hard Problems
8.3.2 Constant Distance Approximations
8.2 – Strong NP Completeness
NP-Completeness NP-Completeness Graphs 5/7/ :49 PM x x x x x x x
Probabilistic Algorithms
Algorithm Design Methods
Hard Problems Introduction to NP
Approximation algorithms
Approximation Algorithms
Computability and Complexity
NP-Completeness NP-Completeness Graphs 11/16/2018 2:32 AM x x x x x x
Analysis and design of algorithm
k-center Clustering under Perturbation Resilience
Alternating tree Automata and Parity games
NP-Completeness NP-Completeness Graphs 12/3/2018 2:46 AM x x x x x x x
Exam 2 LZW not on syllabus. 73% / 75%.
A new and improved algorithm for online bin packing
PTAS for Bin-Packing.
Advanced Algorithms Analysis and Design
Polynomial time approximation scheme
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
Greedy Algorithms Alexandra Stefan.
Algorithm Design Methods
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Lecture 21 More Approximation Algorithms
P, NP and NP-Complete Problems
Algorithm Design Methods
The Theory of NP-Completeness
Theorem 8.19 If algorithm A has absolute approximation ratio RA , then the shifting algorithm has absolute approximation (KRA+1)/(K+1) Proof. If N is.
P, NP and NP-Complete Problems
15th Scandinavian Workshop on Algorithm Theory
More NP-Complete Problems
The Complexity of Approximation
Instructor: Aaron Roth
Algorithm Design Methods
Presentation transcript:

The Subset Sum Game Revisited Astrid Pieterse1 and Gerhard J. Woeginger2 1 Eindhoven University of Technology 2 RWTH Aachen

The Subset Sum Game Alice Items 𝑎 1 ,…, 𝑎 𝑛 Bob Items 𝑏 1 ,…, 𝑏 𝑚 Each player has a private set of items Players take turns Alice Pass 6 6 11 Bob 4 4 7 4 7 Pass Knapsack 2244

Motivation Players compete over a resource Processing time Bandwidth …

Player strategies Players know Other player’s goal Items We will be Alice Goal: Maximize our weight (Selfish)

  Strategies for Bob Strategies for Bob Selfish Hostile Greedy Play the largest item that fits Result A Result B  Alice 6 Alice 7 Bob 4 Bob 6  Alice 6 Alice At some point in the game, Bob has two options. One leads to final outcome A, the other to final outcome B….. 7 Bob 4 Bob 6

Hostile – Selfish Alice plays selfish Does it matter if Bob is selfish or hostile? Alice Pass 6 6 11 Bob Pass 4 4 7 4 7 Knapsack 2244 To formally prove that the games are different,.. Result: Alice: 11, Bob: 11 Previously: Alice: 12, Bob: 12

Previous work Introduced by Darmann, Nicosia, Pferschy & Schauer Greedy strategy [Darmann et al.] Gives at least 1/2 the maximum weight Greedy with lookahead Optimal strategy against selfish Bob may pack smaller items before larger items [Darmann et al.] But not against greedy Packs items in non-increasing order

Our results SSG against hostile/selfish 𝑃𝑆𝑃𝐴𝐶𝐸 complete No 𝛼-approximation unless 𝑃=𝑁𝑃 SSG against greedy Solvable in pseudo polynomial time Has a PTAS Has no FPTAS unless 𝑃=𝑁𝑃 End at 7 min

PTAS against greedy player

Definition: PTAS Polynomial time approximation scheme Trade-off: running time - approximation factor Algorithm that for given 𝜀>0 Finds strategy for Alice with value at least 1−𝜀 ∗𝑂𝑃𝑇 Runs in polynomial time in 𝑛 for 𝜀 constant 𝑂( 𝑛 1/𝜀 ) allowed

PTAS against greedy Idea Pack in non-increasing order Try all possibilities to pack the first few items Large items are important Pack smaller items greedily Choose the best strategy

PTAS For each 𝑆⊆ Alice-items with 𝑆 ≤1/𝜀 Choose items of 𝑆 large to small Continue greedily If impossible to pack 𝑆 Discard Pick the best strategy S Alice Bob Knapsack 24

Approximation factor 𝑆 ∗ : optimal strategy 𝑆 ∗ , weight 𝛼 ∗ Non-increasing order 𝑆′ : First 1/𝜀 items of 𝑆 ∗ Continue greedily PTAS considered 𝑆′ Finds a strategy of weight at least 𝛼′ Show 𝛼′≥ 1−𝜀 ⋅ 𝛼 ∗ 𝑆 ∗ , weight 𝛼 ∗ 𝑆′, weight 𝛼′ First 1/𝜀 items Remaining items

Approximation factor Weight of the first 1/𝜀 items Equal Weight of the remaining items Remaining items are small: a i ≤𝜀⋅ 𝛼 ∗ Else, first 1/𝜀 items have weight at least 𝛼 ∗ 𝑺 ∗ Alice 𝑺′ Alice Large items Small items

Approximation factor Difference: mistake by greedy when packing small items Size of largest item ≤𝜀 𝛼 ∗ Thus 𝛼 ′ ≥ 1−𝜀 𝛼 ∗ Lemma Difference between greedy and selfish strategy is bounded by the size of the largest item of Alice (when playing against greedy Bob)

Running time Try all size 1/𝜀 subsets 𝑂 𝑛 1/𝜀 Continue greedily 𝑂 𝑛 1/𝜀 Continue greedily 𝑂( 𝑛 2 ) Polynomial in 𝑛 for 𝜀 constant Note: not an FPTAS Theorem The subset sum game against a greedy adversary has a PTAS

No FPTAS PTAS with running time polynomial in 𝑛 1/𝜀 Theorem FPTAS gives polynomial-time algorithm for PARTITION Theorem The subset sum game against a greedy adversary has no FPTAS, unless P = NP End at 17 min

Inapproximability against the selfish player Start at 17 min

Inapproximability Theorem Reduction from Partition (NP-hard) Input: Items 𝑋=𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 with ∑ 𝑥 𝑖 =2U Question: Does there exist 𝑆⊂𝑋 with sum U? Partition 𝑋 into 2 sets with equal sum Theorem A constant-factor approximation for the weight of Alice against selfish, implies 𝑃=𝑁𝑃. Definition

Proof strategy Given instance for Partition Construct an instance for the Subset Sum game If yes-instance for Partition Alice can pack at most 𝑛 If no-instance for Partition Alice can pack more than 𝑛/𝛼 Run 𝛼-approximation algorithm for Subset Sum game Weight less than 𝑛, return yes Weight more than 𝑛, return no

Reduction Given 𝑥 1 ,…, 𝑥 𝑛 for partition, with sum 2𝑈 Give to Alice 𝑀 items of weight 1 Let the capacity be 𝑐=𝑀∗𝑈+𝑛 Give to Bob An item of weight 𝑀∗ 𝑥 𝑖 for each 𝑖∈[𝑛] Note: The real hardness is in computing Bobs startegy, not in deciding what Alice should do (there is nothing to decide) Alice 1 1 1 1 1 1 1 1 1 1 1 1 Bob 12 24 36 48 𝑥 1 =1, 𝑥 2 =2, 𝑥 3 =3, 𝑥 4 =4 Knapsack 2644 𝑅=3, 𝑛=4, 𝑈=5

Reduction Partition was a yes-instance Bob packs 𝑀⋅𝑈=c −𝑛 Alice can only pack weight 𝑛 Alice 1 1 1 1 1 1 1 1 1 1 1 1 Bob 12 24 36 48 𝑥 1 =1, 𝑥 2 =2, 𝑥 3 =3, 𝑥 4 =4 Knapsack 2644 𝑅=3, 𝑛=4, 𝑈=5

Reduction Partition was a yes-instance Bob packs 𝑀⋅𝑈=c −𝑛 Alice can only pack weight 𝑛 Partition was a no-instance Bob can pack at most 𝑀(𝑈−1) Alice can place at least weight 𝑀 Alice 1 1 1 1 1 1 1 1 1 1 1 1 Bob 12 36 36 36 𝑥 1 =1, 𝑥 2 = 𝑥 3 = 𝑥 4 =3 Knapsack 2644 𝑅=3, 𝑛=4, 𝑈=5

Reduction 𝛼-approximation for Subset Sum game ⇓ polynomial-time algorithm for Partition The same holds against a hostile player Theorem A constant-factor approximation for the weight of Alice against selfish, implies 𝑃=𝑁𝑃. End at 23 min

Pseudo-polynomial time algorithm Start at 23 min

Algorithm against greedy Use dynamic programming 𝑖,𝑗, 𝑊 𝐴 , 𝑊 𝐵 ≔ Maximum weight Alice can obtain It is Alice’s turn Weight of Alice is 𝑊 𝐴 , weight of Bob 𝑊 𝐵 Alice just packed 𝑖, Bob 𝑗 Take state with best-reachable 𝑊 𝐴 Theorem The game against greedy is solvable in time 𝑂( 𝑛 2 𝑚 2 𝑐 4 )

Reachability Check whether a state is reachable from another [𝑖,𝑗, 𝑊 𝐴 , 𝑊 𝐵 ] to [ 𝑖 ′ , 𝑗 ′ , 𝑊 𝐴 ′ , 𝑊 𝐵 ′ ] 𝑖<𝑖′ 𝑗<𝑗′ 𝑊 𝐴 ′ = 𝑊 𝐴 + 𝑎 𝑖′ 𝑊 𝐵 ′ = 𝑊 𝐵 + 𝑏 𝑗′ The items still fit 𝑏 𝑗′ was the largest available Bob-item Thus the Greedy choice End at 25 min

Conclusion SSG against hostile/selfish 𝑃𝑆𝑃𝐴𝐶𝐸 complete No 𝛼-approximation unless 𝑃=𝑁𝑃 SSG against greedy Solvable in pseudo polynomial time Has a PTAS Has no FPTAS unless 𝑃=𝑁𝑃 Conclude at 25 min