Equality networks, tight sets, balanced flows, and rational equilibria in linear Fisher markets #
This module formalizes the combinatorial network-flow infrastructure of the Devanur–Papadimitriou– Saberi–Vazirani (DPSV) algorithm for linear Fisher markets ([Vaz07], Chapter 5):
- Equality subgraph and money-flow network
N(p)([Vaz07], Section 5.3, pp. 108–109):IsEqualityEdge,FlowVertex,equalityNetwork(instantiatingCslib.Algorithms.Lean.MaxFlow.RealFlowwith a finite non-binding big-Mcapacity on equality arcs), and Lemma 5.2 (exists_isEquilibrium_iff_minCut,isEquilibrium_of_isMaxRealFlow). - Tight sets and the Invariant ([Vaz07], Section 5.6, p. 111; Section 5.8, p. 115):
buyerNeighborhood,goodValue,budgetSum,SatisfiesInvariant,IsTightSet, Lemma 5.3 (satisfiesInvariant_iff), submodular closure of tight sets under union and intersection (isTightSet_union_and_inter), and the unique maximal tight setmaximalTightSet. - Balanced flows ([Vaz07], Section 5.7, pp. 111–113):
surplus,surplusSqNorm,IsBalancedFlow, existence (exists_isBalancedFlow), max-flow property (IsBalancedFlow.isMaxEqualityFlow), Lemma 5.4 (surplus_eq_of_isBalancedFlow: uniqueness of the balanced surplus vector), and Theorem 5.5 (isBalancedFlow_iff_satisfiesPropertyOne: characterization via Property 1 in the residual graphR(f) - {s, t}). - Divide-and-conquer balanced-flow algorithm ([Vaz07], Section 5.7.1, pp. 113–115):
MaxFlowQuery,IsValidMaxFlowOracle,canonicalMaxFlowOracle,balancedFlowPrograminCslib.FreeM(computing each piece's uniform buyer-capacity shift explicitly as the maximum sorted-prefix average), and Lemmas 5.6–5.7 / Theorem 5.8 (balancedFlowProgram_spec: outputs a balanced max-flow in at mostFintype.card Gmax-flow oracle calls via batched level execution). - Finding tight sets ([Vaz07], Section 5.9, pp. 117–118):
scaledSubnetwork,minTightRatio,tightSetAtMinRatio, Lemma 5.9 (minCut_scaledSubnetwork_of_le_minTightRatio,not_minCut_and_subset_of_minTightRatio_lt), Lemma 5.10 (ssubset_of_minCut_at_avgRatio), and Lemma 5.11 (findTightSetProgram,findTightSetProgram_spec: finds(x*, S*)in at mostA.cardmax-flow oracle calls). - Rationality and polynomial bit-length bounds ([Vaz07], Section 5.10, Lemma 5.12,
pp. 118–119; Section 5.2, Theorem 5.1 part 4, pp. 107–108): Lemma 5.12
(
exists_rat_price_of_isTightSet: prices in any tight setSare rational with denominator at mostS.card * U ^ (S.card - 1) ≤ n * U ^ n) and Theorem 5.1 part 4 (exists_rational_equilibrium_of_natfor integer inputs andexists_rational_equilibrium_of_ratfor general rational inputs: existence of rational equilibrium prices and allocations with explicit polynomial-bit numerator and denominator bounds).
The full DPSV phase loop, potential drop analysis, and polynomial max-flow termination theorem
([Vaz07], Sections 5.8 and 5.10, Theorem 5.22) are formalized in
CslibFrontier.GameTheory.Market.DPSVAlgorithm.
References #
Bipartite flow-network vertices and generic RealFlow bridge #
Vertices of the bipartite money-flow network N(p) ([Vaz07], Section 5.3.1, p. 108):
source source, goods good g, buyers buyer i, and sink sink.
- source {I : Type u_1} {G : Type u_2} : FlowVertex I G
- good {I : Type u_1} {G : Type u_2} (g : G) : FlowVertex I G
- buyer {I : Type u_1} {G : Type u_2} (i : I) : FlowVertex I G
- sink {I : Type u_1} {G : Type u_2} : FlowVertex I G
Instances For
Extract the bipartite money flow g i ↦ F (.good g, .buyer i) from a RealFlow F.
Section 5.3: Equality subgraph, network N(p), and Lemma 5.2 #
An equality edge between buyer i and good g at prices p ([Vaz07],
Section 5.3, p. 108): good g maximizes buyer i's bang-per-buck M.bangPerBuck p i g = M.utility i g / p g.
Under hbuyer : ∃ g, 0 < M.utility i g and positive prices hp, every equality edge incident
to buyer i has strictly positive marginal utility.
The bipartite money-flow network N(p) ([Vaz07], Section 5.3.1, p. 108), with
capacity p g * M.supply g on (.source, .good g), capacity M.budget i on (.buyer i, .sink),
and a non-binding finite capacity ∑ g, p g * M.supply g + ∑ i, M.budget i + 1 on equality arcs
(.good g, .buyer i). For unitSupply (M.supply g = 1), source arcs have capacity p g.
Feasible bipartite money flow f : G → I → ℝ in N(p): nonnegative, supported on equality
edges, sending at most p g * M.supply g out of each good g, and sending at most M.budget i
into each buyer i.
A bipartite equality flow f is a maximum equality flow in N(p) if it is feasible and
maximizes flowValue over all feasible equality flows.
Lemma 5.2 (allocation recovery) ([Vaz07], Section 5.3.1, p. 109): if both cuts
({.source}, A ∪ B ∪ {.sink}) and ({.source} ∪ A ∪ B, {.sink}) are min-cuts in N(p) at
positive prices p, then the allocation moneyFlowToAlloc (ofRealFlow F) p induced by any
maximum flow F in N(p) is a market equilibrium allocation.
Lemma 5.2 (equilibrium price test) ([Vaz07], Section 5.3.1, p. 109): positive prices
p are equilibrium prices of a linear Fisher market (where every buyer desires some good and every
good is desired by some buyer) if and only if both ({.source}, A ∪ B ∪ {.sink}) and
({.source} ∪ A ∪ B, {.sink}) are minimum s–t cuts in N(p).
Section 5.6: Tight sets, the Invariant, Lemma 5.3, and the maximal tight set #
Equality-subgraph neighborhood Γ(S) of a set of goods S ⊆ G: buyers having an equality edge
to at least one good in S ([Vaz07], Section 5.6, p. 111).
Total money value ∑ g ∈ S, p g * M.supply g of the goods in S (∑ g ∈ S, p g for unit
supply; [Vaz07], Section 5.6, p. 111).
Total money budget ∑ i ∈ T, M.budget i of buyers in T ([Vaz07], Section 5.6,
p. 111).
A subset of goods S is a tight set at prices p if its total value equals the total
budget of its equality-subgraph neighborhood Γ(S) ([Vaz07], Section 5.6, p. 111).
The Invariant ([Vaz07], Section 5.6, p. 111): prices p satisfy the Invariant when
the source cut ({.source}, A ∪ B ∪ {.sink}) is a minimum s–t cut in N(p).
Lemma 5.3 ([Vaz07], Section 5.6, p. 111): for nonnegative prices p, N(p)
satisfies the Invariant if and only if M.goodValue p S ≤ M.budgetSum (M.buyerNeighborhood p S)
for every subset S of goods.
Under the Invariant, tight sets are closed under union and intersection ([Vaz07], Section 5.8, p. 115).
The union of all tight sets at prices p ([Vaz07], Section 5.8, p. 115). Under
SatisfiesInvariant M p, this is the unique maximal tight set.
Under the Invariant (M.SatisfiesInvariant p) at nonnegative prices p, every maximum
equality flow f in N(p) saturates every good (∑ i, f g i = p g * M.supply g).
Section 5.7: Balanced flows, Lemma 5.4, and Theorem 5.5 #
Buyer i's surplus money M.budget i - ∑ g, f g i under a bipartite money flow f
([Vaz07], Section 5.7, pp. 111–112).
Squared ℓ₂ norm ∑ i, (M.surplus f i) ^ 2 of the surplus vector ([Vaz07],
Section 5.5, p. 110; Section 5.7, p. 112). Minimizing surplusSqNorm is equivalent to minimizing
the ℓ₂ norm √(surplusSqNorm).
A balanced flow in N(p) ([Vaz07], Section 5.7, p. 112): a feasible equality money
flow minimizing surplusSqNorm M f (equivalently, the ℓ₂ norm of the surplus vector) over all
feasible equality flows.
Minimizing surplusSqNorm is equivalent to minimizing the Euclidean ℓ₂ norm
Real.sqrt (surplusSqNorm).
Existence of a balanced flow: for nonnegative prices p, N(p) always admits a balanced
flow (compactness of the feasible polytope and continuity of surplusSqNorm).
Lemma 5.4 ([Vaz07], Section 5.7, p. 112): all balanced flows in N(p) have the exact
same buyer surplus vector. Note that [Vaz07], p. 112 prints "strictly concave" for the
strictly convex objective surplusSqNorm.
Residual reachability in R(f) - {s, t} ([Vaz07], Section 5.7, p. 112): buyer i
is reachable from buyer j along alternating backward flow edges (b, g) (f g b > 0) and
forward equality edges (g, b') (M.IsEqualityEdge p b' g).
Property 1 of balanced flows ([Vaz07], Section 5.7, p. 112): whenever buyer j has
strictly smaller surplus than buyer i, there is no path from j to i in R(f) - {s, t}.
Every balanced flow in N(p) is a maximum flow in N(p) ([Vaz07], Section 5.7,
p. 112).
Theorem 5.5 ([Vaz07], Section 5.7, pp. 112–113): a maximum equality money flow f in
N(p) is balanced if and only if it satisfies Property 1 (M.SatisfiesPropertyOne p f).
Section 5.7.1: Divide-and-conquer balanced-flow algorithm (Theorem 5.8) #
Oracle query signature for single maximum-flow computations on bipartite networks over
FlowVertex I G. Used with Cslib.FreeM to count exact max-flow oracle calls in
Theorem 5.8 ([Vaz07], Section 5.7.1, p. 115) and Lemma 5.11 ([Vaz07],
Section 5.9, p. 118).
- maxFlow {I G : Type u} (W : FlowVertex I G → FlowVertex I G → ℝ) : MaxFlowQuery I G (FlowVertex I G × FlowVertex I G → ℝ)
Validity predicate for a MaxFlowQuery oracle: on every nonnegative capacity matrix W,
oracle (.maxFlow W) returns a feasible maximum source–sink flow.
Canonical valid MaxFlowQuery oracle backed by exists_isMaxRealFlow.
Divide-and-conquer balanced-flow program ([Vaz07], Section 5.7.1, pp. 113–115):
runs balancedFlowLoop for at most Fintype.card G max-flow oracle queries on N(p), computing
each active piece's uniform buyer-capacity shift explicitly from its sorted buyer capacities.
Theorem 5.8 (together with Lemmas 5.6 and 5.7) ([Vaz07], Section 5.7.1,
pp. 113–115): when N(p) satisfies the Invariant (M.SatisfiesInvariant p) at nonnegative prices
p, the divide-and-conquer program M.balancedFlowProgram p evaluated with any valid max-flow
oracle outputs a balanced maximum flow in N(p) while making at most Fintype.card G max-flow
oracle calls.
Section 5.9: Finding tight sets (Lemmas 5.9–5.11) #
Scaled bipartite equality subnetwork N(x · p) restricted to active goods A and their
equality neighborhood M.buyerNeighborhood p A ([Vaz07], Section 5.9, pp. 117–118). When
0 < x, A = Finset.univ, and M.buyerNeighborhood p Finset.univ = Finset.univ, this coincides
with M.equalityNetwork (x • p).
Minimum ratio x* = min_{∅ ≠ S ⊆ A} m(Γ(S)) / p(S) at which a nonempty subset of A goes
tight under uniform price scaling ([Vaz07], Section 5.9, p. 117).
Unique maximal subset S* ⊆ A going tight at scale x* = M.minTightRatio p A hA
([Vaz07], Section 5.9, p. 117).
Lemma 5.9 (part 1) ([Vaz07], Section 5.9, p. 117): if 0 ≤ x ≤ x*, then the source
cut ({.source}, A ∪ Γ(A) ∪ {.sink}) is a minimum s–t cut in N(x · p).
Lemma 5.9 (part 2) ([Vaz07], Section 5.9, pp. 117–118): if x > x*, then
({.source}, A ∪ Γ(A) ∪ {.sink}) is not a minimum s–t cut in N(x · p), and for every
minimum s–t cut X in N(x · p), the maximal tight set S* is contained in the goods on the
source side of X (S* ⊆ A.filter (fun g => .good g ∈ X)).
Lemma 5.10 ([Vaz07], Section 5.9, p. 118): at x = m(Γ(A)) / p(A) > x*, for any
minimum s–t cut X in N(x · p), the source-side goods A₁ = A.filter (fun g => .good g ∈ X)
form a proper subset of A (A₁ ⊂ A).
Tight-set search program ([Vaz07], Section 5.9, Lemma 5.11, p. 118): finds the
minimum tight ratio x* and maximal tight set S* on (A, Γ(A)) using at most A.card max-flow
oracle calls.
Lemma 5.11 ([Vaz07], Section 5.9, p. 118): for any nonempty A : Finset G with
positive good values ∀ g ∈ A, 0 < p g * M.supply g and any valid max-flow oracle oracle,
M.findTightSetProgram p A computes (M.minTightRatio p A hA, M.tightSetAtMinRatio p A hA) using
at most A.card (hence at most Fintype.card G) max-flow oracle calls.
Section 5.10 (Lemma 5.12) & Section 5.2 (Theorem 5.1 part 4): Rationality #
Lemma 5.12 ([Vaz07], Section 5.10, pp. 118–119): in a unit-supply linear Fisher
market with integer utilities u i g ≤ U and integer budgets e i, at any positive price vector
p satisfying the Invariant, every good g in a tight set S has a rational price q : ℚ with
denominator at most S.card * U ^ (S.card - 1) (hence at most
Fintype.card G * U ^ Fintype.card G, matching Δ = n U ^ n in [Vaz07], p. 118).
Theorem 5.1, part 4 (integer inputs) ([Vaz07], Section 5.2, p. 107; Section 5.10,
Lemma 5.12, pp. 118–119): every non-degenerate unit-supply linear Fisher market with integer
utilities u i g ≤ U and integer budgets e i (total budget E = ∑ i, e i) admits a rational
equilibrium (xQ, pQ) with explicit polynomial-bit bounds:
(pQ g).den ≤ n * U ^ nand(pQ g).num.natAbs ≤ E * U ^ n,(xQ i g).den ≤ E * U ^ nand(xQ i g).num.natAbs ≤ E * U ^ n, wheren = Fintype.card G.
Theorem 5.1, part 4 (general rational inputs) ([Vaz07], Section 5.2, pp. 107–108;
Section 5.10, Lemma 5.12, pp. 118–119): every non-degenerate unit-supply linear Fisher market with
rational utilities uQ i g and rational budgets eQ i whose numerators are bounded by B_num and
denominators by B_den admits a rational equilibrium (xQ, pQ) whose numerators and denominators
satisfy explicit polynomial-bit bounds in m = Fintype.card I, n = Fintype.card G, B_num, and
B_den.