 # Path matrix and path energy of graphs

Given a graph G, we associate a path matrix P whose (i, j) entry represents the maximum number of vertex disjoint paths between the vertices i and j, with zeros on the main diagonal. In this note, we resolve four conjectures from [M. M. Shikare, P. P. Malavadkar, S. C. Patekar, I. Gutman, On Path Eigenvalues and Path Energy of Graphs, MATCH Commun. Math. Comput. Chem. 79 (2018), 387--398.] on the path energy of graphs and finally present efficient O(|E| |V|^3) algorithm for computing the path matrix used for verifying computational results.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Let be a simple graph with vertex set . Define the matrix of size such that is equal to the maximum number of vertex disjoint paths from to for , and if . We say that is the path matrix of the graph . is a real and symmetric matrix and therefore has real spectra .

A path spectral radius of graph is largest eigenvalue of the path matrix . Denote by the degree of the vertex , and with the largest vertex degree. The ordinary energy , of a graph is defined to be the sum of the absolute values of the ordinary eigenvalues of . In analogy, the path energy is defined as

 PE(G)=n∑i=1|ρi|.

Shikare et al.  studied basic properties of the path matrix and its eigenvalues. Here we continue the study by focusing on the extremal problems of path energy of graphs, and resolve open problems around the structure of general and unicyclic graphs attaining maximal or minimal values of .

## 2 Extremal values of path energy of graphs

The authors in  proved the following two simple results

###### Theorem 2.1

Let be a connected graph of order . Then

1. , with equality if and only if is a tree of order .

2. , with equality if and only if is a complete graph .

###### Theorem 2.2

Let G be a graph with vertex set . Then for all , it holds

 puv(G)≤min{deg(u),deg(v)}

.

The following result resolves Conjecture 1 from .

###### Theorem 2.3

Let be a connected graph of order . Then

1. , with equality if and only if is a tree of order .

2. , with equality if and only if is a complete graph .

Proof.  The trace of the matrix is 0 by definition, which is in turn the sum of all its eigenvalues. The first part directly follows from Theorem 2.1,

 PE(G)≥2ρ(G)≥2(n−1).

For the second part we use Cauchy-Schwarz inequality:

 PE(G)=ρ(G)+n∑i=2ρi(G)≤ρ(G)+ ⎷(n−1)(n∑i=2ρ2i).

Using Theorem 2.2, the trace of the squared matrix is clearly less than or equal to

 Tr(P2)=n∑i=1ρ2i≤n(n−1)⋅Δ2≤(n−1)4n.

Combining the above, we get

 PE(G)≤ρ+√(n−1)4n−ρ2(n−1).

The function is increasing for , as the first derivative is non-negative:

 f′(x)=1−x(n−1)√(n−1)4n−x2(n−1)≥0,

which is equivalent with .

The equality holds in both cases if and only if attains minimum or maximum values, which follows from Theorem 2.1.

## 3 Path energy of unicyclic graphs

Let be a unicyclic graph of the order whose cycle is of the size . In the following we give the results that resolves Conjectures 2, 3 and 4 from .

###### Conjecture 3.1

Let be a unicyclic graph of the order whose cycle is of the size , then depends only on the parameters and . For fixed value of , is a monotonically increasing function of .

First we determine the spectrum of the path matrix of unicyclic graphs. If , that is , it is easy to see that , where is the square matrices of the order whose all non-diagonal elements are equal to one, and all diagonal elements are zero. Furthermore, as represents the adjacency matrix of the complete graph we obtain that

 SpecP(Cn)=((−2)n−12(n−1)1).

Next we calculate the spectrum of for .

###### Theorem 3.2

The spectrum of the path matrix of the unicyclic graph , for , is equal to

 SpecP(Un,k)=((−2)k−1(−1)n−k−1ρ12ρ11),

where

 ρ1,2=n+k−3±√(n+k−3)2+4(k2−nk+2n−2)2. (1)

Proof.  The vertices of can be labeled so that

 P(Un,k)=[P(Ck)11Jn−k]=[2Jk11Jn−k].

Now, we will determine the roots of the characteristics polynomial

 det(P(Un,k)−λIn)=∣∣∣2Jk−λIk11Jn−k−λIn−k∣∣∣,

where

is identity matrix of the order

. By subtracting the -th row from the -th row, for , and by subtracting the -th row from the -th row, for , we obtain that the -th row is equal to

 [0,…,0,λ+2,−λ−2s,0,…,0]

for , and the th row is equal to

 [0,…,0,−λ−1,λ+1l+1,0,…,0]

for . Therefore, we conclude that

 (λ+2)k−1(λ+1)n−k−1∣det(P(Un,k)−λIn)

and hence it is proved that has the eigenvalues and with multiplicities and , respectively. Notice that , as .

Now, we will determine the other two eigenvalues. As the trace of is equal to zero and the trace of is equal to the sum of the squares of the entries of we have that

 n∑i=1ρi = tr(P(Un,k))=0 n∑i=1ρ2i = tr(P(Un,k)2)=4(k2−k)+(n2−k2−(n−k)).

Furthermore, since we have already concluded that

 (ρ3,…,ρn)=(−2,…,−2k−1,−1,…,−1n−k−1)

