A polynomial algorithm of edge-neighbor-scattering number of trees

A polynomial algorithm of edge-neighbor-scattering number of trees

Applied Mathematics and Computation 283 (2016) 1–5 Contents lists available at ScienceDirect Applied Mathematics and Computation journal homepage: w...

334KB Sizes 2 Downloads 71 Views

Applied Mathematics and Computation 283 (2016) 1–5

Contents lists available at ScienceDirect

Applied Mathematics and Computation journal homepage: www.elsevier.com/locate/amc

A polynomial algorithm of edge-neighbor-scattering number of trees Yong Liu a, Zongtian Wei a,∗, Jiarong Shi a, Anchan Mai b a b

School of Science, Xi’an University of Architecture and Technology, Xi’an, Shaanxi 710055, PR China Border Defense College of the PLA of China, Science-Cultural Institute, Xi’an, Shaanxi 710108, PR China

a r t i c l e

i n f o

MSC: 05C85 Keywords: Graph Edge-neighbor-scattering number Polynomial algorithm Tree

a b s t r a c t The edge-neighbor-scattering number (ENS) is an alternative invulnerability measure of networks such as the vertices represent spies or virus carriers. Let G = (V, E ) be a graph and e be any edge in G. The open edge-neighborhood of e is N (e ) = { f ∈ E (G )| f = e, e and f are adjacent}, and the closed edge-neighborhood of e is N[e] = N (e ) ∪ {e}. An edge e in G is said to be subverted when N[e] is deleted from G. An edge set X ⊆ E(G) is called an edge subversion strategy of G if each of the edges in X has been subverted from G. The survival subgraph is denoted by G/X. An edge subversion strategy X is called an edgecut-strategy of G if the survival subgraph G/X is disconnected, or is a single vertex, or is φ . The ENS of a graph G is defined as ENS (G ) = max {ω (G/X ) − |X |}, where X is any X⊆E (G )

edge-cut-strategy of G, ω(G/X) is the number of the components of G/X. It is proved that the problem of computing the ENS of a graph is NP-complete. In this paper, we give a polynomial algorithm of ENS of trees. © 2016 Elsevier Inc. All rights reserved.

1. Introduction Gunther and Hartnell [1,2] introduced the idea of modeling a spy network by a graph whose vertices represent the stations and whose edges represent links of communication. If a station is destroyed, the adjacent stations will be betrayed so that the betrayed stations become useless to network as a whole. Therefore, instead of considering the stability of a communication network in standard sense, some new graphical parameters such as vertex-neighbor-integrity [3] and edgeneighbor-integrity [4] were introduced to measure the stability of communication networks in the “neighbor” sense. Recently, we study the spread of computer viruses in the Internet and biological viruses in the population and notice that networks in these background have a common property as that of the spy network. In order to measure the invulnerability of these networks (different from communication networks), we introduced edge-neighbor-scattering number (ENS) in [5] and vertex-neighbor-scattering number (VNS) in [6]. It is shown that the ENS and its vertex analogue (VNS) are alternative invulnerability measures of networks we mentioned above. It is well known that a network can be described by a connected graph. The common of the above parameters is that, when removing some vertices (or edges) from a graph, all of their adjacent vertices (or edges) are removed. Therefore, we call ENS and VNS neighbor invulnerability parameters.



Corresponding author. Tel.: +86 15353635611; fax: +86 2982205670. E-mail address: [email protected] (Z. Wei).

http://dx.doi.org/10.1016/j.amc.2016.02.021 0 096-30 03/© 2016 Elsevier Inc. All rights reserved.

2

Y. Liu et al. / Applied Mathematics and Computation 283 (2016) 1–5

Fig. 1. A star and the corresponding star-tree.

Let G = (V, E ) be a graph and e be an edge of G. The open edge-neighborhood of e is N (e ) = { f ∈ E (G )| f = e, e and f are adjacent}, and the closed edge-neighborhood of e is N[e] = N (e ) ∪ {e}. An edge e of G is said to be subverted when N[e] is deleted from G. In other words, if e = [u, v], then G − N[e] = G − {u, v}. An edge set X ⊆ E(G) is called an edge-subversion-strategy of G if each of the edges in X has been subverted from G. The survival subgraph is denoted by G/X. An edge subversion strategy X is called an edge-cut-strategy of G if the survival subgraph G/X is disconnected, or is a single vertex, or is φ . Let G be a connected graph. The edge-neighbor-scattering number of G is defined as ENS(G ) = max {ω (G/X ) − |X |}, where X⊆E (G )

