Documentation

CslibFrontier.GameTheory.InterdomainRouting.StablePaths

The Stable Paths Problem and Interdomain Routing (BGP) #

The Stable Paths Problem (SPP) models policy-based interdomain routing in the Border Gateway Protocol (BGP) ([GSW02]; [FSS07], Chapter 14). A finite collection of autonomous systems (ASes) forms an undirected graph G with a distinguished destination d. Each AS u specifies a set of permitted simple paths from u to d and a ranking function rank u : Option (List V) → ℕ that places no path (none) strictly below every permitted path and strictly orders permitted paths that use distinct next hops.

A path assignment π : V → Option (List V) is stable (SPP.IsStable) when d selects [d] and every other AS u selects the highest-ranked permitted path u :: q extending a neighbor's assigned path π w = some q (or none if no neighbor offers a permitted path). Equivalently, stability is a fixed point of per-node best-response path selection (SPP.isStable_iff_bestResponse).

A dispute wheel (DisputeWheel) is a cyclic preference conflict among ASes u₀, …, u_{k-1} with permitted pivot paths Rᵢ and nonempty rim prefixes Qᵢ such that each uᵢ permits Qᵢ ++ R_{i+1} and strictly prefers Qᵢ ++ R_{i+1} to Rᵢ.

Main definitions #

Main results #

References #

Simple paths in a SimpleGraph #

A simple path from u to v in G, represented as its nonempty duplicate-free vertex list starting at u, ending at v, with consecutive vertices adjacent in G.

theorem Cslib.GameTheory.InterdomainRouting.IsSimplePath.ne_nil {V : Type u_1} {G : SimpleGraph V} {u v : V} {p : List V} (hp : IsSimplePath G u v p) :

The Stable Paths Problem (SPP) #

An instance of the Stable Paths Problem ([GSW02]): a finite undirected graph of autonomous systems, a distinguished destination dest, per-AS permitted simple paths to dest, and per-AS preference rankings (0 for no path none; higher is preferred) satisfying GSW strictness (distinct next hops at a node receive distinct ranks).

  • graph : SimpleGraph V

    The undirected peering graph of autonomous systems.

  • dest : V

    The distinguished destination autonomous system.

  • permitted : V → List V → Prop

    Permitted simple paths from each AS to dest.

  • permitted_isSimplePath (u : V) (p : List V) : self.permitted u p → IsSimplePath self.graph u self.dest p

    Every permitted path at u is a simple path in graph from u to dest.

  • permitted_dest : self.permitted self.dest [self.dest]

    The trivial one-vertex path [dest] is permitted at the destination.

  • rank : V → Option (List V) → ℕ

    Preference ranking (0 for none; higher rank means strictly more preferred).

  • rank_none (u : V) : self.rank u none = 0

    The empty route none has rank 0.

  • rank_pos (u : V) (p : List V) : self.permitted u p → 0 < self.rank u (some p)

    Every permitted path is strictly preferred to none.

  • strict (u : V) (p₁ p₂ : List V) : self.permitted u p₁ → self.permitted u p₂ → self.rank u (some p₁) = self.rank u (some p₂) → p₁.tail.head? = p₂.tail.head?

    Strictness: equal-ranked permitted paths at u must have the same next hop.

At dest, the only permitted path is [dest].

theorem Cslib.GameTheory.InterdomainRouting.SPP.exists_cons_cons_of_permitted {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) {u : V} {p : List V} (hu : u ≠ S.dest) (hp : S.permitted u p) :
∃ (v : V) (t : List V), p = u :: v :: t ∧ S.graph.Adj u v

Every permitted path at u ≠ dest has at least two vertices, with the second adjacent to u.

def Cslib.GameTheory.InterdomainRouting.SPP.IsChoice {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) (u : V) (o : Option (List V)) :

An option o is an available choice for u under path assignment π: either none (no route), or some (u :: q) permitted at u extending some neighbor w's assigned route π w.

theorem Cslib.GameTheory.InterdomainRouting.SPP.isChoice_none {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) (u : V) :
S.IsChoice π u none

A path assignment π is stable if dest selects [dest] and every other AS selects a highest-ranked path among its available choices under π.

theorem Cslib.GameTheory.InterdomainRouting.SPP.IsStable.permitted_of_eq_some {V : Type u_1} [Fintype V] [DecidableEq V] {S : SPP V} {π : V → Option (List V)} (hπ : S.IsStable π) {u : V} {p : List V} (h : π u = some p) :
S.permitted u p

In a stable assignment, every assigned route some p is permitted at its node.

Dispute wheels #

A dispute wheel in an SPP instance ([GSW02]; [FSS07], Chapter 14): a cyclic list of size > 0 autonomous systems node i, permitted pivot paths pivot i, and nonempty rim prefixes rim i such that each node i permits rim i ++ pivot (next i) and strictly prefers it to pivot i.

Cyclic successor index around a dispute wheel.

Every spoke node of a dispute wheel differs from the destination.

