Introduction

Complex networks have attracted growing interest in various fields of science since they can be used to describe the structure and physical properties of many real complex systems1,2,3,4,5. The small-world6 and the scale-free7 have been shown as two fundamental properties of complex networks. Recently, fractal and self-similarity properties of complex networks have attracted much attention, since Song et al. found that a variety of real complex networks exist self-similarity property8. Especially, the box-covering algorithm is applied to calculate the fractal dimension of many real networks9.

Though the box-covering algorithm for the complex networks is extensively studied by researchers10,11,12,13,14,15, existing works mainly focus on dealing with the fractal dimension of unweighted networks. In the traditional box-covering algorithm for complex networks (BCAN), a box size is given in terms of the network distance, which corresponds to the number of edges on the shortest path between two nodes. This means the sizes of these boxed are the integers from 1 to the size of the network. However, the values of edge-weights in weighted networks could be any real numbers excluding zero. For weighted networks, enough numbers of boxes are not been obtained by BCAN. Even the number of box is always one when the size of the weighted network less than one. Thus, using the BCAN to calculate the accurate fractal dimension of weighted networks is unfeasible. Actually, many real-world networks are weighted ones16,17,18,19,20,21. Some definitions in unweighted networks are extended to weighted networks22,23,24,25, and some relevant properties and methods of weighted networks are proposed26,27,28,29,30,31,32,33. We believe that the fractal property of weighted networks can be revealed34,35. In this paper, an improved box-covering algorithm for weighted networks (BCANw) is proposed.

In what follows, we describe the proposed methodology, depict the diversity between BCAN and BCANw, calculate fractal dimension of weighed fractal model such as the “Sierpinski” weighted fractal networks, and apply BCANw to analysis the fractal properties of some real weighted networks.

Results

BCANw for unweighted networks

For unweighted network, both BCANw and BCAN are the same method. The fractal dimension of unweighted networks by using the BCANw is same as that by using the BCAN. For example, a unweighted network such as the E.coli network with 2859 proteins and 6890 interactions is considered15. The correlations between box size (lB) and number of box (NB) by using BCAN and BCANw are shown in Figure (1). By means of the least square, the fractal dimension of the E.coli network is obtained as follows

where dB(w) and dB represent the fractal dimension of complex network by using BCANw and BCAN, respectively.

Figure 1: Fractal scaling analysis of the E.coli network.
figure 1

Symbols refer to: + and * indicate the relationship between minimal number of box and box size by using BCAN and by using BCANw, respectively. By means of the least square fit, the reference line has slope −3.351, i.e. dB = dB(w) = 3.351.

From Figure (1), the result of BCANw is same as the result of BCAN. The fractal dimension of this network are 3.45 ± 0.10 and 3.50 in the Ref. 15 and Ref. 9 respectively. Our results almost matched the results given in Refs. 9, 15

BCANw for weighted networks

To further check the validity of our algorithm, we first apply our method to the “Sierpinski” weighted fractal networks in Figure (2)28.

Figure 2: The “Sierpinski” weighted fractal networks, s = 3, f = 1/2.
figure 2

From the left to the right G1, G2 and G3. G1 is composed by 4 nodes and 3 edges, G2 and G3 are built by IFS once and twice, respectively. The thicker line, the larger weight. The fractal dimension of the “Sierpinski” weighted fractal networks is log3/log2 ~ 1.5850.

The weighted fractal networks are built by Iterated Function Systems31, IFS for short, whose Hausdorff dimension is completely characterized by two main parameters, the number of copies s > 1 and the scaling factor 0 < f < 1 of the IFS. In Figure (2), the fractal dimension of the weighted fractal network is called similarity dimension, and given as follows28

