Diameter of a simple graph #
This module defines the diameter of a simple graph, which measures the maximum distance between vertices.
Main definitions #
SimpleGraph.ediam
is the graph extended diameter.SimpleGraph.diam
is the graph diameter.
Todo #
The extended diameter is the greatest distance between any two vertices, with the value ⊤
in
case the distances are not bounded above, or the graph is not connected.
Instances For
theorem
SimpleGraph.ediam_le_of_edist_le
{α : Type u_1}
{G : SimpleGraph α}
{k : ℕ∞}
(h : ∀ (u v : α), G.edist u v ≤ k)
:
theorem
SimpleGraph.ediam_eq_zero_of_subsingleton
{α : Type u_1}
{G : SimpleGraph α}
[Subsingleton α]
:
theorem
SimpleGraph.nontrivial_of_ediam_ne_zero
{α : Type u_1}
{G : SimpleGraph α}
(h : G.ediam ≠ 0)
:
theorem
SimpleGraph.subsingleton_of_ediam_eq_zero
{α : Type u_1}
{G : SimpleGraph α}
(h : G.ediam = 0)
:
@[simp]
theorem
SimpleGraph.ediam_eq_top_of_not_connected
{α : Type u_1}
{G : SimpleGraph α}
[Nonempty α]
(h : ¬G.Connected)
:
theorem
SimpleGraph.ediam_eq_top_of_not_preconnected
{α : Type u_1}
{G : SimpleGraph α}
(h : ¬G.Preconnected)
:
theorem
SimpleGraph.exists_edist_eq_ediam_of_finite
{α : Type u_1}
{G : SimpleGraph α}
[Nonempty α]
[Finite α]
:
@[simp]
The diameter is the greatest distance between any two vertices, with the value 0
in
case the distances are not bounded above, or the graph is not connected.
Instances For
theorem
SimpleGraph.nontrivial_of_diam_ne_zero
{α : Type u_1}
{G : SimpleGraph α}
(h : G.diam ≠ 0)
:
theorem
SimpleGraph.diam_eq_zero_of_not_connected
{α : Type u_1}
{G : SimpleGraph α}
(h : ¬G.Connected)
:
theorem
SimpleGraph.diam_eq_zero_of_ediam_eq_top
{α : Type u_1}
{G : SimpleGraph α}
(h : G.ediam = ⊤)
:
theorem
SimpleGraph.ediam_ne_top_of_diam_ne_zero
{α : Type u_1}
{G : SimpleGraph α}
(h : G.diam ≠ 0)
:
@[simp]
@[simp]