{'fraction_non_alphanumeric': 0.07545185043511524, 'fraction_numerical': 0.022186095438462273, 'mean_word_length': 3.1715197447147987, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Reverse degree distance of unicyclic graphs

The reverse degree distance is a connected graph invariant closely related to the degree distance proposed in mathematical chemistry. We determine the unicyclic graphs of given girth, number of pendant vertices and maximum degree, respectively, with maximum reverse degree distances.


Introduction
Let G be a simple connected graph with vertex set V (G). For u, v ∈ V (G), let d G (u, v) be the distance between the vertices u and v in G and let D G (u) = v∈V (G) d G (u, v). For u ∈ V (G), let d G (u) be the degree of u in G. The degree distance of G is defined as [6,11,12] D ′ (G) = It is a useful molecular descriptor [21]. Earlier as noted in [16,20], this graph invariant appeared to be part of the molecular topological index (or Schultz index) [19], which may be expressed as D ′ (G) + u∈V (G) d G (u) 2 , see [12,15,17,26], where the latter part u∈V (G) d G (u) 2 is known as the first Zagreb index [13,14,18]. Thus, the degree distance is also called the true Schultz index in chemical literature [7]. I. Tomescu [23] showed that the star is the unique graph with minimum degree distance in the class of connected graphs with n vertices. Further work on the minimum degree distance (especially for unicyclic and bicyclic graphs) may be found in A.I. Tomescu [22], I. Tomescu [24] and Bucicovschi and Cioabǎ [2]. Dankelmann et al. [3] gave asymptotically sharp upper bounds for the degree distance. Among others, the authors [9] studied the ordering of unicyclic graphs with large degree distances, and bicyclic graphs were also considered in [10].
Recall that the Wiener index [25] of the graph G is defined as Gutman [12] showed that if G is a tree with n vertices, then Thus there is no need to study the degree distance for trees because this is equivalent to the study of the Wiener index, see, e.g., [4,5].
The reverse degree distance of the graph G is defined as [27] r D ′ (G) = 2(n − 1)md − D ′ (G) where n, m and d are the number of vertices, the number of edges and the diameter of G, respectively. Recall that, earlier, Balaban et al. [1] introduced the concept of reverse Wiener index, which is defined to be n(n−1)d 2 − W (G). If G is a tree, then from the result of Gutman [12] mentioned above, r D ′ (G) = 4 (n − 1) 2 d 2 − W (G) + n(n − 1).
Some properties of the reverse degree distance, especially for trees, have been given in [27]. There are two reasons for the study of this graph invariant. One is that the reverse degree distance itself is a topological index satisfying the basic requirement to be a branching index and with potential for application in chemistry [27]. The other is the study the reverse degree distance is actually the study the degree distance, which is important in both mathematical chemistry and in discrete mathematics.
In this paper, we determine the graphs with maximum reverse degrees distance in the class of unicyclic graphs (connected graphs with a unique cycle) with given girth (cycle length), number of pendant vertices (vertices of degree one), and maximum degree, respectively. Additionally, we also determine the graphs with minimum degree distance in the class of unicyclic graphs with given number of vertices, girth and diameter.

Preliminaries
Let G be a graph of the form in Fig. 1, where M and N are vertex-disjoint connected graphs, T is a tree on k ≥ 2 vertices such that M and T have only one common vertex u, and T and N have only one common vertex v. Let G * be the graph obtained from M and N by identifying vertices u and v which is denoted by u, and attaching k − 1 pendant vertices to u. Fig. 1. The graphs G and G * .
Lemma 1 Let G and G * be the two graphs in Fig. 1.
Proof For vertex-disjoint connected graphs Q 1 and Q 2 with |V (Q 1 )|, |V (Q 2 )| ≥ 2, and s ∈ V (Q 1 ), t ∈ V (Q 2 ), let H be the graph obtained from Q 1 and Q 2 by joining s and t by an edge, and H 1 the graph obtained by identifying vertices s and t which is denoted by s, and attaching a pendant vertex w to s.
Now (i) and (ii) follow by applying to G the transformation from H to H 1 repeatedly.
Lemma 2 Let G 0 be a connected graph with at least three vertices and let u and v be two distinct vertices of G 0 . Let G s,t be the graph obtained from G 0 by attaching s and t pendant vertices to u and v, respectively. If s, t ≥ 1, then D ′ (G s,t ) > min{D ′ (G s+t,0 ), D ′ (G 0,s+t )}.
. It is easily seen that Similarly, we have and thus, The result follows.
Let G and H be connected graphs.
Let G * be the unicyclic graph obtained from the cycle C m = v 0 v 1 . . . v m−1 v 0 by attaching a path P a and a path P b to v i and v j , respectively, where i = j, a ≥ 1 and b ≥ 2. Label the vertices of the path P b attached to v j as u 1 , . . . , u b consecutively, where u 1 is adjacent to v j in G * .
For integer h ≥ 1, let G (1) ut,h be the graph obtained from G * by attaching h pendant vertices to u t , where 1 ≤ t ≤ b − 1, and G (2) vt,h the graph obtained from G * by attaching h pendant vertices to v t , where 0 ≤ t ≤ m − 1.
By similar arguments as in Lemma 3, we have As usual, G − V 1 means the graph formed from the graph G by deleting the vertices of V 1 ⊂ V (G) and edges incident with these vertices, while G − E 1 means the graph formed from G by deleting edges of E 1 ⊆ E(G).
3 Minimum Degree distance of unicyclic graphs with given girth and diameter In this section we determine the unicyclic graphs with minimum degree distance when the number of vertices, girth and diameter are given. Let n, m and d be integers with 3 ≤ m ≤ n − 1 and 2 ≤ d ≤ n − ⌊ m+1 2 ⌋. Let P s be a path on s vertices. For a ≥ b ≥ 0 and a ≥ 1, let U k n,m,d (a, b) be the unicyclic graph obtained from the cycle . Let γ and θ be integers such that γ + θ = d − m 2 and γ − θ is an integer as large as possible but no more than α + 1. Let U n,m,d = U n,m,d (γ, θ) = U 0 n,m,d (γ, θ).

Lemma 5 Let n, m and d be fixed integers with
and if a = d − ⌊ m 2 ⌋ and b = 0, then The result follows. Let U(n, m, d) be the set of unicyclic graphs with n vertices, girth m and diameter d, Let G be a unicyclic graph with n vertices and let Suppose that P (G) has no common vertices with C m . Let u s and v t be the vertices M to be the subgraph of G consisting of the path P (G) and trees attached to u i for all 1 ≤ i ≤ d − 1 and i = s, N to be the subgraph of G by deleting all branches at v t , we obtain a graph G * for which P (G * ) (= P (G)) and the cycle C m have exactly one common vertex and D ′ (G * ) < D ′ (G), a contradiction. Thus, P (G) and C m have at least one common vertex. We may choose P (G) such that P (G) and the cycle C m have vertices in common as many as possible and u 0 is a pendant vertex.
Let v i = u a (resp. v j = u l ) be the first (resp. last) common vertex of P (G) and C m , where 0 < a ≤ l ≤ d. By Lemma 1 (i), all vertices outside C m except those in T i and T j are pendant vertices attached to vertices that are nearest to them in C m , all vertices in T i and T j except those in P (G) are pendant vertices attached to vertices that are nearest to them in P (G).
Suppose that P (G) and C m have only one common vertex, i.e., i = j, a = l and l < d. By the choice of P (G), we have a ≥ 2. By Lemma 2, all pendant vertices in G except u 0 and u d are actually attached to some vertex, say s, of G.
. . u d has more than one common vertex with the cycle C m and the same length as P (G), and we have and then D ′ (H * ) < D ′ (G), a contradiction. Thus, P (G) and C m have at least two common vertices, i.e., a < l.
By Lemma 2, all pendant vertices in G except u 0 and u d are actually attached to some vertex, say Suppose that l < d and x ∈ {u l+1 , . . . , u d−1 }, say x = u q , where l < q ≤ d − 1. Let u q 1 , u q 2 , . . . , u q h be the pendant neighbors of u q outside P (G). For G 1 = G − {u q u q 1 , u q u q 2 , . . . , u q u q h }+{u l u q 1 , u l u q 2 , . . . , u l u q h } ∈ U(n, m, d), using Lemma 3 by setting t = q − l, n 1 = a + m − 1 and n 2 = b − t, and noting that n 1 > n 2 since a ≥ b, we have and then D ′ (G 2 ) < D ′ (G), a contradiction. Thus, x ∈ {u 1 , u 2 , . . . , u a }, say x = u p , where 1 ≤ p ≤ a.
(iv) If α = 0, or 0 < α ≤ 1 and d − ⌊ m 2 ⌋ is odd, or α > 1 is either not an integer or an integer with the same parity as d − ⌊ m 2 ⌋, then U n,m,d is the unique graph in U(n, m, d) with minimum degree distance.
Proof Suppose that G is a graph with minimum degree distance in U(n, m, d). By d (a, b), then we have by Lemma 5 that G = U n,m,d or U n,m,d (γ − 1, θ + 1) if α ≥ 1 is an integer with different parity as d − m 2 , and G = U n,m,d otherwise.

Reverse degree distances of unicyclic graphs
In this section we determine the unicyclic graphs on n vertices with maximum reverse degree distances when girth, number of pendant vertices and maximum degree are given respectively.
where a, b are integers with a + b = d − m 2 , a ≥ b ≥ 0 and a ≥ 1.
Now the result follows.
Lemma 11 Let n, m and d be integers with 5 ≤ m ≤ n − 2, 3 ≤ d ≤ n − ⌊ m+1 2 ⌋, and let a and b be integers with a d (a, b). If b ≥ 1, then by Lemmas 8 and 9, we have If b = 0, then a = n − h − m, and by similar calculation, the equality above holds also. Thus, Now the result follows.
Let U(n, p) be the set of unicyclic graphs with n vertices and p pendant vertices, where 0 ≤ p ≤ n − 3. The case p = 0 is trivial.
Any graph in U(n, n − 3) may be obtained by attaching n − 3 pendant vertices to vertices of a triangle, and then it is easily seen that U n,3,3 attains maximum reverse degree distance in U(n, n − 3).
Theorem 3 Among graphs in U(n, p), where n ≥ 6 and 1 ≤ p ≤ n − 4, (i) if p = 1, then U n,4,n−2 (n − 4, 0) is the unique graph with maximum reverse degree distance; (ii) if p = 2, then U n,4,n−2 is the unique graph with maximum reverse degree distance; (iii) if p = 3 and n = 7, then U 7,3,4 is the unique graph with maximum reverse degree distance; (iv) if p = 3 and n > 7 is odd, then U k n,4,n−3 for k = 0, 1 are the unique graphs with maximum reverse degree distance; (v) if p = 3 and n ≥ 6 is even, or 4 ≤ p ≤ n − 4, then U n,4,n−p is the unique graph with maximum reverse degree distance for n−p−1 2 > n+4 6 , U n,3,n−p and U n,4,n−p are the unique graphs with maximum reverse degree distance for n−p−1 2 = n+4 6 , U n,3,n−p is the unique graph with maximum reverse degree distance for n−p−1 2 < n+4 6 .
It is easily checked that U n,3,3 attains maximum reverse degree distance in U(n, n − 2).