Adjacent spoke nodes around a dispute wheel are distinct.

Every dispute wheel has at least two spokes.

Cycle extraction helper (reusing Cslib.FunctionalGraph) #

Griffin–Shepherd–Wilfong uniqueness #

theorem Cslib.GameTheory.InterdomainRouting.SPP.nonempty_disputeWheel_of_isStable_ne {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) {π₁ π₂ : V → Option (List V)} (h₁ : S.IsStable π₁) (h₂ : S.IsStable π₂) (hne : π₁ ≠ π₂) :

Griffin–Shepherd–Wilfong uniqueness (contrapositive) ([GSW02]): any two distinct stable path assignments yield a dispute wheel.

theorem Cslib.GameTheory.InterdomainRouting.SPP.subsingleton_isStable_of_isEmpty_disputeWheel {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (hfree : IsEmpty (DisputeWheel S)) {π₁ π₂ : V → Option (List V)} (h₁ : S.IsStable π₁) (h₂ : S.IsStable π₂) :
π₁ = π₂

Without a dispute wheel, an SPP has at most one stable path assignment.

Griffin–Shepherd–Wilfong existence and fair best-response convergence (safety) #

Griffin–Shepherd–Wilfong existence ([GSW02]): if an SPP instance has no dispute wheel, then it admits a stable path assignment.

Griffin–Shepherd–Wilfong theorem ([GSW02]): if an SPP instance has no dispute wheel, then it admits a unique stable path assignment.

Asynchronous best-response dynamics and safety #

noncomputable def Cslib.GameTheory.InterdomainRouting.SPP.bestResponse {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) (u : V) :

The best-response path choice of node u given current assignment π. For u = dest this is always some [dest]; for u ≠ dest it is a rank-maximizing available choice (unique whenever neighbors hold routes starting at themselves).

theorem Cslib.GameTheory.InterdomainRouting.SPP.bestResponse_isChoice {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) {u : V} (hu : u ≠ S.dest) :
S.IsChoice π u (S.bestResponse π u)
theorem Cslib.GameTheory.InterdomainRouting.SPP.rank_le_bestResponse {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) {u : V} (hu : u ≠ S.dest) {o : Option (List V)} (ho : S.IsChoice π u o) :
S.rank u o ≤ S.rank u (S.bestResponse π u)
theorem Cslib.GameTheory.InterdomainRouting.SPP.isStable_iff_bestResponse {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (π : V → Option (List V)) :
S.IsStable π ↔ ∀ (u : V), S.bestResponse π u = π u

A path assignment is stable if and only if it is a fixed point of bestResponse.

The standard initial assignment: dest advertises [dest] and all other ASes have none.

noncomputable def Cslib.GameTheory.InterdomainRouting.SPP.run {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (sched : ℕ → V) (π₀ : V → Option (List V)) :
ℕ → V → Option (List V)

Asynchronous best-response execution along activation schedule sched, starting from π₀. This models asynchronous per-node atomic best-response activation ([FSS07], Chapter 14), rather than the asynchronous link-queue message-passing protocol (SPVP) of [GSW02].

An activation schedule is fair if every AS is activated infinitely often.

theorem Cslib.GameTheory.InterdomainRouting.SPP.exists_converges_of_isEmpty_disputeWheel {V : Type u_1} [Fintype V] [DecidableEq V] (S : SPP V) (hfree : IsEmpty (DisputeWheel S)) (sched : ℕ → V) (hfair : IsFair sched) :
∃ (π : V → Option (List V)), S.IsStable π ∧ ∃ (T : ℕ), ∀ t ≥ T, S.run sched S.initAssignment t = π

Griffin–Shepherd–Wilfong safety ([GSW02], proved here for the asynchronous per-node atomic best-response activation model SPP.run of [FSS07], Chapter 14, rather than FIFO link-queue SPVP): if an SPP instance has no dispute wheel, then asynchronous best-response dynamics from initAssignment converge under every fair activation schedule to the unique stable path assignment.

Classic counterexamples: BAD GADGET and DISAGREE #

The classic 4-node BAD GADGET ([GSW02]; [FSS07], Chapter 14): destination 0, with nodes 1, 2, 3 each preferring a two-hop detour through the next node cyclically (1 → 2 → 0, 2 → 3 → 0, 3 → 1 → 0) over their direct path to 0.

The classic 3-node DISAGREE instance ([GSW02]): destination 0, with nodes 1 and 2 each preferring to route through the other (1 → 2 → 0 over 1 → 0, and 2 → 1 → 0 over 2 → 0).

theorem Cslib.GameTheory.InterdomainRouting.exists_two_isStable_disagree :
∃ (π₁ : Fin 3 → Option (List (Fin 3))) (π₂ : Fin 3 → Option (List (Fin 3))), disagree.IsStable π₁ ∧ disagree.IsStable π₂ ∧ π₁ ≠ π₂

disagree admits two distinct stable path assignments ([GSW02]).