Download presentation
Presentation is loading. Please wait.
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
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.