The Auction Algorithm

The Auction Algorithm
Shahar Paz
Assignment Problem
β€’ Given:
– 𝑛 Persons, 𝑛 Objects
– 𝐴(𝑖) – Objects that may be assigned with person 𝑖
– π‘Žπ‘–π‘— – Benefit of assigning object 𝑗 with person 𝑖
β€’ Target:
– Assign each person 𝑖 with unique object 𝑗𝑖 ∈ 𝐴(𝑖)
– Maximize total benefit 𝑛𝑖=1 π‘Žπ‘–π‘—π‘–
Assignment Problem
4
2
1
1
1
-2
3
2
Assignment Problem
4
2
Assignment benefit:
2+1–2+3=4
1
1
1
-2
3
2
Assignment vs. Min-Cost-Flow
β€’ Special case of Min-Cost-Flow
β€’ Nodes:
– Persons have 𝑏(𝑖) = 1 (1 supply unit)
– Objects have 𝑏(𝑗) = βˆ’1 (1 demand unit)
β€’ Arcs:
– (𝑖, 𝑗) 𝑗 ∈ 𝐴(𝑖)
– 𝑒(𝑖, 𝑗) = 1
– 𝑐 𝑖, 𝑗 = βˆ’π‘Žπ‘–π‘—
(1 capacity unit)
(cost is -benefit)
Assignment vs. Min-Cost-Flow
β€’ Min-Cost-Flow can turn into Assignment
– Arcs => new nodes
b(i) i
c=0
c(i,j)
u(i,j)
b(j) j
i b(i)-u(i,j)
b=u(i,j) ij
c=c(i,j)
j b(j)
Assignment vs. Min-Cost-Flow
β€’ Min-Cost-Flow can turn into Assignment
– Arcs => new nodes
– New nodes split by supply (old arc capacity)
c=0
i b(i)-u(i,k)
b=u(i,j) ij
b=1 ij1
i b(i)-u(i,k)
b=1 ij2
c=c(i,j)
j b(j)-u(j,k)
b=1 ij3
j b(j)-u(j,k)
Assignment vs. Min-Cost-Flow
β€’ Min-Cost-Flow can turn into Assignment
– Arcs => new nodes
– New nodes split by supply (old arc capacity)
– Old nodes split by demand
b=1 ij1
i b(i)-u(i,k)
b=1 ij2
b=1 ij3
j b(j)-u(j,k)
b=1 ij1
i1 b=-1
b=1 ij2
i2 b=-1
b=1 ij3
j b(j)-u(j,k)
Assignment vs. Min-Cost-Flow
β€’ Min-Cost-Flow can turn into Assignment
– Arcs => new nodes
– New nodes split by supply (old arc capacity)
– Old nodes split by demand
– #new nodes
β€’
𝑖,𝑗 𝑒(𝑖, 𝑗)
– #old nodes
β€’
𝑖(
𝑗𝑒
𝑖, 𝑗 βˆ’ 𝑏 𝑖 ) =
= 𝑖,𝑗 𝑒 𝑖, 𝑗
𝑖,𝑗 𝑒
𝑖, 𝑗 βˆ’
𝑖 𝑏(𝑖)
Auction Algorithm
β€’ Init
– Empty assignment 𝑆, zero prices 𝑝𝑗
β€’ Iterate until 𝑆 = 𝑛:
– Bidding phase
β€’ Some unassigned persons bid for most desired objects
β€’ Bids must be greater then current objects’ prices
– Assignment phase
β€’ Prices of objects increased to max bid
β€’ Assignment 𝑆 change accordingly
Auction Algorithm
β€’ Bidding phase:
– Select subset 𝐼 of unassigned persons
– For each person 𝑖 ∈ 𝐼:
β€’ 𝑗𝑖 = arg max {π‘Žπ‘–π‘— βˆ’π‘π‘— }
(most desired object)
π‘—βˆˆπ΄(𝑖)
β€’ 𝑣𝑖 = max {π‘Žπ‘–π‘— βˆ’π‘π‘— } = π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖
π‘—βˆˆπ΄(𝑖)
β€’ 𝑀𝑖 =
max {π‘Žπ‘–π‘— βˆ’π‘π‘— }
𝑗𝑖 β‰ π‘—βˆˆπ΄(𝑖)
(object’s benefit)
(second-desired benefit)
β€’ Set bid of person 𝑖 for object 𝑗𝑖 :
β€’ 𝑏𝑖𝑗𝑖 = 𝑝𝑗𝑖 + 𝑣𝑖 βˆ’ 𝑀𝑖 + πœ– = π‘Žπ‘–π‘—π‘– βˆ’ 𝑀𝑖 + πœ–
Auction Termination
β€’ Observations
– Objects receiving bids get assigned
– Assigned objects remain assigned
– Assigned persons might get unassigned
– Only on termination no unassigned persons and
objects
Auction Termination
β€’ Observation
– Each time object 𝑗 receives a bid,
𝑝𝑗 increase by at least πœ–.
β€’ Conclusion
– Object receives ∞ bids ⇔ get price ∞
β€’ Proof
– 𝑣𝑖 β‰₯ 𝑀𝑖
– 𝑝𝑗′ = 𝑝𝑗 + 𝑣𝑖 βˆ’ 𝑀𝑖 + πœ– β‰₯ 𝑝𝑗 + πœ–
Auction Termination
β€’ Observation
– If person 𝑖 bid ∞ times,
all objects in 𝐴 𝑖 get price ∞
β€’ Proof
– 𝐴∞
𝑗 π‘Ÿπ‘’π‘π‘’π‘–π‘£π‘’ ∞ 𝑏𝑖𝑑𝑠 }
𝑖 = 𝑗 ∈𝐴 𝑖
– As of some iteration:
β€’ Person 𝑖 only bid for objects in 𝐴∞
𝑖
β€’ All objects in 𝐴∞
𝑖 has price ∞
– But 𝑗 ∈ 𝐴 𝑖 βˆ’ 𝐴∞
𝑖 has higher benefit (const)
Auction Termination
β€’ Proposition:
– Feasible solution ⟺ Auction algorithm terminates
β€’ Proof: ⟹
𝐼 ∞ = 𝑖 ∈ 𝐼 𝑖 𝑏𝑖𝑑 ∞ π‘‘π‘–π‘šπ‘’π‘  }
𝐽∞ = 𝑗 ∈ 𝐽 𝑗 𝑔𝑒𝑑 ∞ 𝑏𝑖𝑑𝑠 }
– As of some iteration:
– All objects in 𝐽∞ are assigned
β€’ Must be assigned with persons from 𝐼 ∞ (price ∞)
– Only persons from 𝐼∞ bid
β€’ Not all persons in 𝐼 ∞ are assigned
– 𝐼∞ > 𝐽∞ , but 𝐴 𝐼∞ βŠ† 𝐽∞
Duality & CS
β€’ Dual problem:
– Minimize
𝑖
max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 +
π‘—βˆˆπ΄ 𝑖
– Over all price vectors 𝑝𝑗
𝑗 𝑝𝑗
𝑛
𝑗=1
β€’ Complementary Slackness:
– Given assignment
𝑗𝑖 𝑛𝑖=1
and prices 𝑝𝑗
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 = max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗
π‘—βˆˆπ΄ 𝑖
𝑛
𝑗=1
Duality & CS
β€’ Observation:
– Any Primal ο€ ο‚£ Any Dual
β€’ Proof:
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 ≀ max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗
π‘—βˆˆπ΄ 𝑖
–
𝑖
–
𝑖 π‘Žπ‘–π‘—π‘–
βˆ’
𝑗 𝑝𝑗
–
𝑖 π‘Žπ‘–π‘—π‘–
≀
𝑖
π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 ≀
≀
𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 }
π‘—βˆˆπ΄ 𝑖
𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 }
π‘—βˆˆπ΄ 𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 } +
π‘—βˆˆπ΄ 𝑖
𝑗 𝑝𝑗
Duality & CS
β€’ Observation:
– Any Primal ο€ ο‚£ Any Dual
β€’ Conclusion:
– Primal ο‚£ Optimal Primal ο‚£ Optimal Dual ο‚£ Dual
– Primal = Dual οƒž optimal Primal & Dual
– Primal = Dual οƒž CS
Duality & CS
β€’ Observation:
– CS οƒž Primal = Dual
β€’ Proof:
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 = max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗
π‘—βˆˆπ΄ 𝑖
–
𝑖
–
𝑖 π‘Žπ‘–π‘—π‘–
βˆ’
𝑗 𝑝𝑗
–
𝑖 π‘Žπ‘–π‘—π‘–
=
𝑖
π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 =
=
𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 }
π‘—βˆˆπ΄ 𝑖
𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 }
π‘—βˆˆπ΄ 𝑖
max { π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 } +
π‘—βˆˆπ΄ 𝑖
𝑗 𝑝𝑗
Auction Optimality
β€’ ο₯-CS:
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 β‰₯ max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 βˆ’ πœ–
π‘—βˆˆπ΄ 𝑖
β€’ Observation:
– Auction preserves ο₯-CS
β€’ Proof:
– 𝑝𝑗′𝑖 = π‘Žπ‘–π‘—π‘– βˆ’ 𝑀𝑖 + πœ–
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗′𝑖 = 𝑀𝑖 βˆ’ πœ– =
β‰₯
max
𝑗𝑖 β‰ π‘—βˆˆπ΄ 𝑖
max
𝑗𝑖 β‰ π‘—βˆˆπ΄ 𝑖
π‘Žπ‘–π‘— βˆ’ 𝑝𝑗′ βˆ’ πœ–
π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 βˆ’ πœ–
Auction Optimality
β€’ Proposition:
– Auction algorithm is π‘›πœ–-optimal
β€’ Proof:
– π‘Žπ‘–π‘—π‘– βˆ’ 𝑝𝑗𝑖 β‰₯ max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 βˆ’ πœ–
π‘—βˆˆπ΄ 𝑖
–
𝑖 π‘Žπ‘–π‘—π‘–
βˆ’
𝑖 𝑝𝑗𝑖
β‰₯
–
𝑖 π‘Žπ‘–π‘—π‘–
+ π‘›πœ– β‰₯
𝑖
𝑖
max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 βˆ’
π‘—βˆˆπ΄ 𝑖
max π‘Žπ‘–π‘— βˆ’ 𝑝𝑗 +
π‘—βˆˆπ΄ 𝑖
π‘–πœ–
𝑗 𝑝𝑗
– π‘ƒπ‘Ÿπ‘–π‘šπ‘Žπ‘™ + π‘›πœ– β‰₯ π·π‘’π‘Žπ‘™ β‰₯ π‘‚π‘π‘‘π‘–π‘šπ‘Žπ‘™ β‰₯ π‘ƒπ‘Ÿπ‘–π‘šπ‘Žπ‘™
ο₯-Scaling
β€’ Choosing ο₯
1
𝑛
– If data is integer, πœ– < guarantees optimality
– Small ο₯ causes small changes, bad performance
β€’ ο₯-Scaling
– Run Auction with large πœ– 0 and prices 𝑝𝑗0 = 0
β€’ Compute πœ– 0 -CS prices 𝑝𝑗′0
– Run Auction with
πœ–π‘˜
=
πœ–π‘˜βˆ’1
πœƒ
β€’ Compute πœ– π‘˜ -CS prices π‘π‘—β€²π‘˜
and prices π‘π‘—π‘˜ = π‘π‘—β€²π‘˜βˆ’1
ο₯-Scaling
β€’ Adjustments for ο₯-Scaling:
– On each iteration only 1 person bid
– First scaling phase starts with initial prices 0
– Other scaling phases start with previous prices
– On scaling phase π‘˜, use
π‘˜
π‘Žπ‘–π‘—
=
π‘Žπ‘–π‘—
πœ–π‘˜
πœ– π‘˜ as benefits
π‘˜
β€’ So π‘Žπ‘–π‘—
is integer multiple of πœ– π‘˜
– Final prices of scaling phase k satisfy
π‘˜
π‘˜+1
πœ– π‘˜ -CS with π‘Žπ‘–π‘—
, and π‘Ÿπœ– π‘˜+1 -CS with π‘Žπ‘–π‘—
.
ο₯-Scaling
β€’ Candidate-list of person 𝑖:
– Holds pairs 𝑗 ∈ 𝐴 𝑖 , 𝑝𝑗′ of potential next-bids
β€’ Modified bidding phase:
– search π‘π‘Žπ‘›π‘‘ 𝑖 for 2 pairs with 𝑝𝑗′ = 𝑝𝑗
– If not found:
β€’ Recalculate π‘π‘Žπ‘›π‘‘ 𝑖 and bid normally
– Else:
β€’ Remove all encountered pairs except second match
β€’ Select first match 𝑗 and set bid of 𝑝𝑗 + πœ–
ο₯-Scaling Complexity
β€’ Candidate-list complexity:
– Calculation of π‘π‘Žπ‘›π‘‘ 𝑖 takes 𝑂 𝐴 𝑖
β€’ But only happen when 𝑣𝑖 decrease
– Using π‘π‘Žπ‘›π‘‘ 𝑖 takes 𝑂 𝐴 𝑖
until recalculation
β€’ Auction complexity
– 𝑖 𝑂 𝐴 𝑖 βˆ— #𝑣𝑖 π‘‘π‘’π‘π‘Ÿπ‘’π‘Žπ‘ π‘’π‘ 
– Each decrease of 𝑣𝑖 is of at least πœ–
–
𝑖𝑂
𝐴 𝑖
βˆ—
βˆ†π‘£π‘–
πœ–
ο₯-Scaling Complexity
β€’ Proposition:
– Running Auction with prices satisfying π‘Ÿπœ–-CS
gives Δ𝑣𝑖 = 𝑂 π‘Ÿπ‘›πœ–
β€’ Proof:
– 𝑝0 – initial prices, 𝑆 0 – corresponding assignment
– 𝑆, 𝑝 – partial assignment & prices,
generated by Auction algorithm
just before last bid of some person 𝑖1
ο₯-Scaling Complexity
β€’ Proof cont:
– Find path (𝑖1 , 𝑗1 , … , π‘–π‘š , π‘—π‘š )
β€’ π‘–π‘˜ , π‘—π‘˜ ∈ 𝑆 0 , π‘–π‘˜+1 , π‘—π‘˜ ∈ 𝑆
β€’ 𝑖1 , π‘—π‘š unassigned under 𝑆
– Observe:
β€’ π‘Žπ‘–1 𝑗1 βˆ’ 𝑝𝑗01 + π‘Ÿπœ– β‰₯ max π‘Žπ‘–1 𝑗 βˆ’ 𝑝𝑗0 = 𝑣𝑖01
π‘—βˆˆπ΄ 𝑖1
β€’ π‘Žπ‘–π‘˜ π‘—π‘˜ βˆ’ 𝑝𝑗0π‘˜ β‰₯ π‘Žπ‘–π‘˜π‘—π‘˜βˆ’1 βˆ’ 𝑝𝑗0π‘˜βˆ’1 βˆ’ π‘Ÿπœ–
βˆ€π‘˜ = 2 … π‘š
β€’
π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ 𝑝𝑗0π‘˜ β‰₯ π‘Žπ‘–π‘˜π‘—π‘˜βˆ’1 βˆ’ 𝑝𝑗0π‘˜βˆ’1 + 𝑣𝑖01 βˆ’ π‘šπ‘Ÿπœ–
β€’
π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ 𝑝𝑗0π‘š β‰₯ π‘Žπ‘–π‘˜ π‘—π‘˜βˆ’1 + 𝑣𝑖01 βˆ’ π‘šπ‘Ÿπœ–
ο₯-Scaling Complexity
β€’ Proof cont:
– Find path (𝑖1 , 𝑗1 , … , π‘–π‘š , π‘—π‘š )
β€’ π‘–π‘˜ , π‘—π‘˜ ∈ 𝑆 0 , π‘–π‘˜+1 , π‘—π‘˜ ∈ 𝑆
β€’ 𝑖1 , π‘—π‘š unassigned under 𝑆
– Observe:
β€’ 𝑣𝑖1 = max π‘Žπ‘–1𝑗 βˆ’ 𝑝𝑗 β‰₯ π‘Žπ‘–1 𝑗1 βˆ’ 𝑝𝑗1
π‘—βˆˆπ΄ 𝑖1
β€’ π‘Žπ‘–π‘˜ π‘—π‘˜βˆ’1 βˆ’ π‘π‘—π‘˜βˆ’1 β‰₯ π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ π‘π‘—π‘˜ βˆ’ πœ–
βˆ€π‘˜ = 2 … π‘š
β€’
π‘Žπ‘–π‘˜π‘—π‘˜βˆ’1 βˆ’ π‘π‘—π‘˜βˆ’1 + 𝑣𝑖1 β‰₯ π‘Žπ‘–π‘˜ π‘—π‘˜ βˆ’ π‘π‘—π‘˜ βˆ’ π‘šπœ–
β€’
π‘Žπ‘–π‘˜π‘—π‘˜βˆ’1 + 𝑣𝑖1 β‰₯ π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ π‘π‘—π‘š βˆ’ π‘šπœ–
ο₯-Scaling Complexity
β€’ Proof cont:
– We got:
β€’
π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ 𝑝𝑗0π‘š β‰₯ π‘Žπ‘–π‘˜ π‘—π‘˜βˆ’1 + 𝑣𝑖01 βˆ’ π‘šπ‘Ÿπœ–
β€’
π‘Žπ‘–π‘˜π‘—π‘˜βˆ’1 + 𝑣𝑖1 β‰₯ π‘Žπ‘–π‘˜π‘—π‘˜ βˆ’ π‘π‘—π‘š βˆ’ π‘šπœ–
– Summing:
β€’ 𝑣𝑖01 βˆ’ 𝑣𝑖1 ≀ π‘π‘—π‘š βˆ’ 𝑝𝑗0π‘š + π‘Ÿ + 1 π‘šπœ–
– π‘—π‘š isn’t assigned under 𝑆
β€’ π‘—π‘š didn’t receive any bid, has initial price π‘π‘—π‘š = 𝑝𝑗0π‘š
– 𝑣𝑖01 βˆ’ 𝑣𝑖1 = 𝑂 π‘Ÿπ‘›πœ–
ο₯-Scaling Complexity
β€’ What is r?
β€’ πœ– π‘˜ -CS:
π‘˜
π‘˜
π‘˜
– π‘Žπ‘–π‘—
βˆ’
𝑝
β‰₯
max
π‘Ž
βˆ’
𝑝
βˆ’
πœ–
𝑗
𝑗
𝑖𝑗
𝑖
𝑖
π‘˜
– 𝛿 = π‘Žπ‘–π‘—
βˆ’
π‘—βˆˆπ΄ 𝑖
π‘˜+1
π‘Žπ‘–π‘—
π‘˜
π‘˜+1
β€’ 𝛿 ≀ π‘Žπ‘–π‘—
βˆ’ π‘Žπ‘–π‘— βˆ’ π‘Žπ‘–π‘—
βˆ’ π‘Žπ‘–π‘— ≀ πœ– π‘˜ + πœ– π‘˜+1 = (πœƒ
ο₯-Scaling Complexity
β€’ Conclusion:
– Scaling phase Complexity:
β€’
𝑖𝑂 𝐴 𝑖
βˆ—
βˆ†π‘£π‘–
πœ–
=
𝑖𝑂
𝐴 𝑖
– Number of phases:
β€’ πœ– 0 ,πœ– – first & last values
β€’ 𝑂(log πœ– 0 /πœ– )
β€’ Total ο₯-Scaling Complexity:
– 𝑂(𝑛𝐴 log πœ– 0 /πœ– )
βˆ— 𝑂 𝑛 = 𝑂 𝑛𝐴
Infeasibility
β€’ Auction never terminates for infeasible input
– One cannot tell if the algorithm won’t terminate,
or just haven’t yet
β€’ Ways to detect infeasibility:
– Adding arcs with highly negative benefit
β€’ βˆ’ 2𝑛 βˆ’ 1 𝐢
– Checking 𝑣𝑖 against lower bound
β€’ βˆ’ 2𝑛 βˆ’ 1 𝐢 βˆ’ 𝑛 βˆ’ 1 πœ– βˆ’ max{𝑝𝑗0 }
𝑗
– Checking for augmenting path
Questions?
Thank you