Journal of Applied Mathematics

Volume 2015 (2015), Article ID 580361, 9 pages

http://dx.doi.org/10.1155/2015/580361

## Computing Assortative Mixing by Degree with the -Metric in Networks Using Linear Programming

^{1}University of Amsterdam, Weesperplein 4, 1018 XA Amsterdam, Netherlands^{2}Tilburg University, Warandelaan 2, 5037 AB Tilburg, Netherlands

Received 13 May 2014; Accepted 8 February 2015

Academic Editor: Frank Werner

Copyright © 2015 Lourens J. Waldorp and Verena D. Schmittmann. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Calculation of assortative mixing by degree in networks indicates whether nodes with similar degree are connected to each other. In networks with scale-free distribution high values of assortative mixing by degree can be an indication of a hub-like core in networks. Degree correlation has generally been used to measure assortative mixing of a network. But it has been shown that degree correlation cannot always distinguish properly between different networks with nodes that have the same degrees. The so-called -metric has been shown to be a better choice to calculate assortative mixing. The -metric is normalized with respect to the class of networks without self-loops, multiple edges, and multiple components, while degree correlation is always normalized with respect to unrestricted networks, where self-loops, multiple edges, and multiple components are allowed. The challenge in computing the normalized -metric is in obtaining the minimum and maximum value within a specific class of networks. We show that this can be solved by using linear programming. We use Lagrangian relaxation and the subgradient algorithm to obtain a solution to the -metric problem. Several examples are given to illustrate the principles and some simulations indicate that the solutions are generally accurate.

#### 1. Introduction

Assortative mixing by node degree (i.e., the number of connections of a node) is the tendency of nodes to be connected to other nodes of similar degree and an important concept in network analysis [1–3]. For example, assortative mixing in social networks could reflect the notion that well-connected people, who know many people, have a tendency to know mainly other well-connected people [4]. Or in a network of actors, where connections indicate that actors worked together on a film, actors with many connections are likely to have worked together with other well-connected actors [5]. As a final example, in symptom networks in psychopathology, where connections represent symptoms belonging to the same disorder, it appears that core symptoms, which are common to multiple disorders, have a high tendency to be mutually connected [6]. Assortative mixing is becoming more and more important, because it points to relevant network characteristics, such as self-similarity and other emergent properties, if it is detected in networks with a power-law degree distribution [1, 7]. Here we propose to compute assortative mixing in undirected networks using linear programming.

Several measures of assortative mixing for undirected graphs exist [5]. One of the most popular ones is the Pearson assortativity coefficient, or degree correlation [1], which is Pearson’s correlation applied to the degrees of each node in the network. Degree correlation is a normalized metric and obtains values between and . However, Alderson and Li [8] have shown that the same value of degree correlation can occur from very different configurations of edges (topology) of a network and that the use of degree correlation may lead to incorrect conclusions. The reason for this is that degree correlation is normalized with respect to general networks with a specific degree sequence (number of connections for all nodes) that can have multiple edges, self-loops and can even be disconnected (i.e., consist of multiple disconnected components). However, in many situations the objective is to compare assortativity with networks that are similar, that is, that are connected and simple (no self-loops, connected, and no multiple edges). To remedy this objection to degree correlation, Li et al. [9] proposed the -metric (first called -metric and later -metric), which is a linear transformation of the degree correlation. In the normalized version of the -metric, normalization is calculated with the maximal and minimal values of with respect to the class of networks that have the desired properties of connectedness and simplicity for the specified degree sequence. The minimal () and maximal () possible values of in the class of simple and connected networks with the same degree sequence are compared to the obtained -value for the network at hand. Then, in contrast to the degree correlation coefficient which is normalized with respect to unrestricted networks of the same degree sequence, the normalized -metric is obtained by comparing of the network under consideration to similar networks that are within the same class of networks of the same degree sequence yet are maximal () or minimal () with respect to assortative mixing.

