Documentation

CslibFrontier.Algorithms.WordRAM.Auction.Instance

Word-RAM auction problem instances and encodings #

Public input/output definitions and word-width fit lemmas for Bertsekas's Gauss–Seidel auction algorithms on the word RAM:

This module has no dependency on the Memory.Prog realization stack so clients can work with Instance and EpsInstance without elaborating the Word-RAM refinement machinery.

Main definitions #

Main results #

References #

Problem instance for exact minimum-cost integer assignment via Bertsekas's (n + 1)-scaled auction (scaledAuction, ε = 1).

  • n : ℕ

    Common number of persons and objects.

  • cost : Fin self.n × Fin self.n → ℤ

    Signed integer assignment cost Fin n × Fin n → ℤ.

Maximum entry magnitude max_{i, j} |cost (i, j)| (0 when n = 0).

Maximum within-row cost difference max_{i, j, k} (cost (i, k) - cost (i, j)) (0 when n = 0).

Every entry magnitude is bounded by inst.maxMag.

theorem Cslib.Algorithms.WordRAM.Auction.Instance.sub_le_rowSpread (inst : Instance) (i j k : Fin inst.n) :
inst.cost (i, k) - inst.cost (i, j) ≤ ↑inst.rowSpread

Every within-row cost difference is bounded by inst.rowSpread.

Row-major word encoding n :: matrixWords (1 + n * n words).

Word-value envelope covering input words, workspace addresses, (n + 1)-scaled shifted costs, prices, reduced costs, and accumulated total assignment cost (w = O(log n + log M)).

Optimal assignment list [obj_0, …, obj_{n - 1}] computed by scaledAuction (scaledAuctionPerm inst.cost; optimal by sum_scaledAuctionPerm_le).

Minimum assignment cost ∑ i, inst.cost (i, scaledAuctionPerm inst.cost i).

Minimum assignment cost encoded via Signed.encode.

Length of the encoded input list inst.encode.

Every word of inst.encode fits in w bits when Fits w inst.wordBound.

Problem instance for Bertsekas's Gauss–Seidel ε-auction on an n × n integer cost matrix.

  • n : ℕ

    Common number of persons and objects.

  • eps : ℕ

    Bidding increment ε (admitted when 0 < eps).

  • cost : Fin self.n × Fin self.n → ℤ

    Signed integer assignment cost Fin n × Fin n → ℤ.

@[reducible, inline]

Underlying n × n cost matrix instance.

@[reducible, inline]

Maximum entry magnitude max_{i, j} |cost (i, j)| (0 when n = 0).

@[reducible, inline]

Maximum within-row cost difference max_{i, j, k} (cost (i, k) - cost (i, j)) (0 when n = 0).

Row-major word encoding n :: eps :: matrixWords (2 + n * n words).

Word-value envelope covering input words, workspace addresses, shifted costs, reduced costs, and object prices (w = O(log n + log M + log ε)).

Person-indexed assignment list [obj_0, …, obj_{n - 1}] computed by auction inst.cost inst.eps (auctionPerm when 0 < inst.eps; n * eps-optimal by sum_auctionPerm_le).

Length of the encoded input list inst.encode.

Every word of inst.encode fits in w bits when Fits w inst.wordBound.