In general, the edge-weights of G1 equal to one in Figure (2). The “Sierpinski” weighted fractal network G7 with 3280 nodes and 3279 edges is considered. The edge-weights of G7 are equal to 1, 1/2, 1/4, 1/8, 1/16, 1/32 and 1/64, respectively. The diameter of G7 is less than 4. Thus, numbers of boxes are 10, 3, 3 and 1 when the boxes sizes are 1, 2, 3 and 4 respectively by using the BCAN. In this case, the accurate fractal dimension of G7 is not obtained because there are so few valid statistical cases. More dots are given by using BCANw. Fractal scaling analysis of G7 is shown in Figure (3).

Figure 3: Fractal scaling analysis of the finite approximation G7 with 3280 nodes and 3279 edges of the “Sierpinski” weighted fractal networks.
figure 3

Symbols refer to: * and + indicate the relationship between number of box and box size by using BCAN and by using BCANw, respectively. By means of the least square fit, the reference line has slope −1.4489.

From Figure (3), by means of the least square fit, the reference line has slope −1.4489, i.e. the fractal dimension of G7 is 1.4489. The result of our method is closer to the similarity dimension of the “Sierpinski” weighted fractal networks in Ref. 28.

In the “Sierpinski” weighted fractal networks, the edge-weight is only a number without obvious physical meaning. Thus, the shortest path is the measure of finding a path between two nodes such that the sum of values of its edge-weights is minimized24. In real weighted networks, however, we can face two opposite cases. The first case appears in this way: the higher edge-weight is, the further distance is. For instances, the edge-weight is represented by Euclidean distance between two cities in real city network and the edge-weight is only a number without physical meaning in the “Sierpinski” weighted fractal networks. The other case is reversed. The bigger edge-weight is, the less distance is. For instance, the edge-weight corresponds to the number of seats available on the scheduled flights in the airline network. Thus, for weighted networks, the shortest path between node i and node j is denoted by dij, and defined as follows

where wij is the edge-weight between nodes i and j connected directly, are IDs of nodes, and p is a real number. The higher weight is, the further distance is (p > 0). The higher weight is, the less distance is (p < 0). Especially, the definition is same as the definition of shortest path in the unweighted network24 if p equal to zero. In this section, collaboration network such as the Scientific collaboration network23, biological networks such as the C.elegans network6, and information network such as the USAir97 network (http://vlado.fmf.unilj.si/pub/networks/data/), are considered.

The edge-weight of the Scientific collaboration network with 1589 nodes and 2742 edges, is given as follows23

where nk is number of co-author of the kth paper (excluding single authored papers), is defined as 1 when the ith scientist is one of the co-author of the kth paper, and 0 otherwise. The values of edge-weights are various, such as 0.0526316, 0.1111, 1.5333, 1, etc. If two persons share many papers, the weight is higher, the distance is less. Thus, p should be a negative number in Equation (1). For instance, the value of p equals to −1 in Ref. 23 The unweighted (i.e. all edge-weights equal to one) and the weighted network of Scientific collaboration network are considered. Fractal scaling analysis of these networks is shown in a) of Figure (4). From a) of Figure (4), the fractal dimension of unweighted Scientific collaboration network is less than the fractal dimension of weighted Scientific collaboration network. The fractal dimension of unweighted Scientific collaboration network and the weighted Scientific collaboration network using BCAw are 0.173 and 0.376 respectively. The value of fractal dimension respond to changes in edge-weight. In weighted Scientific collaboration network, the fractal dimension by using BCAN is almost consistent with the fractal dimension by using BCANw.

Figure 4: Fractal scaling analysis of real weighted networks.
figure 4

Fractal scaling analysis of the Scientific collaboration network, the C.elegans network and the USAir97 network are shown in (a), (b) and (c) respectively. Symbols refer to: + and * indicate the relationship between minimal number of box and box size by using BCAN and by using BCANw respectively; . indicates the the relationship between minimal number of box and box size of unweighted network, i. e., p = 0.