X is any edge-cut-strategy of G, and ω(G/X) is the number of the components of G/X. We call X∗ ( ⊆ E(G)) an ENS-set of G if ENS(G ) = ω (G/X ∗ ) − |X ∗ |. We have proved that the problem of computing the ENS of a graph is NP-complete [7]. In this paper, we give a polynomial algorithm of ENS of trees –a class of special and important graphs. Throughout this paper, we use Bondy and Murty [8] for terminologies and notations not defined here. 2. Preliminaries Before proceeding, we define several concepts which will be used in the follows. Let T be a tree. A vertex v ∈ V (T ) is called an out-twig-vertex if v is adjacent to at least two 1-degree vertices and adjacent to at most one non-1-degree vertex. The set of whole out-twig-vertices of T is denoted by C(T). For v ∈ C (T ), the set of all 1-degree vertices adjacent to v is denoted by NT+ (v ). A leaf of a tree T is a vertex v ∈ V (T ) with degree 1 and the degree of its adjacent vertex is 2. Let G be a graph and e ∈ E(G). If the degree of one end-vertex of e is 1, we then call e a pendant edge. A star-tree is a tree by replace each edge of a star with stars. A star and the corresponding star-tree are shown as follows. (See Fig. 1). Let G be a graph and e ∈ E(G). The subdivision of e is such an operation that delete e from G and connect its two endvertices by an internal disjoint path with distance at least 2. If at least one edge in graph G is subdivided, then we call the resulting graph a subdivision graph of G.  Definition 1. Let F = ki=1 Ti be a forest, where Ti is the branch tree of F. Then the edge-neighbor-scattering number of F is  defined to be ENS(F ) = ki=1 ENS(Ti ). Lemma 1. Let S1∗ ,n be a subdivision graph of star S1, n . If delete all the leaves of S1∗ ,n layer by layer from outside to inside and 



denote the final star by S1,n , then ENS(S1∗ ,n ) = ENS(S1,n ) + 1 = n − 2.

Proof. It is easy to know that for any X ⊆ E (S1∗ ,n ), ω (S1∗ ,n /X ) ≤ n − 2 + |X |. Therefore, we have

ENS(S1∗ ,n ) ≤ n − 2 + |X | − |X | = n − 2. On the other hand, there exists an edge e in S1∗ ,n such that the degree of its one end-vertex is n − 1 and the degree of another end-vertex is 2. Since ω (S1∗ ,n /{e} ) = n − 1, we have

ENS(S1∗ ,n ) ≥ n − 1 − 1 = n − 2. The second equation is trivial. The proof is completed.



Lemma 2. Let T be a tree which is not isomorphic to a path or a star. If e is a pendant edge of T, then there exists an ENS-set of T, X, such that e ∈  X. Proof. Let e = uv be a pendant edge of T and d (u ) = 1. Suppose that X is an ENS-set of T, we distinguish the following cases. Case 1. d (v ) = 2. Assume another neighbor vertex of v is w. Since T is not isomorphic to a path or a star, d (w ) ≥ 2. Let    X = X − uv. If w ∈ V (T [X] ), then ω (T /X ) = ω (T /X ); if w ∈ V (T [X] ), then ω (T /X ) = ω (T /X ) + 1. Therefore, 





ω (T /X ) − |X | ≥ ω (T /X ) − |X | = ω (T /X ) − |X | + 1 = ENS(T ) + 1, a contradiction.

Y. Liu et al. / Applied Mathematics and Computation 283 (2016) 1–5

3 

