As an important branch of theoretical chemistry, chemical index calculation has received wide attention in recent years. Its theoretical results have been widely used in many fields such as chemistry, pharmacy, physics, biology, materials, etc. and play a key role in reverse engineering. Its basic idea is to obtain compound characteristics indirectly through the calculation of topological index. As a basic structure, quasi-tree structures are widely found in compounds. In this paper, we obtain the maximal value and the second smallest value of quasi-tree graphs of order \(n.\)
Chemists in the early experiments summed up an important rule: the characteristics of compounds and its molecular structure is closely related. Inspired by this, scientists defined the indicators of molecular structure, and through the calculation of indicators they obtain the nature of the compound. Specifically, each atom in the molecular structure is represented by a vertex, and the chemical bonds between the atoms are represented by the edges, thereby converting the molecule into a graph model. The calculation of the index on the molecular structure can be transferred as the calculation of the index on the graph. The graph derived from the molecular structure is called the molecular graph. A chemical index can be thought of as a function \(f: G\to\Bbb R^{+}\) that maps each molecular structure to a positive real number (See Moharir et al. [1], Udagedara et al. [2], Shafiei and Saeidifar [3], Crepnjak and Tratnik [4] for more details).
Due to the low capital requirements of such methods, there is no need to purchase experimental equipment and reagents, and so are the concerns of scientists from underdeveloped countries and regions in the Middle East, Southeast Asia. At the same time, as a branch of theoretical chemistry, its calculation results have potential applications in medical, pharmaceutical, materials and other fields, and thus are widely concerned by scholars in various fields (see Gao et al. [5], [6], [7], [8], [9], [10], [11] and [12]).
Let \(G=(V(G),E(G))\) be a simple connected graph with \(|V(G)|=n\). The distance \(d_{G}(u,v)\) between vertices \(u\) and \(v\) in \(G\) is equal to the length of the shortest path that connects \(u\) and \(v\). Denote \(\mathcal{L}(n,d_{0})\)={\(G\): \(G\) is a quasi-tree graph of order \(n\) with \(G-v_{0}\) being a tree and \(d_{G}(v_{0})=d_{0}\)}. The concept of quasi-tree was first introduced in Liu and Lu [13].
This means that Wiener polarity index of a graph \(G\) is the number of unordered vertices pairs that are at distance 3 in \(G\). By using its definition, Lukovits and Linert [15] demonstrated quantitative structure-property relationships in a series of acyclic and cycle-containing hydrocarbons. Besides, a physico-chemical interpretation of \(W_p(G)\) was found by Hosoya [16]. Ashrafi and Ghalavand [17] determined an ordering of chemical trees with given order \(n\) with respect to Wiener polarity index.
As a basic structure, tree-like structure exists in the structure of various chemical molecules such as drugs, materials and macromolecular polymers (see Heuberger and Wagner [18], Vaughan et al. [19], Bozovic et al. [20]). Therefore, the study of the tree structure helps scientists master the physicochemical properties of the structure and apply it to engineering. Although a large number of results have been obtained for the indexing of trees, the results for the quasi-tree are few, which motivates us to conduct special studies on the important indicators of the quasi-tree.
In this paper, we obtain the maximal Wiener polarity index of quasi-tree graphs of order \(n\) in section 2. In section 3, we first introduce the smallest Wiener polarity index of quasi-tree graphs of order \(n\), and then obtain the second smallest value.Lemma 2.1. \(G_{1}\) attains the maximal value of Wiener polarity index \(\lfloor\frac{n^{2}-7n+13}{3}\rfloor\) after applying transformation \(\sigma\).
Proof. Let \(G_{1}’\) from \(G_{1}\) by applying transformation \(\sigma\) \(m\) times on \(G_{2}\), then there are \(n-d_{0}-1-m\) pendant vertices adjacent to \(v_{1}\) and \(m\) pendant vertices adjacent to \(v_{2}\). \begin{eqnarray*} W_{p}(G_{1}’)&=&m(n-d_{0}-1-m)+(n-d_{0}-1-m)(d_{0}-2)+m(d_{0}-3)\\ &=&-(m-\frac{n-d_{0}-2}{2})^{2}+(\frac{n^{2}}{4}-3n-\frac{3}{4}d_{0}^{2}+2d_{0}+\frac{1}{2}nd_{0}+3). \end{eqnarray*} \(W_{p}(G_{1}’)\) attains the maximal value when \(m=[\frac{n-d_{0}-2}{2}]\), it’s equal to \(m=\lfloor\frac{n-d_{0}-1}{2}\rfloor\). That is, when there are \(\lceil\frac{n-d_{0}-1}{2}\rceil\) pendant vertices adjacent to \(v_{1}\), \(\lfloor\frac{n-d_{0}-1}{2}\rfloor\) pendant vertices adjacent to \(v_{2}\), \(W_{p}(G_{1}’)\) attains the maximal value. Let \(G_{1}^{*}\) denote \(G_{1}’\) with the maximal value of Wiener polarity index. $$W_{p}(G_{1}^{*})=\lceil\frac{n-d_{0}-1}{2}\rceil\lfloor\frac{n-d_{0}-1}{2}\rfloor+\lceil\frac{n-d_{0}-1}{2}\rceil(d_{0}-3)+\lfloor\frac{n-d_{0}-1}{2}\rfloor(d_{0}-2)$$ $$ =\left\{\begin{array}{ll} -\frac{3}{4}(d_{0}-\frac{n+4}{3})^{2}+\frac{n^{2}-7n+13}{3},&if \ n-d_{0}\ is \; even \ \ \ \ \ \ \ \ \ \\ \\ -\frac{3}{4}(d_{0}-\frac{n+4}{3})^{2}+\frac{4n^{2}-28n+49}{12},&if \ n-d_{0}\ is dd \end{array}\right.$$ It is easy to check that when \(d_{0}=\lfloor\frac{n+4}{3}\rfloor\) or \(\lceil\frac{n+4}{3}\rceil\), \(W_{p}(G_{1}^{*})\) attains the maximal value \(\lfloor\frac{n^{2}-7n+13}{3}\rfloor\).
Lemma 2.2. \(G_{2}\) attains the maximal value of Wiener polarity index \(\lfloor\frac{n^{2}-4n+4}{4}\rfloor\) after applying transformation \(\sigma\).
Proof. Let \(G_{2}’\) from \(G_{2}\) by applying transformation \(\sigma\) \(m\) times on \(G_{2}\), then there are \(n-d_{0}-2-m\) pendant vertices adjacent to \(v_{1}\) and \(m\) pendant vertices adjacent to \(v_{2}\). \begin{eqnarray*} W_{p}(G’)&=&m(n-d_{0}-2-m)+d_{0}(n-d_{0}-2-m)\\ &=&-(m-\frac{n-2d_{0}-2}{2})^{2}+\frac{n^{2}-4n+4}{4}. \end{eqnarray*} When \(2d_{0}< n-2\), the maximal value of \(W_{p}(G')\) is \(\lfloor\frac{n^{2}-4n+4}{4}\rfloor\) when \(m=\lfloor\frac{n-2d_{0}-2}{2}\rfloor\). When \(2d_{0}\geq n-2\), the value of \(W_{p}(G')\) attain the maximal value when \(m=0\), it means that don't apply transformation \(\sigma\) on \(G_{2}\) and \(G_{2}\) itself attain the maximal value, now \begin{eqnarray*} W_{p}(G_{2})&=&d_{0}(n-d_{0}-2)\\ &=&-(d_{0}-\frac{n-2}{2})^{2}+\frac{n^{2}-4n+4}{4} \end{eqnarray*} the maximal value of \(W_{p}(G_{2})\) is \(\lfloor\frac{n^{2}-4n+4}{4}\rfloor\) when \(d_{0}=\lceil\frac{n-2}{2}\rceil\). Combining the above conditions, let \(G_{2}^{*}\) denote \(G_{2}\) after applying transformation \(\sigma\) \(t(t\geq 0)\) times, the maximal value of \(W_{p}(G_{2}^{*})\) is \(\lfloor\frac{n^{2}-4n+4}{4}\rfloor\).
Lemma 2.3. \(G_{3}\) attains the maximal value of Wiener polarity index \(\lfloor\frac{n^{2}-6n+9}{3}\rfloor\) after applying transformation \(\sigma\).
Proof. Let \(G_{3}’\) from \(G_{3}\) by applying transformation \(\sigma\) \(m\) times on \(G_{3}\), then there are \(n-d_{0}-2-m\) pendant vertices adjacent to \(v_{1}\) and \(m\) pendant vertices adjacent to \(v_{2}\). \begin{eqnarray*} W_{p}(G_{3}’)&=&m(n-d_{0}-2-m)+(n-d_{0}-2)(d_{0}-1)\\ &=&-(m-\frac{n-d_{0}-2}{2})^{2}+\frac{n^{2}-3d_{0}^{2}+2nd_{0}-8n+12}{4}. \end{eqnarray*} \(W_{p}(G_{3}’)\) attains the maximal value when \(m=\lfloor\frac{n-d_{0}-2}{2}\rfloor\) or \(\lceil\frac{n-d_{0}-2}{2}\rceil\). That is, when there are \(\lceil\frac{n-d_{0}-2}{2}\rceil\) pendant vertices adjacent to \(v_{1}\), \(\lfloor\frac{n-d_{0}-2}{2}\rfloor\) pendant vertices adjacent to \(v_{2}\), \(W_{p}(G_{3}’)\) attains the maximal value. Let \(G_{3}^{*}\) denote \(G_{3}’\) with the maximal value of Wiener polarity index. $$W_{p}(G_{3}^{*})=\lceil\frac{n-d_{0}-2}{2}\rceil\lfloor\frac{n-d_{0}-2}{2}\rfloor+(n-d_{0}-2)(d_{0}-1) \ \ \ \ \ \ \ \ \ \ \ \ $$ $$ =\left\{\begin{array}{ll} -\frac{3}{4}(d_{0}-\frac{n}{3})^{2}+\frac{n^{2}-6n+9}{3} & if \ n-d_{0} \ is \; even\\ \\ -\frac{3}{4}(d_{0}-\frac{n}{3})^{2}+\frac{4n^{2}-24n+33}{12} & if \ n-d_{0} \ is dd \end{array}\right.$$ It is easy to check that when \(d_{0}=\lfloor\frac{n}{3}\rfloor\) or \(\lceil\frac{n}{3}\rceil\), \(W_{p}(G_{3}^{*})\) attains the maximal value \(\lfloor\frac{n^{2}-6n+9}{3}\rfloor\).
Lemma 2.4.(Hou et al. [21]) Let \(U\) ba a unicyclic graph of order \(n\) with \(n\geq 10, g(U)\geq 4\), then \(W_{p}(U)\leq \lfloor\frac{n^{2}-2n-15}{4}\rfloor\).
Lemma 2.5.Let \(G\in \mathcal{L}(n,2)\) with \(n\geq 10\), then $$W_{p}(G)\leq \lfloor\frac{n^{2}-2n-15}{4}\rfloor.$$
Proof. It is clear \(G\) is a unicyclic graph. If \(g(G)\geq 4\), by Lemma 2.4, \(W_{p}(U)\leq \lfloor\frac{n^{2}-2n-15}{4}\rfloor\). If \(g(G)=3\), let \(C\) denote the cycle with \(V(C)=\{v_{1},v_{2},v_{3}\}\). The rest of \(n-3\) vertices can only adjacent to two vertices of \(V(C)\), let it be \(v_{2}, v_{3}\). If all the \(n-3\) vertices are only adjacent to \(v_2\), \(W_p(G)\) is equal to \(W_P(T)\), where \(T\) is a tree from \(G\) by deleting the edge \(v_1v_3\). And the maximal value of \(W_p(T)\) is \(\lceil\frac{n-2}{2}\rceil\lfloor\frac{n-2}{2}\rfloor\)([22]). If all the \(n-3\) vertices are adjacent to both \(v_1\) and \(v_2\), it is easy to check that the maximal value of \(W_p(G)\) is \(\lceil\frac{n-3}{2}\rceil\lfloor\frac{n-3}{2}\rfloor\). While \(\lfloor\frac{n^{2}-2n-15}{4}\rfloor>\lfloor \frac{n^{2}-4n+4}{4}\rfloor\) when \(n>10\), the Lemma is proved.
Lemma 2.6.Let \(G\in \mathcal{L}(n,d_{0})\) with \(n\geq 10, d_0\geq 3\). Then $$W_{p}(G)\leq W_{p}(G_{3}^{*}).$$ The equality holds if and only if \(G\cong G_{3}^{*}\).
Proof.
For the degree of \(v_{0}\) is \(d_{0}\), all the vertices of \(G\) can be divided into two sets. The first set includes \(d_{0}+1\) vertices for they are \(v_{0}\) and the \(d_{0}\) vertices are adjacent to \(v_{0}\), denoted by \(S_{1}\). The second set includes the rest of \(n-d_{0}-1\) vertices, denoted by \(S_{2}\).
Clearly, if a pair of vertices \(u\) and \(v\) are both in \(S_{1}\), then \(d_{G}(u,v)\leq 2\). Suppose that \(u\) and \(v\) are a pair of vertices in \(G\) such that \(d_{G}(u,v)=3\), it’s either \(u\) and \(v\) is in \(S_{2}\) or \(u\), \(v\) are in \(S_{1}\), \(S_{2}\), respectively.
For the pair of vertices are both in \(S_{2}\), denote the pairs as \(n_{1}\). For all the \(n-d_{0}-1\) vertices can’t be in the 3 vertices of a triangle, respectively, so \(n_{1}\leq\lfloor\frac{n-d_{0}-1}{2}\rfloor\lceil\frac{n-d_{0}-1}{2}\rceil\). For the pair of vertices are in \(S_{1}\), \(S_{2}\), respectively. Denote the pairs as \(n_{2}\), then \(W_p(G)=n_1+n_2\). For there at least 2 vertices connect the other pair of vertices which with a distance 3, so there at least 2 vertices aren’t in the pairs with a distance 3 and at least one is from \(S_1\). The less vertices aren’t in, the more of the value \(n_1+n_2\). The maximal value of \(n_2\) will be \(d_0(n-d_0-2)\) if just one is from \(S_1\), and then the other one is from \(S_2\), so the possible maximal value of \(n_1\) is \(\lfloor\frac{n-d_{0}-2}{2}\rfloor\lceil\frac{n-d_{0}-2}{2}\rceil\). The maximal value of \(n_2\) will be \((d_0-1)(n-d_0-2)\) if there are two from \(S_1\) and one is from \(S_2\), so the possible maximal value of \(n_1\) is \(\lfloor\frac{n-d_{0}-2}{2}\rfloor\lceil\frac{n-d_{0}-2}{2}\rceil\). The maximal value of \(n_2\) will be \((d_0-2)(n-d_0-1)\) if there are three from \(S_1\) and none is from \(S_2\), so the possible maximal value of \(n_1\) is \(\lfloor\frac{n-d_{0}-1}{2}\rfloor\lceil\frac{n-d_{0}-1}{2}\rceil\).
\(G_{1}\), \(G_{2}\), \(G_{3}\) attain the three maximum values of \(n_2\) for \((d_0-2)(n-d_0-1), d_0(n-d_0-2), (d_0-1)(n-d_0-2)\).
Using the same notations in transformation \(\sigma\).
\(\bullet\) Case 1: \(n_2\) attains one of the maximal value \((d_0-2)(n-d_0-1)\) in \(G_1\). After applying transformation \(\sigma\), \(n_1\) attains the maximal value \(\lfloor\frac{n-d_{0}-1}{2}\rfloor\lceil\frac{n-d_{0}-1}{2}\rceil\) in \(G_1^{*}\), but \(n_2\) decreased to \(\lceil\frac{n-d_0-1}{2}\rceil(d_0-2)+\lfloor\frac{n-d_0-1}{2}\rfloor(d_0-3)\), it’s between \((d_0-3)(n-d_0-1)\) and \((d_0-2)(n-d_0-1)\).
\(n_1+n_2\) will attain the maximal value of \(\lfloor\frac{n^{2}-7n+13}{3}\rfloor\) in \(G_1^{*}\).
\(\bullet\) Case 2: \(n_2\) attains one of the maximal value \(d_0(n-d_0-2)\) in \(G_2\) while the value of \(n_1\) is 0. After applying transformation \(\sigma\), \(n_1\) attains the possible maximal value \(\lfloor\frac{n-d_{0}-2}{2}\rfloor\lceil\frac{n-d_{0}-2}{2}\rceil\), but \(n_2\) decreased. \(n_1+n_2\) will attain the maximal value of \(\lfloor\frac{n^{2}-4n+4}{4}\rfloor\) in \(G_2^{*}\).
\(\bullet\) Case 3: \(n_2\) attains one of the maximal value \((d_0-1)(n-d_0-2)\) in \(G_3\), it’s smaller than that in \(G_2\), but after applying transformation \(\sigma\), \(n_1\) attains the possible maximal value \(\lfloor\frac{n-d_{0}-2}{2}\rfloor\lceil\frac{n-d_{0}-2}{2}\rceil\) while the value of \(n_2\) unchanged.
\(n_1+n_2\) will attain the maximal value of \(\lfloor\frac{n^{2}-6n+9}{3}\rfloor\) in \(G_3^{*}\).
From case 1 and case 2, the conclusion is that \(n_1\) and \(n_2\) can’t attain the maximal value simultaneously in \(G_1^{*}\) and \(G_2^{*}\). It’s only in \(G_3^{*}\) that \(n_1\) and \(n_2\) attain the maximal value simultaneously. So we just need to compare the maximal value of \(n_1+n_2\) in \(G_1^{*}\), \(G_2^{*}\), \(G_3^{*}\). By Lemma 2.1, 2.2, 2.3, \(W_{p}(G_3^{*})\) attains the maximal value.
Lemma 2.7.Let \(G\in \mathcal{L}(n,d_{0})\) with \(n\geq 4, d_{0}\geq 2\).
Lemma 3.1. (Liu and Liu [22]) Let \(G\) be an unicyclic graph of order \(n\), and \(W_p(G)>0\). Then \(W_p(G)\geq n-4\).
By Lemma 3.1, if \(G\in \mathcal{L}(n,2)\), the second smallest Wiener polarity index of \(G\) is \(n-4\). As for \(G\in \mathcal{L}(n,d_{0})\) with \(d_0\geq 3\), all the vertices of \(G\) can be divided into two sets. The first set includes \(d_{0}+1\) vertices for they are \(v_{0}\) and the \(d_{0}\) vertices are adjacent to \(v_{0}\), denote the set by \(S_{1}\) and the \(d_{0}+1\) vertices by \(v_0\), \(v_{0_1}\), \(v_{0_2},\cdots,v_{0_{d_0}}\). The second set includes the rest of \(n-d_{0}-1\) vertices, denote the set by \(S_{2}\) and the \(n-d_{0}-1\) vertices by \(v_1\), \(v_2\), … \(v_{n-d_0-1}\).Lemma 3.2. Let \(G\in \mathcal{L}(n,d_{0})\) with \(d_0\geq 3\). Let \(v_1, v_2\in S_2\), and \(d_G(v_1,v_2)\geq 3\). Then the two conditions can’t hold simultaneously, for they are the distance between \(v_1\) and every vertex of \(S_1\) is less than or equal to 2, the distance between \(v_2\) and every vertex of \(S_1\) is less than or equal to 2.
Proof. For \(d_G(v_1,v_2)\geq 3\), without loss of generality, let \(d_G(v_1,v_2)=3\) and the path of length 3 is \(v_1v_iv_jv_2\). For \(d_0\geq 3\), there at least exists one vertex \(v_{0_1}\) in \(S_1\), while \(v_{0_1}\) is different from \(v_i\) and \(v_j\)(even if \(v_i\), \(v_j\) are both in \(S_1\) ), the distance between \(v_{0_1}\) and \(v_1\) is less than or equal to 2, so \(v_{0_1}\) is adjacent to \(v_1\) or the vertices which are adjacent to \(v_1\)(let it be \(v_i\)) and the distance between \(v_{0_1}\) and \(v_2\) is greater or equal to 3.
Lemma 3.3. Let \(G\in \mathcal{L}(n,d_{0})\) with \(d_0\geq 3\). If \(W_p(G)>0\), there at least exist a vertex \(v_i\) in \(S_2\) such that \(d_G(v_i,v_j)\geq 3\), while \(v_j\in S_1\).
Proof. If the distance between any a vertex in \(S_1\) and every vertex in \(S_2\) is less than or equal to 2. In terms of the condition of Lemma 3.2, there isn’t any pair of vertices with a distance of 3 in \(S_2\). And it’s clear that there isn’t any pair of vertices with a distance of 3 in \(S_1\), so \(W_p(G)=0\).
Lemma 3.4.
Let \(G\in \mathcal{L}(n,d_{0})\) with \(d_0\geq 3\). If there are \(t(t\geq 2)\) vertices in \(S_2\) satisfying the condition that the distance between each vertex and every vertex in \(S_1\) is less than or equal to 2, the \(t\) vertices can only be composed by two forms:
Case 1. If \(t=2\), the 2 vertices must be adjacent.
Case 2. If \(t\geq 2\), the \(t\) vertices must be adjacent to one common vertex, where the common vertex is \(v_{0_i}\) in \(S_1\).
Proof.
By means of Lemma 3.3, the distance between any two of the \(t\) vertices is less than or equal to 2. If \(t=2\), the two vertices are either adjacent or adjacent to one common vertex, where the common vertex is \(v_{0_i}\) in \(S_1\). When the two vertices are adjacent, every \(v_{0_i}\) in \(S_1\) should be adjacent to one and only one of them. When the two vertices are adjacent to one common vertex(let it be \(v_{0_1}\)), the other \(v_{0_i}\) in \(S_1\) should be adjacent to \(v_{0_1}\).
If \(t=3\) and the 3 vertices compose a path of length 2, denote the path by \(v_1v_2v_3\). For the distance between \(v_0\) and \(v_t\) is 2, \(v_1\), \(v_2\) and \(v_3\) must be adjacent to 3 different \(v_{0_i}\) in \(S_1\). Let \(v_{0_1}\) be the vertex that \(v_1\) adjacent to, then the distance between \(v_{0_1}\) and \(v_3\) is 3. So the 3 vertices can only adjacent to one common vertex, where the common vertex is \(v_{0_i}\) in \(S_1\). Similarly, if \(t>3\), the \(t\) vertices must be adjacent to one common vertex, where the common vertex is \(v_{0_i}\) in \(S_1\).
Theorem 3.5. Let \(G\in \mathcal{L}(n,d_{0})\). If \(W_{p}(G)>0\) and \(d_0\leq n-3\) then $$W_{p}(G)\geq n-d_0-2.$$
Proof.
(1)If \(d_0=2\), by Lemma 3.1, \(W_{p}(G)\geq n-d_0-2=n-4\). \(G_6\) is an example that attains the smallest value.
(2)If \(3\leq d_0\leq n-3\), let \(v_1\), \(v_2\), … , \(v_i\) in \(S_2\) satisfy the condition that the distance between any one of them and every vertex in \(S_1\) is less than or equal to 2. By Lemma 3.3, \(i< n-d_0-1\), let \(v_{i+1}\), … \(v_{n-d_0-1}\) be the rest vertices satisfy the condition that the distance between any one of them and every vertex in \(S_1\) is greater or equal to 3.