it holds that

 ρ1+ρ2 = 2(k−1)+(n−k−1) (2) ρ21+ρ22 = 4(k2−k)+(n2−k2−(n−k))−4(k−1)−(n−k−1). (3)

By substituting the variable from first equation to the second, we get

 2ρ21−2(n+k−2)ρ1−2k2+2nk−4n+4=0,

which completes the proof.

From the above theorem directly follows that

 ρ1=n+k−3+√(n+k−3)2+4(k2−nk+2n−2)2

is the spectral radius of for .

By analyzing the above formula we can obtain Propositions 6, 7 and 8 from . Indeed, if we denote

 f(x)=n+x−3+√(n+x−3)2+4(x2−nx+2n−2)

then it is sufficient to prove that is monotonically increasing function of , for , to get Proposition 6. First derivative of is equal to , where . If then it is clear that . Now, for we prove that . After a short calculation, it can be obtained that if and only if . Since this quadratic function is convex, it is less than zero in the interval , where . It is easy to check that and and therefore we conclude and for .

From if and only if follows Proposition 7. Finally, we can calculate minimal spectral radius in the class of unicyclic graphs of the order and it is attained for :

 min3≤k≤nρ(Un,k)=f(3)2=n+√n2−4n+282.
###### Lemma 3.3

The eigenvalue of the path matrix of the unicyclic graph , for , is greater to zero if and only if and .

Proof.  According to (1) we conclude that if and only if . If we denote by , then we have that if and only if belongs to the interval , where . Furthermore, if and only if and this is the case for . Therefore, if and only if . On the other hand, we may notice that

 x2 = n−4−√(n−4)2−82+2>2

and

 x2 = n−6−√(n−6)2+(4n−28)2+3≤3,

as . From Vieta’s formulas we have that and therefore . Finally, since is integer we conclude that .

Now, we calculate the path energy of unicyclic graph of the order and cycle length , such that . According to the previous lemma the spectrum of has two positive eigenvalues and if and only if and . In that case, the energy of is equal to and from (2) we further have that it is equal to . Now, if or then we conclude that is the only positive eigenvalue-spectral radius and the path energy is equal to .

###### Theorem 3.4

The path energy of unicyclic graph for , is equal to

 PE(Un,k) = {2(n+k−3),n≥7 and 3≤k≤n−32ρ(Un,k),n<7 or n−2≤k≤n−1

where is the spectral radius of .

Since it has already shown that is increasing function of , and as is increasing as well, it remains to prove that

 2(n+(n−3)−3)<2ρ(Un,n−2).

Indeed, as , where , we conclude that

 2ρ(Un,k)>n+k−3+√(n+k−3)2+0=2(n+k−3)>2(n+(n−3)−3),

for (in the proof of Lemma 3.3 we have used that if and only if ). Therefore, we see that is increasing function of and hence we prove Conjecture 3.1 from .

Conjecture 3 and 4 can be unified and generalized in the following way:

###### Theorem 3.5

Let be an unicyclic graph of order . Then

1. with equality if and only if ,

2. with equality if and only if .

Proof.  From the above discussion implies that , for , is maximal for . Since it remains to compare the values and . It can be directly verified that the inequality

 PE(Un,n−1)=2n−4+√(2n−4)2+4((n−1)2−n(n−1)+2n−2)≤4(n−1)

holds if and only if .

Moreover, the minimal path energy in the class of unicyclic graphs of the order is attained for :

 min3≤k≤nPE(Un,k)=n+√n2−4n+28.

## 4 Efficient algorithm for computing the matrix P(g)

In order to find the maximum number of vertex disjoint paths between two vertices, we can transform it to the problem of finding maximum number of edge disjoint paths. For all vertices except fixed vertices and , split vertex into and with an edge . If we had an edge in the original graph, this gets converted to two directed edges and .

Using Max-Flow Min-Cut theorem, the problem is now equivalent to computing maximum flow for any two pairs of vertices. We can use Ford-Fulkerson algorithm  for computing maximum flow in as we have all edge capacities equal to 1 in the graph . For all pairs of vertices this gives us an algorithm of complexity .

A biconnected graph is a connected and non-separable graph, meaning that if any one vertex were to be removed, the graph will remain connected. The running time can be further speed up by finding all articulation points and biconnected components in time as only within biconnected components the values of the matrix can be larger than 1. This can be done in a preprocessing step.

We plan to use this efficient algorithm to continue studying the path energy of graphs, in particular bicyclic and biconnected graphs.

## References

•  D. Cvetković, M. Doob, H. Sachs, Spectra of graphs – Theory and Application, 3rd edition, Johann Ambrosius Barth Verlag, 1995.
•  T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms, MIT Press, Cambridge, 2001.
•  X. Li, Y. Shi, I. Gutman, Graph Energy, Springer, Berlin, 2012.
•  S. C. Patekar, M. M. Shikare, On the path matrices of graphs and their properties, Adv. Appl. Discr. Math. 17 (2016) 169–184.
•  M. M. Shikare, P. P. Malavadkar, S. C. Patekar, I. Gutman, On Path Eigenvalues and Path Energy of Graphs, MATCH Commun. Math. Comput. Chem. 79 (2018), 387–398.