Case 2. d (v ) > 2. Similar to Case 1, v has a neighbor vertex w such that d (w ) ≥ 2. If vw ∈ X, let X = X − uv. Then     ω (T /X ) = ω (T /X ) + 1, and thus we have ω (T /X ) − |X | = ω (T /X ) − |X | + 2 > ENS(T ), a contradiction. If vw ∈ X, let X =     X ∪ {vw} − {uv}. Then ω (T /X ) ≥ ω (T /X ), and thus ω (T /X ) − |X | ≥ ω (T /X ) − |X | = ENS(T ). This means that X is an ENS set of T such that e ∈ X . The proof is completed.  Lemma 3. Let T be a tree with order at least 4. If T is not isomorphic to a path and e is an edge such that the degree of both of its two end-vertices are 2, then there exists an ENS-set of T, X, such that e ∈ X. Proof. Let e = uv. Assume that x is an adjacent vertex of u and x = v, y is an adjacent vertex of v and y = u. Suppose that X  is an ENS-set of T and e ∈ X. Let X = X − {e} and T[X] be the induced subgraph of X in T.  Case 1. If x, y ∈ V(T[X]), then ω (T /X ) = ω (T /X ) + 1. Since T is not isomorphic to a path and |V(T)| ≥ 4, X must be   a neighbor-edge-cut set of T. Therefore, we have ω (T /X ) − |X | = ω (T /X ) − |X | + 2 > ENS(T ), contradicted to that X is an ENS-set of T.    Case 2. If either x ∈ V(T[X]) or y ∈ V(T[X]), then ω (T /X ) = ω (T /X ). This means that ω (T /X ) − |X | = ω (T /X ) − |X | + 1 > ENS(T ), contradicted to that X is an ENS-set of T. From the above discussion, we know that if X is an ENS-set of T and e ∈ X, then neither x ∈ V(T[X]) nor y ∈ V(T[X]).     Therefore, if X = {uv}, then ω (T /X ) = ω (T /X )) − 1 and ω (T /X ) − |X | = ω (T /X ) − |X | = ENS(T ). This implies that X is an  ENS-set of T such that e ∈ X . If X = {uv}, notice that T is not isomorphic to a path and |V(T)| ≥ 4, we then assume d(y) ≥      2. Let X = X ∪ {vy} − {e}. We have ω (T /X ) = ω (T /X )) and ω (T /X ) − |X | = ω (T /X ) − |X | = ENS(T ). Therefore, X is an  ENS-set of T such that e ∈ X . The proof is completed.  3. The main result Theorem 1. Let T be a tree which is not isomorphic to subdivision graphs of stars and C(T) = φ . Then

ENS(T ) =





(d (v ) − 2 ) + ENS(T −

v∈C (T )

N[v] ).

v∈C (T )

Proof. If T is a star with order n and its center vertex is v, then C (T ) = {v}. Notice that ENS(T ) = n − 3, d (v ) = n − 1 and T − N[v] = φ , the conclusion holds. If T is not isomorphic to stars and paths, then, by Lemma 2, T has an ENS-set X which does not contain any pendant edge. It is not difficult to see that for every v ∈ C (T ), v has unique adjacent vertex, say u, such that d(u) ≥ 2. If uv ∈ X, then the induced subgraph of {v} ∪ N + (v ) in T is a connected component of T/X and this component    is a star with order at least 3. Let X = X ∪ {uv}. It is obvious that ω (T /X ) − |X | ≥ ω (T /X ) − |X |. Therefore, uv ∈ X. Denote M = {uv|v ∈ C (T ), d (u ) ≥ 2}. Then for every edge uv ∈ M, all the 1−degree vertices adjacent to v become isolated vertex in T /{uv}. It is easy to know that the number of such vertices in T /{uv} is d (v ) − 1. Consider that T/M is a forest, and some edges in M may be adjacent, by the definition of edge-neighbor-scattering number of forest, we have

ENS(T ) =



(d (v ) − 1 ) − |E | + ENS(T −

v∈C (T )



N[v] ) =

v∈C (T )

The proof is completed.



(d (v ) − 2 ) + ENS(T −

v∈C (T )



N[v] ).

v∈C (T )

 

Theorem 2. Let T be a tree and C (T ) = φ . If delete all the leaves of T layer by layer, the resulting graph is a star-tree T and is  not a double-star, then ENS(T ) = 1 + ENS(T ). Proof. Firstly, it is not difficult to know that, for a star-tree T,

ENS(T ) =



d (v ) − 2|C (T )| =

v∈C (T )



( d ( v ) − 2 ).

v∈C (T ) 





Notice that T has at least one leaf and C (T ) = φ . Let v ∈ C (T ), U = {u|uv ∈ E (T ), dT  (u ) = 1}. Then U = φ , and there must 



exists a vertex u ∈ U such that dT (u ) = 2. Let X = {uv|v ∈ C (T ), dT  (u ) ≥ 2}. Since T is not a double-star, we have |X | = 

|C (T )|. Obviously, each component of T/X is an isolated vertex or a path and X is an ENS-set of T. Thus we have ENS(T ) = ω (T /X ) − |X | = 1 +





(d (v ) − 1 ) − |C (T )| = 1 +

v∈C (T  )





(d (v ) − 2 ) = 1 + ENS(T ),

v∈C (T  )



where 1 represents the center vertex of T , a component of T/X. The proof is completed.  

