Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Subset Sum Game Revisited

Similar presentations


Presentation on theme: "The Subset Sum Game Revisited"β€” Presentation transcript:

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

2 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

3 Motivation Players compete over a resource Processing time Bandwidth …

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

5   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

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

7 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

8 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

9 PTAS against greedy player

10 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

11 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

12 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

13 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

14 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

15 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)

16 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

17 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

18 Inapproximability against the selfish player
Start at 17 min

19 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

20 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

21 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

22 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

23 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

24 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

25 Pseudo-polynomial time algorithm
Start at 23 min

26 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 )

27 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

28 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


Download ppt "The Subset Sum Game Revisited"

Similar presentations


Ads by Google