Equations
- hA.maxEigenvalue = iSup hA.eigenvalues
Instances For
Abbreviation for the average independence number of the neighborhoods.
Equations
- G.l = G.averageIndepNeighbors
Instances For
The same quantity under a different name, used in some conjectures.
Equations
Instances For
temp_v G v = deg(v)/(n(G) - deg(v)).
Equations
Instances For
Maximum of temp_v over all vertices.
Equations
- G.MaxTemp = (Finset.image G.temp_v Finset.univ).max' ⋯
Instances For
Cardinality of the union of the neighbourhoods of the ends of the non-edge e.
Equations
- G.non_edge_neighborhood_card e = Sym2.lift ⟨fun (u v : α) => (G.neighborFinset u ∪ G.neighborFinset v).card, ⋯⟩ e
Instances For
Minimum size of the neighbourhood of a non-edge of G.
Equations
- G.NG = if h : Gᶜ.edgeFinset.Nonempty then let neighbor_sizes := Finset.image G.non_edge_neighborhood_card Gᶜ.edgeFinset; ↑(neighbor_sizes.min' ⋯) else ↑(Fintype.card α)
Instances For
Size of a largest induced forest of G expressed as a real number.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Local eccentricity of a vertex.
Equations
- G.local_eccentricity v = sSup (Set.range (G.edist v))
Instances For
The minimum eccentricity among all vertices.
Equations
Instances For
The set of vertices of minimum eccentricity.
Equations
- G.graphCenter = {v : α | G.eccentricity v = G.minEccentricity}
Instances For
The maximum eccentricity among all vertices.
Equations
Instances For
The set of vertices of maximum eccentricity.
Equations
- G.maxEccentricityVertices = {v : α | G.eccentricity v = G.maxEccentricity}
Instances For
Distance from a vertex to a finite set.
Equations
Instances For
Average distance of G.
Equations
- G.averageDistance = if Fintype.card α > 1 then (∑ u : α, ∑ v : α, ↑(G.dist u v)) / (↑(Fintype.card α) * (↑(Fintype.card α) - 1)) else 0
Instances For
The floor of the average distance of G.
Instances For
Average distance from all vertices to a given set.
Equations
- G.distavg S = if Fintype.card α > 0 then (∑ v : α, ↑(G.distToSet v S)) / ↑(Fintype.card α) else 0
Instances For
A family of paths covering all vertices without overlaps.
Equations
Instances For
Minimum size of a path cover of G.
Instances For
The Wiener index of G, which is the sum of distances between all
pairs of vertices.
Instances For
Auxiliary function for Szeged index: counts vertices closer to u than v.
Instances For
The Szeged index of G.
This is define as the sum ∑_{uv ∈ E(G)} n_u(u,v) * n_v(u,v) where
n_u(uv) is the number of vertices closer to u than v.
Equations
- G.szegedIndex = ∑ e ∈ G.edgeFinset, Sym2.lift ⟨fun (u v : α) => G.szeged_aux u v * G.szeged_aux v u, ⋯⟩ e
Instances For
The average degree of G.
Equations
- G.averageDegree = (∑ v : α, ↑(G.degree v)) / ↑(Fintype.card α)
Instances For
The multiset of degrees of a graph.
Equations
- G.degreeMultiset = Multiset.map (fun (v : α) => G.degree v) Finset.univ.val
Instances For
The annihilation number of a graph. This is the largest number of degrees that can be added together without going over the total number of edges of that graph.
Equations
- G.annihilationNumber = {S ∈ Finset.Iic G.degreeMultiset | S.sum ≤ G.edgeFinset.card}.sup Multiset.card
Instances For
Computes the annihilation number of a graph G.
It calculates the degree sequence, sorts it ascendingly, and finds the largest prefix length 'k'
(where 0 ≤ k ≤ |V(G)|) such that the sum of the prefix is less than or equal to the sum of the corresponding suffix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Residue #
The residue of a graph is the number of zeros remaining after iteratively applying the Havel-Hakimi algorithm to the degree sequence until all remaining degrees are zero.
Computes the residue of a graph G, ,i.e. the number of zeros remaining after iteratively applying the Havel-Hakimi algorithm to the degree sequence until all remaining degrees are zero. Starts with the descending degree sequence and applies the Havel-Hakimi process.
Equations
- G.residue = SimpleGraph.residueAux✝ (Finset.sort (fun (x1 x2 : ℕ) => x1 ≥ x2) (Finset.image (fun (v : α) => G.degree v) Finset.univ))
Instances For
Fractional alpha. This is defined as $$ \max_x \sum_{v \in V} x_v $$ subject to $0 \le x_v \le 1$ for all $v \in V$ and $x_u + x_v \le 1$ whenever $(u, v)$ are connected by an edge.
Equations
Instances For
Lovász Theta Function (ϑ(G)) The Lovász theta function is defined as: ϑ(G) = min λ_max(A) where the minimum is taken over all symmetric matrices A such that:
A_ij = 1 for all i = j (diagonal entries are 1) A_ij = 0 for all {i,j} ∈ E (entries corresponding to edges are 0) A is positive semidefinite
Here λ_max(A) denotes the maximum eigenvalue of A.
Equations
Instances For
Given a simple graph G with adjacency matrix A, this is the number n₀ + min n₊ n₋ where:
n₀is the multiplicity of zero as an eigenvalue ofAn₊is the number of positive eigenvalues ofA(counting multiplicities)n₋is the number of negative eigenvalues ofA(counting multiplicities)
Equations
- One or more equations did not get rendered due to their size.