Documentation

CslibFrontier.GameTheory.Bimatrix.LemkeHowson

The Lemke–Howson graph of a pair of labelled polyhedra #

Let A₁ *ᵥ x ≤ b₁ (with x : ι₁ → K) and A₂ *ᵥ y ≤ b₂ (with y : ι₂ → K) be two systems of inequalities whose rows are indexed by the same set κ of labels. A label of a point is a row that is tight there (Matrix.tightRows). A pair (x, y) is completely labelled (LemkeHowson.CompletelyLabeled) if every label is a label of x or of y, and, for a fixed label k, k-almost completely labelled if every label other than k is.

This is the combinatorial core of the Lemke–Howson algorithm [LH64], in the polytope form of [vS07], Section 3.4. Suppose both systems are nondegenerate and bounded, and card κ = card ι₁ + card ι₂. The k-almost completely labelled vertex pairs are the nodes of the graph LemkeHowson.graph, whose edges keep one of the two vertices and replace the other by an adjacent vertex of its polyhedron (Matrix.VertexAdj, a pivot). A node has degree 1 if it is completely labelled (LemkeHowson.ncard_neighborSet_of_completelyLabeled) and degree 2 otherwise (LemkeHowson.ncard_neighborSet_of_not_completelyLabeled). At a completely labelled pair the two label sets are disjoint, so only k can be dropped, from the side that has it. At any other node k is missing and exactly one label is duplicate, and it can be dropped from either side. Since a finite graph has an even number of odd-degree vertices, the number of completely labelled vertex pairs is even (LemkeHowson.even_ncard_completelyLabeled).

For a bimatrix game, the completely labelled vertex pairs of the two best response polytopes are the Nash equilibria together with the artificial pair (0, 0), so a nondegenerate bimatrix game has an odd number of Nash equilibria; see CslibFrontier.GameTheory.Bimatrix.BestResponsePolytope.

Main definitions #

Main results #

References #

def Cslib.GameTheory.LemkeHowson.CompletelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] (A₁ : Matrix κ ι₁ K) (b₁ : κ → K) (A₂ : Matrix κ ι₂ K) (b₂ : κ → K) (x : ι₁ → K) (y : ι₂ → K) :

(x, y) is completely labelled: every label is a tight row of x or of y.

structure Cslib.GameTheory.LemkeHowson.Node {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] (A₁ : Matrix κ ι₁ K) (b₁ : κ → K) (A₂ : Matrix κ ι₂ K) (b₂ : κ → K) (k : κ) :
Type (max (max u_1 u_2) u_3)

A node of the Lemke–Howson graph for the missing label k: a pair of vertices of the two polyhedra in which every label other than k is a tight row of x or of y.

  • x : ι₁ → K

    The vertex of the first polyhedron.

  • y : ι₂ → K

    The vertex of the second polyhedron.

  • isVertex_x : A₁.IsVertex b₁ self.x

    x is a vertex of the first polyhedron.

  • isVertex_y : A₂.IsVertex b₂ self.y

    y is a vertex of the second polyhedron.

  • almostCompletelyLabeled (j : κ) : j ≠ k → j ∈ A₁.tightRows b₁ self.x ∨ j ∈ A₂.tightRows b₂ self.y

    The pair is k-almost completely labelled.

theorem Cslib.GameTheory.LemkeHowson.completelyLabeled_iff {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {x : ι₁ → K} {y : ι₂ → K} :
CompletelyLabeled A₁ b₁ A₂ b₂ x y ↔ ∀ (j : κ), j ∈ A₁.tightRows b₁ x ∨ j ∈ A₂.tightRows b₂ y
theorem Cslib.GameTheory.LemkeHowson.Node.ext {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} {p q : Node A₁ b₁ A₂ b₂ k} (hx : p.x = q.x) (hy : p.y = q.y) :
p = q
theorem Cslib.GameTheory.LemkeHowson.Node.ext_iff {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} {p q : Node A₁ b₁ A₂ b₂ k} :
p = q ↔ p.x = q.x ∧ p.y = q.y
def Cslib.GameTheory.LemkeHowson.Node.toProd {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} (p : Node A₁ b₁ A₂ b₂ k) :
(ι₁ → K) × (ι₂ → K)

The pair of vertices of a node.

theorem Cslib.GameTheory.LemkeHowson.Node.toProd_injective {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} :
theorem Cslib.GameTheory.LemkeHowson.Node.toProd_mk {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} {x : ι₁ → K} {y : ι₂ → K} (hx : A₁.IsVertex b₁ x) (hy : A₂.IsVertex b₂ y) (h : ∀ (j : κ), j ≠ k → j ∈ A₁.tightRows b₁ x ∨ j ∈ A₂.tightRows b₂ y) :
{ x := x, y := y, isVertex_x := hx, isVertex_y := hy, almostCompletelyLabeled := h }.toProd = (x, y)

The pair of vertices of Node.mk x y _ _ _ is (x, y).

theorem Cslib.GameTheory.LemkeHowson.finite_node {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} :
Finite (Node A₁ b₁ A₂ b₂ k)

There are finitely many nodes.

def Cslib.GameTheory.LemkeHowson.graph {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] (A₁ : Matrix κ ι₁ K) (b₁ : κ → K) (A₂ : Matrix κ ι₂ K) (b₂ : κ → K) (k : κ) [DecidableEq κ] :
SimpleGraph (Node A₁ b₁ A₂ b₂ k)

The Lemke–Howson graph for the missing label k: two k-almost completely labelled vertex pairs are adjacent if they agree in one polyhedron and are adjacent vertices in the other.

theorem Cslib.GameTheory.LemkeHowson.graph_adj {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} [DecidableEq κ] {p q : Node A₁ b₁ A₂ b₂ k} :
(graph A₁ b₁ A₂ b₂ k).Adj p q ↔ p.x = q.x ∧ A₂.VertexAdj b₂ p.y q.y ∨ p.y = q.y ∧ A₁.VertexAdj b₁ p.x q.x
theorem Cslib.GameTheory.LemkeHowson.isVertex_left_of_completelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hcard : Fintype.card κ = Fintype.card ι₁ + Fintype.card ι₂) {x : ι₁ → K} {y : ι₂ → K} (hx : A₁.mulVec x ≤ b₁) (hy : A₂.mulVec y ≤ b₂) (hcl : CompletelyLabeled A₁ b₁ A₂ b₂ x y) :
A₁.IsVertex b₁ x