Obtaining the maximal and minimal network in the class of simple (undirected networks without self-loops and no multiple edges) and connected networks with the same degree sequence is not trivial [8]. The algorithm introduced in Alderson and Li [8] and described in van Mieghem et al. [2] ranks all edges according to the product of degrees of the pair of nodes and then connects nodes according to a nodes degree such that the graph is connected. Unfortunately, this algorithm does not always achieve the exact degree sequence as desired. Alternatively, van Mieghem et al. [2] proposed a rewiring approach increasing (or decreasing) the assortativity, while the degree sequence remains unchanged. The constraint of a connected graph here is sacrificed, however, resulting in possibly disconnected graphs. We propose to use a linear program (LP) to identify and . Obtaining the minimum and maximum value of within the class of graphs with a specific degree sequence that are simple and connected is formulated as a binary integer program (BIP). A binary integer program is a program to optimize a linear objective function given certain linear constraints for a binary (0/1) solution (e.g., [10, 11]). Here the objective function to be optimized is and the constraints are that the optimal graph is simple and connected and has the specified degree sequence. The -metric problem resembles the traveling salesman problem (e.g., [12]), except that the degree constraints can be different from value 2. As a consequence we cannot use the approach of Held and Karp [13], where the problem is reformulated to a 1-tree problem and was shown to lead under certain circumstances to a linear program with the same solution as the binary integer problem. We prove a weaker result that leads to an efficient solution of the problem by moving the degree constraints to a penalty term in the optimization (Lagrangian relaxation), which is solved by a subgradient algorithm.

#### 2. Correlation and the -Metric

Let be an undirected graph, where is the set of nodes and is the set of edges with size . The degree sequence of graph is the vector containing for each node the number of connections and the degrees of the nodes in . The degrees are not necessarily ascending or descending. We are mostly interested in simple connected graphs, that is, no self-loops and no multiple edges with a single component. This class of graphs with degree sequence is denoted by . The unconstrained class of graphs with self-loops, multiple edges, and possibly multiple components having degree sequence is denoted by . It is immediate that .

The degree correlation or assortative mixing of an undirected graph is defined in terms of the degree sequence as [1, 8] It is equivalent to the Pearson correlation coefficient and its value is between . The first term in the numerator calculates assortativity by degree for the graph [7]. The first term in the denominator can be interpreted as the maximal value for assortative mixing that can be obtained within the class of graphs that may have multiple connections and self-loops and need not be connected in . The second term in the numerator and in the denominator can be seen as the central point in the class of graphs in with minimal assortativity [8]. Hence, the Pearson degree correlation or assortativity can be considered as the normalized assortativity within the general class of graphs that may contain self-loops and multiple edges and need not be connected that are in (see the discussion on p. 502 of Li et al. [7] for more details).

Another insightful way of considering the degree correlation is given by van Mieghem et al. [2]. Let be the symmetric adjacency matrix with a 1 if two nodes are connected and 0 otherwise, and let be a diagonal matrix with the degrees on the diagonal and zero otherwise. The matrix is called the Laplacian matrix. Then it is shown that the degree correlation is From this version of degree correlation, it is easily seen that a regular graph has degree correlation , since all degrees are equal. Additionally, it is shown in van Mieghem et al. [2] that a connected Erdös-Renyi random graph has zero assortativity.

For a graph the -metric is defined by [7, 9] It is clear from its definition that the -metric can obtain values between and for the complete graph of size , . It is therefore convenient to normalize the -metric such that it obtains values between and . The normalized -metric of graph is defined by [7, 9] where and refer to the minimal or maximal value of in a specific class, like . The value of the normalized -metric is between . The first term in the nominator of is , which is the same as that of degree correlation above. The difference between and is the normalization. The -metric is normalized with respect to the maximum and minimum obtainable in a specific class, whereas degree correlation is always normalized by the central and maximal values of assortativity by degree within the general class of graphs having self-loops, multiple connections and being possibly disconnected in .

*Example 1. *We generated two topologically different graphs, shown in Figure 1. The first graph, shown in Figure 1(a), has nodes, edges, and ascending degree sequence . The other graph in Figure 1(b) has nodes, edges, and ascending degree sequence . The networks have similar degree sequence but the topology is different, as can be seen in Figure 1. However, both networks have approximately zero degree correlation (assortativity), and , respectively. This suggests that the networks are similar in topology. The normalized -metric does pick up the topological differences. The values of the normalized -metric are and , respectively, indicating that the networks can be correctly distinguished and may have a hub-like core. The values of are higher because the normalization is made within the class of simple, connected graphs, whereas the correlation coefficient is approximately zero with respect to normalization within the general class of graphs with self-loops and multiple connections that are possibly disconnected. This example shows that there are differences in degree sequence of a connected graph that are not picked up at all by degree correlation but are picked by the -metric; and the reason for this is that the normalization for the -metric is within whereas the normalization of the correlation is within the larger class .