For the C.elegans network with 306 nodes and 2148 edges, the edge-weights are the numbers of synapses and gap junctions6. The higher weight is, the less distance is. The shortest path is obtained by Equation (1) when p < 0. Fractal scaling analysis of the C.elegans network is shown in b) of Figure (4). From b) of Figure (4), the dots of the relationship between minimal number of box and box size are too little to have statistical power using BCAN. It indicates that is unfeasible using the BCAN to calculate the accurate fractal dimension of this network. The more numbers of it are obtained by BCANw, and the fractal dimension of weighted C.elegans is 0.785. And that, the fractal scaling law of unweighted C.elegans network is obvious, and the fractal dimension of unweighted C.elegans network is 1.704. The fractal dimension of unweighted C.elegans network is more than the fractal dimension of weighted C.elegans network network. It is different with the Scientific collaboration network.

For the USAir97 network (network of direct flight connections between US airports) with 332 nodes and 2126 edges, the edge-weight corresponds to the number of seats available on the scheduled flights(in million/year). The shortest path is obtained by Equation (1) when p < 0. Fractal scaling analysis of the USAir97 network is shown in c) of Figure (4). The minimum box number is always one because the diameter of the weighted USAir97 network is 0.97 by using BCAN. Thus, the BCAN is useless for the weighted USAir97 network. However, from c) of Figure (4), the number of minimum box is 119 by using BCANw. The fractal dimension of the unweighted USAir97 network and weighted USAir97 network are 3.09 and 1.075 respectively. The fractal dimension of the unweighted USAir97 network is more than the weighted USAir97 network.

From what have been studied above, the fractal phenomena of weighted network even is not found such as the weighted USAir97 network by using BCAN. Nevertheless, fractal property of this network is revealed by using BCANw. In a word, BCANw method is better suited than BCAN method for fractal scaling analysis of weighted networks. And that the fractal dimension is influenced by the edge-weight of weighted network. The fractal dimension of unweighted case is more than the fractal dimension of weighted case for the C.elegans network and USAir97 network. It is the opposite way for the Scientific collaboration network.

Fractal dimension and edge-weight for weighted networks

In unweighted networks, the fractal dimension is determined only by the topology of network. However, in weighted networks, the fractal dimension is affected by edge-weight except the topology of weighted network. In the section, the relationship between fractal dimension and edge-weight of these real weighted networks are discussed. Some interest results are found when relationships between values of fractal dimension and values of p are considered. The fractal dimensions of different values of p are computed and shown in Figure (5) for these real weighted networks.

Figure 5: The relationships between values of fractal dimension and values of p.
figure 5

Value of p is increased by 0.2 at each step from −3 to 3. There approximate curves of symmetrical are obtained. Symbols refer to: ., *, and + indicate the relationship between the fractal dimension and p of the C.elegans network, Scientific collaboration network and USAir97 network, respectively. |dB(w)(p) − dB(w)(−p)| < 0.2, dB(w)(p) represents the value of fractal dimension of p.

Let dB(wi)(pk) represents the value of fractal dimension when p = pk and w = wi, we have 0 < |dB(wi)(pk) − dB(wi)(−pk)| < 0.2. It includes two meanings: on the one hand, fractal dimension has no strictly equal value when p is negated; On the other hand, the values of fractal dimensions are almost symmetric about the vertical, about zero. From Figure (5), the special values of fractal dimensions of p = 0 are always obtained, which illustrates the fractal character have different between unweighted network and weighted network for given topology. The C.elegans network and the USAir97 network have large variations of fractal dimension in three networks. The value of fractal dimension decreases with increasing the absolute value of p in the C.elegans network and the USAir97 network. However, the difference is not significant in the Scientific collaboration network. And that, the value of fractal dimension increase with increasing the absolute value of p (−1, 1) in the Scientific collaboration network. To determine the effects of edge-weights on fractal of weighted networks, the C.elegans network and the USAir97 network with variation edge-weight are considered. For the USAir97 network, two cases are considered. One is the value of edge-weights' distributions is uniformed (u(0,1)), denoted as w(u). The other is the value of edge-weights times ten based on w(u), denoted as w(u). These relationships between dB(w) and p are shown in a) of Figure (6). For the C.elegans network, the raw edge-weights times ten, denoted as w, is considered. The relationships between dB(w) and p are shown in b) of Figure (6).