Theorem 3. Let T be a tree and C (T ) = φ . Delete all the leaves of T layer by layer, and denote the resulting graph by T . If   |V (T )| ≥ 4 and T is not a star-tree, then

ENS(T ) =



v∈C (T  )



(d (v ) − 2 ) + ENS(T −



u∈M

N + (u ) ∪ M −



v∈N

N[v] ).

4

Y. Liu et al. / Applied Mathematics and Computation 283 (2016) 1–5 





Where M = {u|u ∈ C (T ), u has at least one 2-degree adjacent vertex in T }, N = {v|v ∈ C (T ), v has not 2-degree adjacent  vertices in T }. 



Proof. Obviously, there exist leaves in T and C (T ) = φ . For any v ∈ C (T ), there must exists a vertex u ∈ N + (v ) such that T



dT (u ) = 2. Let X be an ENS-set of T. By the definition of out-twig-vertex, we distinguish the following two cases for v ∈ C (T ).  Case 1. There exists a 2-degree adjacent vertex of v in T , say w. Then dT (w ) = 2 and w = u. By Lemma 2 and the proof of Theorem 1, either uv ∈ X or wv ∈ X. If wv ∈ X, since dT (w ) = 2, ω (T /X ) = ω (T /((X − {wv} ) ∪ {uv} ). Notice that     w ∈ T /((X − {wv} ) ∪ {uv} ) but w ∈ T /X, then ω (T /((X − {wv} ) ∪ {uv} )) ≥ ω (T /X ). Therefore, we may assume uv ∈ X and there are d (v ) − 1 isolated vertex or path components in T /{uv}.  Case 2. There exist no 2-degree adjacent vertex of v in T . Then v has at least one adjacent vertex, say w, such that dT (w ) ≥ 3. Similar to Case 1, either uv ∈ X or wv ∈ X. If uv ∈ X, then ω (T /((X − {uv} ) ∪ {wv} )) > ω (T /X ) > ENS(T ), contra dicted to the assumption that X is an ENS-set of T. Therefore, wv ∈ X. Let M = {u|u ∈ C (T ), u has at least one 2-degree    adjacent vertex in T }, N = {v|v ∈ C (T ), v has not 2-degree adjacent vertices in T }. Since the vertices with degree 1 or 2  and adjacent to v in T belong to d (v ) − 1 different components of T /{wv}, and M ∪ N = C (T ), we have

ENS(T ) =



( d ( v ) − 1 ) − |M | +

v∈M

=



 u∈N 

(d (v ) − 2 ) + ENS(T −

v∈C (T  )



(d (u ) − 1 ) − |N| + ENS(T − 

N + (u ) ∪ M −

u∈M

The proof is completed.





N + (u ) ∪ M −

u∈M



N[v] )

v∈N

N[v] ).

v∈N



Based on the above conclusion, we have the following algorithm of edge-neighbor-scattering number of trees. Step 1. If T is a path, a star, a star-tree or edge subdivision of a star, then turn to Step 5; otherwise, turn to Step 2.  Step 2. If C (T ) = φ , let T1 = T − v∈C (T ) N[v]. Replace T by T1 and turn to step 1; if C (T ) = φ , then turn to Step 3. 



Step 3. Delete all leaves of T layer by layer, denote the resulting tree by T . If T is a star-tree, turn to Step 5; otherwise, turn to Step 4.    Step 4. Denote M = {u|u ∈ C (T ), u has at least one 2-degree adjacent vertex in T }, N = {v|v ∈ C (T ), v has not 2-degree     + adjacent vertices in T }. Let T1 = T − u∈M ({u} ∪ N (u )) − v∈N N[v]. Replace T by T1 , turn to step 1.  Step 5. Output ENS(T ) = v∈V (d (v ) − 2 ) + ENS(T¯ ), where V is the set of whole out-twig-vertices appeared in the above process and T¯ is the final tree when the last step stopped. By the discussion above, we know that T¯ must be a path, a star, a star-tree or edge subdivision of a star. Denote these  graphs by Pn , S1,n−1 , T∗ and S1∗ ,n−1 , respectively, then ENS(Pn ) = 1, ENS(S1,n−1 ) = n − 3, ENS(T ∗ ) = v∈C (T ∗ ) (d (v ) − 2 ) and ∗ ENS(S1,n−1 ) = n − 2. This algorithm gives an ENS-set of T at the same time. It is composed of the following three items: (1) in Step 2, all edges which are incident with an out-twig-vertex but are not incident with 1-degree vertex; (2) in Step 4, the edges in E1 = {uv|u ∈ M, dT (v ) = 2} (where T is the tree in Step 3) and E2 = {uv|u ∈ N, dT  (v ) ≥ 2}; (3) the edges in an ENS-set of the final tree. At the last, we analysis the complexity of the algorithm. Let T be a tree with order n. In Step 1, compute the degree of every vertex need n addition operations; find the maximum degree vertex need n − 1 comparison; determine that T is a graph of the four types or not need n − 1 comparisons at most. Thus, one circulation of step 1 need 3n − 2 basic operations at most. In Step 2, determine all the vertices with degree at least 3 need n comparisons; determine such a vertex is an out-twig-vertex or not need n − 1 comparisons. Since |C (T )| ≤ n3 , at most n3 (n − 1 ) + n operations are needed in this step. In Step 3, determine every 1-degree vertex is a leaf or not need at most n comparisons. It is easy to know that the number   of out-twig-vertex in T is not greater than n4 . Therefore, determine T is a star-tree or not need at most 4n comparisons, and n thus the total operations in this step are at most 4 + n. The operations in step 4 are obviously no more than n4 . From Step 1 to Step 4, the total operations are at most

3n − 2 +

n n n n2 31 (n − 1 ) + n + + n + = + n − 2. 3 4 4 3 6

It is not difficulty to know that after one circulation, the order of the resulting tree (or forest) decreases at least 8. Therefore, the whole circulation number is at most n8 and the total number of operations is no more than

n 8



n2 31 + n−2 3 6



=

1 3 31 2 1 n + n − n. 24 48 4

Therefore, we have the following conclusion. Theorem 4. Let T be a tree with order n. Then the time complexity of the above algorithm is O(n3 ). 4. Conclusions Network invulnerability is a classical problem in graph theory. Many graph parameters and invariants have been introduced to measure the invulnerability and characterize the structure of networks. However, the computing problems of the

Y. Liu et al. / Applied Mathematics and Computation 283 (2016) 1–5

5

vast majority of the parameters are NP-complete [5,9,10]. In fact, there are many opening problems in this field. It is well known that trees have special structure and wide range of applications [11,12]. This research shows that there is a polynomial algorithm of edge-neighbor-scattering number of trees. The result, therefore, has a certain theoretical and practical significance. In the future, we will continue to find good algorithms of invulnerability parameters for some special classes of graphs as well as for more general graphs. Hence, this paper can be also seen as a preliminary study for working on the latter problems. Acknowledgments This work was supported by NSFC (61403298) and NSRP (2014KRM16). The authors are grateful to the anonymous referee for valuable comments and suggestions on an earlier version of this paper. References [1] G. Gunther, B.L. Hartnell, On minimizing the effects of betrayals in a resistance movement, Proceedings of the English Manitoba Conference on Numerical Mathematics and Computing, 1978, pp. 285–306. [2] G. Gunther, On the neighbor-connectivity in regular graphs, Discret. Appl. Math. 11 (1985) 233–243. [3] M.B. Cozzens, S.-S. Y. Wu, Vertex-neighbour-integrity of trees, Ars Comb. 43 (1996) 169–180. [4] M.B. Cozzens, S.-S. Y. Wu, Edge-neighbour-integrity of trees, Aust. J. Comb. 10 (1994) 163–174. [5] Z. wei, Y. Li, J. Zhang, Edge-neighbor-scattering number of graphs, Ars Comb. 85 (2007) 271–277. [6] Z. Wei, A. Mai, M. Zhai, Vertex-neighbor-scattering number of graphs, Ars Comb. 102 (2011) 417–426. [7] Z. Wei, X. Yuan, N. Qi, Computing the edge-neighbour-scattering number of graphs, Z. Naturforschung A 68a (2013) 599–604. [8] J.A. Bondy, U.S.R. Murty, Graph Theory with Applications, Elsevier, Macmillan, New York, London, 1976. [9] J. Ma, Y. Shi, Z. Wang, J. Yue, On wiener polarity index of bicyclic networks, Sci. Rep. 6 (2016) 19066, doi:10.1038/srep19066. [10] Y. Shi, Note on two generalizations of the Randic index, Appl. Math. Comput. 265 (2015) 1019–1025. [11] L. Chen, Y. Shi, Maximal matching energy of tricyclic graphs, MATCH Commun. Math. Comput. Chem. 73 (1) (2015) 105–119. [12] S. Cao, M. Dehmer, Y. Shi, Extremality of degree-based graph entropies, Inf. Sci. 278 (2014) 22–33.