Documentation

Complexity.Foundations.Combinatorics.Expander.Loops

Unions and self-loops #

Two regular multigraphs G and H on the same vertices, of degrees |D| and |E|, superpose to a multigraph G.union H of degree |D| + |E|, whose edges at a vertex are those of G followed by those of H. One step of its random walk is a step of G with probability |D| / (|D| + |E|) and a step of H otherwise, so its walk operator is the weighted average of theirs (walk_union_apply) and its spectral expansion is at most the weighted average of theirs (spectralExpansion_union_le).

The simplest such H is loops V E, with a self-loop at every vertex for each label i : E and no other edge, whose walk operator is the identity as soon as there is a label (walk_loops); with a single label, loops V Unit is the multigraph whose tensor products with H are disjoint copies of H. Superposing loops V E adds self-loops to G (addLoops). A few of them, as Dinur's preprocessing adds Dinur, Section 3.1, close at most the proportion |E| / (|D| + |E|) of the gap between the spectral expansion and 1 (spectralExpansion_addLoops_le). As many self-loops as edges at each vertex give the lazy graph Cslib.RotationMap.lazy, whose walk stays put half of the time.

Renaming the edge labels along an equivalence (relabel) changes neither the walk operator nor the spectral expansion; it lets constructions with structured label types, such as D ⊕ D, present their results with labels Fin d.

Main definitions #

Main results #

References #

def Cslib.RotationMap.relabel {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (e : D ≃ E) :

The same multigraph with its edge labels renamed along e : D ≃ E: the e i-th edge at a vertex of G.relabel e is its i-th edge in G.

Instances For
    @[simp]
    theorem Cslib.RotationMap.rot_relabel {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (e : D ≃ E) (p : V × E) :
    (G.relabel e).rot p = Prod.map id (⇑e) (G.rot (p.1, e.symm p.2))

    The rotation map of a relabelled multigraph.

    @[simp]
    theorem Cslib.RotationMap.neighbor_relabel {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (e : D ≃ E) (v : V) (i : E) :
    (G.relabel e).neighbor v i = G.neighbor v (e.symm i)

    The i-th neighbor in a relabelled multigraph is the e.symm i-th neighbor in the original.

    @[simp]
    theorem Cslib.RotationMap.walk_relabel {V : Type u_1} {D : Type u_2} {E : Type u_3} [Fintype D] [Fintype E] (G : RotationMap V D) (e : D ≃ E) :
    (G.relabel e).walk = G.walk

    Relabelling the edges does not change the walk operator.

    @[simp]
    theorem Cslib.RotationMap.spectralExpansion_relabel {V : Type u_1} {D : Type u_2} {E : Type u_3} [Fintype V] [Fintype D] [Fintype E] (G : RotationMap V D) (e : D ≃ E) :

    Relabelling the edges does not change the spectral expansion.

    def Cslib.RotationMap.union {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) :

    The union of two regular multigraphs G and H on the same vertices: the multigraph whose edges at a vertex are those of G, labelled by Sum.inl, followed by those of H, labelled by Sum.inr. Its degree is the sum of their degrees.

    Instances For
      @[simp]
      theorem Cslib.RotationMap.rot_union_inl {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) (v : V) (i : D) :

      The rotation map of a union on an edge of the first multigraph.

      @[simp]
      theorem Cslib.RotationMap.rot_union_inr {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) (v : V) (j : E) :

      The rotation map of a union on an edge of the second multigraph.

      @[simp]
      theorem Cslib.RotationMap.neighbor_union_inl {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) (v : V) (i : D) :
      (G.union H).neighbor v (Sum.inl i) = G.neighbor v i

      The neighbors of a vertex in a union along the edges of the first multigraph.

      @[simp]
      theorem Cslib.RotationMap.neighbor_union_inr {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) (v : V) (j : E) :
      (G.union H).neighbor v (Sum.inr j) = H.neighbor v j

      The neighbors of a vertex in a union along the edges of the second multigraph.

      theorem Cslib.RotationMap.walk_union_apply {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (H : RotationMap V E) [Fintype D] [Fintype E] (f : V → ℝ) (v : V) :
      (G.union H).walk f v = (↑(Fintype.card D) * G.walk f v + ↑(Fintype.card E) * H.walk f v) / (↑(Fintype.card D) + ↑(Fintype.card E))

      The walk operator of a union is the average of the walk operators of the two multigraphs, weighted by their degrees.

      The spectral expansion of a union is at most the average of the spectral expansions of the two multigraphs, weighted by their degrees.

      def Cslib.RotationMap.loops (V : Type u_4) (E : Type u_5) :

      The multigraph on V with a self-loop at every vertex for each label i : E, and no other edge: its rotation map is the identity.

      Instances For
        @[simp]
        theorem Cslib.RotationMap.rot_loops {V : Type u_1} {E : Type u_3} (p : V × E) :
        (loops V E).rot p = p

        The rotation map of loops V E is the identity.

        @[simp]
        theorem Cslib.RotationMap.neighbor_loops {V : Type u_1} {E : Type u_3} (v : V) (i : E) :
        (loops V E).neighbor v i = v

        Every edge of loops V E is a self-loop.

        @[simp]
        theorem Cslib.RotationMap.walk_loops {V : Type u_1} {E : Type u_3} [Fintype E] [Nonempty E] :

        With at least one self-loop at every vertex, the walk operator of loops V E is the identity.

        def Cslib.RotationMap.addLoops {V : Type u_1} {D : Type u_2} (G : RotationMap V D) (E : Type u_4) :

        G with a self-loop added at every vertex for each label i : E: the union of G with loops V E.

        Instances For
          @[simp]
          theorem Cslib.RotationMap.rot_addLoops_inl {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (v : V) (i : D) :

          The rotation map of G.addLoops E on an edge of G.

          @[simp]
          theorem Cslib.RotationMap.rot_addLoops_inr {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (v : V) (j : E) :

          The rotation map of G.addLoops E on an added self-loop.

          @[simp]
          theorem Cslib.RotationMap.neighbor_addLoops_inl {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (v : V) (i : D) :
          (G.addLoops E).neighbor v (Sum.inl i) = G.neighbor v i

          The neighbors of a vertex in G.addLoops E along the edges of G.

          @[simp]
          theorem Cslib.RotationMap.neighbor_addLoops_inr {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) (v : V) (j : E) :
          (G.addLoops E).neighbor v (Sum.inr j) = v

          The added edges of G.addLoops E are self-loops.

          theorem Cslib.RotationMap.walk_addLoops_apply {V : Type u_1} {D : Type u_2} {E : Type u_3} (G : RotationMap V D) [Fintype D] [Fintype E] (f : V → ℝ) (v : V) :
          (G.addLoops E).walk f v = (↑(Fintype.card D) * G.walk f v + ↑(Fintype.card E) * f v) / (↑(Fintype.card D) + ↑(Fintype.card E))

          The walk operator of G with |E| self-loops added at every vertex stays put with probability |E| / (|D| + |E|) and otherwise takes a step of the walk on G.

          Adding self-loops to a multigraph of degree |D|, |E| at every vertex, gives spectral expansion at most (|D| λ(G) + |E|) / (|D| + |E|).