Figure 6: The effects of edge-weights on fractal of weighted networks.
figure 6

(a): For the USAir97 network, the value of edge-weights' distributions are changed as uniformed (u(0,1)), denoted as w(u), and w(u) times ten denoted as w(u′). Symbols refer to: ., +, and * indicate the relationship between the fractal dimension and p of raw date, w(u) and w(u′), respectively. (b)For the C.elegans network, the value of edge-weights times ten based on raw date, denoted as w′. Symbols refer to: . and + indicate the relationship between the fractal dimension and p of raw date and w′, respectively.

From Figure (6), the values of fractal dimensions are almost symmetric about the vertical, about zero although distributions of edge-weights are different. And that, the values of fractal dimensions are changed although the values of edge-weights magnified same times. Why are the fractal dimensions almost symmetric for weighted networks? In Ref. 36, the metastrengths defined by , where q is a real number. The distribution function of metastrengths is almost symmetric about value of p36. By analogy, the distribution of edge-weights of weighted networks is consider in these real networks. The number of wi is denoted by m(wi). We have , i.e. the number of wi is not changed with different values of p. The probability of edge-weights is given for any p as follows

where represent the probability of edge-weight with . And that, the edge-weights are broken symmetry with the values of p are opposite. For instance, the minimum values will change as the maximum values when the values of p are opposite. Thus, the distribution of edge-weights of weighted networks is symmetric about p with opposite values. The symmetry variation of edge-weights is the major causes of symmetry variation of fractal dimension. However, the fractal dimension has no strictly equal values when p is negated. In fact, the fractal dimension is affected by other variations too. For instance, the shortest paths have many variations with p changing. In unweighted network, the shortest path between any two nodes are determined only by topology of network. However, in weighted network, the shortest path is affected by edge-weights between two nodes except topology of weighted network. In Equation (1), the shortest path is determined by the value of p. The change of the shortest path has no regulation based on the non-linear change of edge-weight. Two examples are given and shown in Figure (7).

Figure 7: The shortest path is changed with value of p.
figure 7

(a) The shortest path between node A and B is path ACB or path ADB in left map (p = 1 in Equation (1)). The shortest path is changed as path ACB when p = 2 or p = −2. (b) The shortest path between node A and B is path ADB in the original map. The shortest path is not changed when the obtained weight edges square value are represented as weight edges (i.e., p = 2). However, the shortest path is changed as path ACB when p = −2.

From Figure (7), the shortest path may be changed when the weight edge is changed. The shortest path is always same path whether p = 2 or p = −2 in a) of Figure (7). However, the shortest path is changed between p = 2 and p = −2 from b) of Figure (7). The shortest paths have different variation in a weighted networks when p has opposite values. In word, the change of the shortest path is complicated for weighted networks. Thus, the fractal dimension has no strictly equal values although p is negated.

Discussion

The fractal characteristics of unweighted networks are studied recently, their fractal dimensions are usually computed by using BCAN method. However, BCAN is not applicable for weighted networks. In this paper, BCANw is generalized for weighted networks. The most important difference between the BCAN and BCANw is that the initial box size is not one and not increased by one in the BCANw. In BCANw, the box size is obtained by accumulating the value of distance between two nodes connected directly. It can directly calculate the fractal dimension of weighted networks, and more corresponding points between box size and number are obtained. In order to avoided random selection processes, the order of graph-coloring algorithm is obtained by descending order according to the node strength in BCANw method. The computational results of real networks and the “Sierpinski” weighted fractal networks show that the proposed method is efficient and flexible.

The fractal dimensions of weighted network is determined by topology and edge-weight of weighted network. The fractal dimension depends strongly on the definition of the metrics based on the weight. Our present work shows edge-weights can change the value of the fractal dimension. For weighted networks, edge-weight can be divided into two classes: the higher weights is, the further distance is; the higher weights is, the less distance is. Thus, distances between any two nodes is proposed by Equation (1). The two aspects of relationship between weights and distance are represented by positive and negative number, respectively. A non-line relationship between the shortest path and the edge-weight are obtained by Equation (1). The influence of fractal dimension based on the changing of edge-weight is different for different network. However, our results show the fractal dimensions of these real weighted networks have almost symmetry.