A feasible completely labelled pair in two bounded nondegenerate systems with card κ = card ι₁ + card ι₂ consists of vertices: the first point is a vertex.

theorem Cslib.GameTheory.LemkeHowson.isVertex_right_of_completelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) (hcard : Fintype.card κ = Fintype.card ι₁ + Fintype.card ι₂) {x : ι₁ → K} {y : ι₂ → K} (hx : A₁.mulVec x ≤ b₁) (hy : A₂.mulVec y ≤ b₂) (hcl : CompletelyLabeled A₁ b₁ A₂ b₂ x y) :
A₂.IsVertex b₂ y

A feasible completely labelled pair in two bounded nondegenerate systems with card κ = card ι₁ + card ι₂ consists of vertices: the second point is a vertex.

theorem Cslib.GameTheory.LemkeHowson.graph_adj_iff {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} [DecidableEq κ] [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) {p q : Node A₁ b₁ A₂ b₂ k} :
(graph A₁ b₁ A₂ b₂ k).Adj p q ↔ (∃ l ∈ A₁.tightRows b₁ p.x, (l = k ∨ l ∈ A₂.tightRows b₂ p.y) ∧ q.x = A₁.pivotVertex b₁ p.x l ∧ q.y = p.y) ∨ ∃ l ∈ A₂.tightRows b₂ p.y, (l = k ∨ l ∈ A₁.tightRows b₁ p.x) ∧ q.y = A₂.pivotVertex b₂ p.y l ∧ q.x = p.x

The neighbours of a node p in the Lemke–Howson graph: either x pivots on a label l that is k or a label of y, or y pivots on a label l that is k or a label of x.

theorem Cslib.GameTheory.LemkeHowson.ncard_neighborSet {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} [DecidableEq κ] [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) (p : Node A₁ b₁ A₂ b₂ k) :
((graph A₁ b₁ A₂ b₂ k).neighborSet p).ncard = {l ∈ A₁.tightRows b₁ p.x | l = k ∨ l ∈ A₂.tightRows b₂ p.y}.card + {l ∈ A₂.tightRows b₂ p.y | l = k ∨ l ∈ A₁.tightRows b₁ p.x}.card

The degree of a node is the number of labels that may be dropped: labels of x that are k or labels of y, plus labels of y that are k or labels of x.

theorem Cslib.GameTheory.LemkeHowson.ncard_neighborSet_of_completelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} [DecidableEq κ] [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) (hcard : Fintype.card κ = Fintype.card ι₁ + Fintype.card ι₂) (p : Node A₁ b₁ A₂ b₂ k) (h : CompletelyLabeled A₁ b₁ A₂ b₂ p.x p.y) :
((graph A₁ b₁ A₂ b₂ k).neighborSet p).ncard = 1

A completely labelled node has exactly one neighbour in the Lemke–Howson graph.

theorem Cslib.GameTheory.LemkeHowson.ncard_neighborSet_of_not_completelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} {k : κ} [DecidableEq κ] [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) (hcard : Fintype.card κ = Fintype.card ι₁ + Fintype.card ι₂) (p : Node A₁ b₁ A₂ b₂ k) (h : ¬CompletelyLabeled A₁ b₁ A₂ b₂ p.x p.y) :
((graph A₁ b₁ A₂ b₂ k).neighborSet p).ncard = 2

A node that is not completely labelled has exactly two neighbours in the Lemke–Howson graph.

theorem Cslib.GameTheory.LemkeHowson.even_ncard_completelyLabeled {K : Type u_1} [Field K] [LinearOrder K] {ι₁ : Type u_2} {ι₂ : Type u_3} {κ : Type u_4} [Fintype ι₁] [Fintype ι₂] [Fintype κ] {A₁ : Matrix κ ι₁ K} {b₁ : κ → K} {A₂ : Matrix κ ι₂ K} {b₂ : κ → K} [IsStrictOrderedRing K] (hnd₁ : A₁.IsNondegenerateSystem b₁) (hrec₁ : ∀ (v : ι₁ → K), A₁.mulVec v ≤ 0 → v = 0) (hnd₂ : A₂.IsNondegenerateSystem b₂) (hrec₂ : ∀ (v : ι₂ → K), A₂.mulVec v ≤ 0 → v = 0) [Nonempty κ] (hcard : Fintype.card κ = Fintype.card ι₁ + Fintype.card ι₂) :
Even {p : (ι₁ → K) × (ι₂ → K) | A₁.IsVertex b₁ p.1 ∧ A₂.IsVertex b₂ p.2 ∧ CompletelyLabeled A₁ b₁ A₂ b₂ p.1 p.2}.ncard

Parity of completely labelled vertex pairs ([vS07], Section 3.4). For two bounded nondegenerate systems whose rows are labelled by a nonempty set κ with card κ = card ι₁ + card ι₂, the number of completely labelled vertex pairs is even: they are the odd-degree vertices of the Lemke–Howson graph for any missing label.