Lexicographic integer Lemke–Howson algorithm for arbitrary bimatrix games #
This module implements the standalone Lemke–Howson complementary pivoting algorithm using exact
integer tableaux (IntegerTableau) and lexicographic perturbation ([vS07], Sections
3.5–3.6, eqs. (3.8)–(3.19), Exercise 3.10).
For a bimatrix game (A, B) with integer payoffs satisfying condition (3.5) of [vS07]
(nonnegative matrices with no zero column in A or Bᵀ), the best-response polytopes (P, Q) in
slack equality form (3.8) are Bᵀ x + s = 1 (lexLHMatP B) and r + A y = 1 (lexLHMatQ A),
with variables indexed by Fin m ⊕ Fin n. A basis pair (S_P, S_Q) is completely labelled when
Disjoint S_P S_Q (so every label in Fin m ⊕ Fin n is nonbasic in at least one tableau), and
k-almost completely labelled when S_P ∩ S_Q ⊆ {k}.
By exact involution of lexicographic pivoting (IntegerTableau.IsValid.lexPivot_involutive) and
boundedness of (P, Q) under (3.5), the lexicographic Lemke–Howson graph lexGraph A B k on
k-almost completely labelled lexicographically feasible basis pairs has degree 1 at completely
labelled nodes and degree 2 at all other nodes. This gives:
- Odd parity for arbitrary (possibly degenerate) bimatrix games: there is an odd number of
non-origin lexicographically completely labelled basis pairs
(
odd_ncard_lexCompletelyLabeled_ne_origin). - Standalone executable algorithm with guaranteed termination: starting from the artificial
origin basis
(inr, inl)and dropping any initial labelk : Fin m ⊕ Fin n,lexLHRun A B kwalks the unique non-backtracking path oflexGraph A B kwithout revisiting any node, terminates in at mostNat.choose (m + n) n * Nat.choose (m + n) m + 1pivots, and outputs an exact rational Nash equilibrium (lexLHRun_isNash). - Arbitrary integer and rational games:
lexLHOfIntshifts arbitrary integer payoffs positive, andlexLHOfRatclears denominators of arbitrary rational payoff matrices and shifts positive, computing an exact rational Nash equilibrium for every finite rational bimatrix game (lexLHOfInt_isNash,lexLHOfRat_isNash).
Main definitions #
Cslib.GameTheory.BimatrixGame.lexLHMatP,lexLHMatQ: equality-form matrices (3.8).Cslib.GameTheory.BimatrixGame.IsLexFeasibleBasisP,IsLexFeasibleBasisQ,LexBasisAdjP,LexBasisAdjQ,LexNode,lexGraph: lexicographic Lemke–Howson graph.Cslib.GameTheory.BimatrixGame.lexLHTableaux,lexLHRun,lexLHOfInt,lexLHOfRat: executable exact-integer lexicographic Lemke–Howson solvers.
Main results #
Cslib.GameTheory.BimatrixGame.even_ncard_lexCompletelyLabeled,odd_ncard_lexCompletelyLabeled_ne_origin: parity of lexicographically completely labelled basis pairs for arbitrary (possibly degenerate) bimatrix games under (3.5).Cslib.GameTheory.BimatrixGame.lexLHTableaux_spec: guaranteed termination at a non-origin completely labelled tableau pair for any missing labelk.Cslib.GameTheory.BimatrixGame.lexLHRun_isNash,lexLHOfInt_isNash,lexLHOfRat_isNash: soundness and termination producing an exact rational Nash equilibrium.
References #
- C. E. Lemke and J. T. Howson, Jr., Equilibrium points of bimatrix games
- B. von Stengel, Equilibrium Computation for Two-Player Games in Strategic and Extensive Form, Sections 3.4–3.6 (pp. 61–66) and Exercise 3.10 (p. 78)
Standard equality-form matrices (3.8) and boundedness under (3.5) #
Under condition (3.5) for Bᵀ (B ≥ 0 and every row of B has a positive entry),
the homogeneous cone {z ≥ 0 | [Bᵀ | I] z = 0} is trivial.
Under condition (3.5) for A (A ≥ 0 and every column of A has a positive entry),
the homogeneous cone {z ≥ 0 | [I | A] z = 0} is trivial.
Basis-set invariance and lexicographic pivoting graph #
A node of the lexicographic Lemke–Howson graph for missing label k: a pair of
lexicographically feasible basis sets (basisP, basisQ) with basisP ∩ basisQ ⊆ {k}
(equivalently, every label other than k is nonbasic in at least one tableau).
Basic variable set for player 1's equality system
Bᵀ x + s = 1.Basic variable set for player 2's equality system
r + A y = 1.- isLexP : IsLexFeasibleBasisP B self.basisP
basisPis lexicographically feasible forP. - isLexQ : IsLexFeasibleBasisQ A self.basisQ
basisQis lexicographically feasible forQ. Every label other than
kis nonbasic in at least one tableau.
Under condition (3.5), every completely labelled node of lexGraph A B k has a unique
neighbor (degree 1).
Under condition (3.5), every non-completely-labelled node of lexGraph A B k has exactly two
distinct neighbors: one pivoting the unique duplicate label into P and one into Q.
Parity of lexicographically completely labelled basis pairs ([vS07], Sections 3.4 and 3.6): for any bimatrix game satisfying (3.5) (without assuming nondegeneracy), the number of lexicographically feasible completely labelled basis pairs is even.
Odd number of non-origin lexicographically completely labelled basis pairs for any (possibly degenerate) bimatrix game satisfying (3.5).
Standalone executable lexicographic Lemke–Howson solver #
Fuel-bounded inner loop of the lexicographic integer Lemke–Howson algorithm
([vS07], Algorithm 3.6 with Sections 3.5–3.6). side = false pivots in P;
side = true pivots in Q. Terminates as soon as the initial missing label k leaves a basis.
Run lexicographic integer Lemke–Howson from the artificial origin (0, 0) with missing label
k, returning the terminal completely labelled integer tableau pair.
Extract normalized rational mixed strategies (x / ∑ x, y / ∑ y) from a terminal tableau
pair (tabP, tabQ).
Termination and structural soundness of lexLHTableaux ([vS07], Algorithm 3.6
with Sections 3.5–3.6): under condition (3.5), for any missing label k, lexLHTableaux A B k
terminates and outputs a valid, lexicographically feasible, completely labelled integer tableau
pair distinct from the artificial origin.
Any valid, lexicographically feasible, completely labelled, non-origin tableau pair extracts via
extractRatStrategies to an exact rational Nash equilibrium of (A, B).
Soundness and termination of standalone lexicographic Lemke–Howson ([vS07],
Algorithm 3.6 with Sections 3.5–3.6): for any integer bimatrix game (A, B) satisfying (3.5)
(even if degenerate) and any missing label k, lexLHRun A B k returns an exact rational Nash
equilibrium.
Arbitrary integer and rational bimatrix games #
Standalone exact rational Lemke–Howson theorem: for any finite nonempty rational bimatrix
game (A, B) (possibly degenerate, arbitrary signs) and any missing label k, lexLHOfRat A B k
terminates and outputs an exact rational Nash equilibrium.