Methods

For given complex network G = (N, V) and , , where n is the total number of nodes, and m is the total number of edges. G is defined as unweighted network when the cell of edge is defined as 1 if node i is connected to node j, and 0 otherwise. G is defined as weighted network if values of edge-weights (wij) could be any real numbers excluding zero if node i is connected to node j, and 0 otherwise22,33. Degree has generally been extended to the sum of weights when analyzing weighted networks and this measure has been defined as follows

Definition 0.1.22 [node strength] Denoting si as the strength of node i, which satisfies

where i is the focal node, and j represents all other nodes.

The shortest path is the measure of finding a path between two nodes in complex network such that the sum of values of its edges is minimized24. For unweighted networks, the shortest path is defined as follows

Definition 0.2.24 [the shortest path in the unweighted networks] Denoting dij as the shortest path of between node i and node j, which satisfies

For weighted networks, the shortest path is defined as Equation (1) (p = 1).

Question of BCAN for weighted networks

Weighted networks have different edge-weights, which can be non-integers. Thus, the shortest path may be non-integers too. It is possible that the maximum of shortest path is less than one. In this case, the minimum number of boxes is obviously always one. For example, the weighted network W1 is considered and shown in a) of Figure (8).

Figure 8: Idea of the BCANw.
figure 8

(a) A weighted network W1 with 6 nodes and 6 edges. The shortest path of W1 is given by equation 1(p = 1). (b) A weighted W2 is obtained when node i is connected to node j with in W1. (c) Graph-coloring algorithm bases on the strength of nodes for W2. Assigning color of nodes 3–5 is same as color of node 2 because the strength of node 2 is maximum. (d) As one color for one box, the minimum number of box of W1 is obtained, and is three.

Suppose p = 1 in Equation (1), values of the shortest path of the network W1 are obtained. We have, max(dij) = 0.95 < 1. In this case, the minimum number of box is a constant for any lB ≥ 1 in BCAN method. The fractal dimension of W1 can not be obtained. There is an easy and simple way that the values of edge-weights multiply by a same constant so that the edge-weights can always be integral numbers when the maximum distance between two nodes is less than one. Unfortunately, based on the edge-weights of originality and computational complexity, increasing the edge-weights is inappropriate in that way. The chief reason is that the fractal dimension will change with edge-weights times a constant. For instance, this case is shown in Figure (6). And that, the edge-weights of a real network are defined according to their practical implications.

BCANw method

In BCANw method, values of the box size neither increase by one in turn nor the initial value equals one and they are obtained by accumulating the value of distance until the value is more than the value of . For example, in the network W1, the value of lB is obtained from 0.05, 0.05 + 0.1 = 0.15, 0.15 + 0.3 = 0.45, 0.45 + 0.4 = 0.85 until 0.85 + 0.5 = 1.35 > 0.95. Idea of the BCANw is shown in Figure (8). Let lB = 0.85 in the network W1, a new weighted network W2 is obtained when node i is connected to node j with in network W1, and shown in b) of Figure (8). For the modified BCAN method, graph-coloring algorithm is based on the degree of nodes in Ref. 13 Similarly, graph coloring is based on the strength of node for weighted networks. Using Equation (3), the nodes strength of W2 are obtained. We have

According to the rules of graph-coloring algorithm, nodes 1, 2 and 6 have different colors, and the color of nodes 3–5 is same, and it is randomly the same as one of nodes 1, 2 and 6. In our method, the order of graph coloring is given by descending order based on the strength of nodes. Thus, assigning color of nodes 3–5 is the same as color of node 2 as shown in c) of Figure (8). Finally, as one color for one box, the number of box is obtained. From c) of Figure (8), NB = 3. The box covering is shown in d) of Figure (8).