• 沒有找到結果。

2 About the network

2.1 Math and tools in the network

2.1.1 the basic structures of networks

Figure 2 : the basic structures of networks.

In the Figure 2(a), the small network is consisted of five nodes and five edges. In mathematical language, we can label these nodes by integers from1 … 𝑛. For the example above, we can replace A for 1, B for 2, and C for 3…etc. In this way, we can denote an edge between nodes 𝑖 and 𝑗 by (𝑖, 𝑗). The whole network can be represented by the value of 𝑛 and a list of all the edges. In the figure 2.1(a), the network has 𝑛 = 6 nodes and edges (1,2), (2,4), (3,4), (4,6) and(5,6). In (a), the edges have no directions. In fact, we can assign directions to edges to describe relations in networks. Like (b), the components in the network are all the same with the one in (a),but the edges have directions. The arrows denote the directions of the

edges. In (c), there are multi-edges between nodes B,D and nodes E,F. In(d), the circles on nodes D and nodes F are called self-edges.

2.1.2 Adjacency matrix

The adjacency matrix 𝑨 of a graph is the matrix with elements 𝐴𝑖𝑗 such as

1 0 if there is an edge between node j and node i

ij otherwise

A

(1)

For instance, the adjacency matrix of the network in Figure 2(a) is

0 1 0 0 0 0 matrix elements are all zero and second, the matrix is symmetric. The reason of the first property is that there is no self-edge in the network. The self-edge means an edge start and end at the same node. And the reason of the second property is the network is undirected, which means if there is an edge between 𝑖 and 𝑗, there is an edge between 𝑗 and 𝑖

For a directed network

1 0 i f t h e r e i s a n e d g e f r o m n o d e j t o n o d e i

In Figure 2(c), we may see two different cases called multiedges and self-edges. In adjacency matrix, a multiedge is represented by setting the corresponding matrix element 𝐴𝑖𝑗 equal to the multiplicity of the edge. For instance, in (c), the adjacency matrix is

If there is a self-edge on a node 𝑖, the corresponding diagonal element 𝐴𝑖𝑖 is equal to 2. This is because every self-edge has two origins and ends. Like all non-self-edges appear twice in the adjacency matrix, an edge connecting node i and node j means 𝐴𝑖𝑗 and 𝐴𝑗𝑖 are 1. If we count edges equally, self-edges will appear twice. The adjacency matrix of the network in Figure 2(d) is

0 1 0 0 0 0 represented in terms of the adjacency matrix as

1

Furthermore, in an undirected network, each edge had two ends and the sum of degrees is equal to the number of the ends of the edges in the network. if there are 𝑚 edges , then

In a directed network, degree is divided into two kind, one is in-degree, and the other is out-degree. The in-degree is the number of ingoing edges connected to a node and the out-degree is the number of the outgoing edges connected to a node.

Similar to the undirected network, in terms of the adjacency matrix, the in-degree and the out-degree can be written as

1 ingoing ends of edges or the total number of outgoing ends of edges at all nodes. That is

A path in a network is a sequence of nodes such that every successive pair of nodes in the sequence is connected by an edge in the network. In an unweighted and undirected network, the length of a path is equal to how many edges is the path composed with? Consider two nodes i and j. If there is a path from j to i via some node k, then the product 𝐴𝑖𝑘𝐴𝑘𝑗 is equal to 1, and the length of the path is 2. In this manner, the total number of paths of length 2 from j to i, via any other vertex can be written as

In Figure 2(a), which path between nodes A and F is the shortest path if the network is undirected and unweighted? Obviously, the path 𝐴 → 𝐵 → 𝐷 → 𝐹 is the shortest path between nodes A and F. The shortest path between nodes i and j, also called geodesic path, can be described as the smallest value of l such that [𝐴𝑙]𝑖𝑗>0.

We can define a “shortest path matrix ” d for a network. The element 𝑑𝑖𝑗 denotes the shortest path from node i to node j. Depending on the network is weighted or unweighted, there are several different algorithms to compute the shortest path.

Because in the study of the real cases in this paper, we focus on the unweighted and undirected networks only, only the BFS algorithms is adopted to calculate the shortest path and the largest component number in this paper.

The average shortest path length L between all pairs can be defined as

Before we talk about the clustering coefficient, recall a relation in mathematics.

For example, ifa = c and c = b then it follows a = b also, because “ = ” is transitive.

In social networks, we can ask a question like “What is the probability of my friend A also knows other one of my friends B” And we can view the question as the transitivity of the network. Because, in a network, the relation if people know each other can be expressed by if the nodes are connected by edges, we can quantify the transitivity as follow:

 global clustering coefficient

For an entire network, we can define a value to measure the probability. The value is called the global clustering coefficient C . g

n u m b e r o f c l o s e d p a t h s o f l e n g t h t w o

For a single node in a network, the local clustering coefficient is

numbers of pairs of neighbors of i that are connected number of pairs of neighbors of i betweenness of node i can be written as

betweenness of node i is the sum of the weights of all shortest paths passing through the node. There is a simple example illustrated in Figure 3. There are three shortest path between A and C. Two of them pass through B. We give each shortest path a weight 1 / 3, and the pair A and C contribute 2 / 3 to the betweenness of B.

Figure 3 : this is an undirected and unweighted network. There are three shortest path between A and C. Two of them pass through B. We give each shortest path a weight 1 / 3, and the pair A and C

contribute 2 3 to the betweenness of B.

2.1.7 Components and the largest component

In Figure 4, the network is divided into two groups. There is no path from any node in the left group to any node in the right. For example, there is no path from the node labeled 1 to the node labeled 2. A network like this is called disconnected.

Conversely, if there is a path for each pair of nodes in the network, it is connected.

In Figure 4 the two small groups are the components of the whole network.

Figure 4 : two components in a network

The largest component is the component having the most nodes in the network.

相關文件