THE FRIENDSHIP PARADOX FOR WEIGHTED AND DIRECTED NETWORKS

BY

HONGYI JIANG

A Thesis Submitted to the Graduate Faculty of

WAKE FOREST UNIVERSITY GRADUATE SCHOOL OF ARTS AND SCIENCES

in Partial Fulfillment of the Requirements

for the of

MASTER OF ARTS

Mathematics and Statistics

August 2017

Winston-Salem, North Carolina

Approved By:

Kenneth S. Berenhaut, Ph.D., Advisor

Miaohua Jiang, Ph.D., Chair John Gemmer, Ph.D. Staci Hepler, Ph.D. Acknowledgments

The work presented here could not be achieved without a great deal of support. Firstly, I want to share my greatest thanks to my mentor, Kenneth S. Berenhaut, who was always with me during the whole processes of the research and my entire Master studies. I feel very fortunate to be your student and have those brainstorms with you which produced lots of brilliant ideas. I would also like to thank Dr. Staci Hepler. I really appreciate your consistent encouragement, support and trust. I learned a lot while taking your classes and working as your TA. In addition, I benefit much from Dr. Erhardt Robert’s challenging time series class and the discussion with Dr. John Gemmer about research. I would like to extend my thanks to Dr. Stephen Robinson and Dr. Mauricio Rivas since your analysis classes are two of the best analysis classes I have ever taken, which deepened my understanding toward analysis. Also, thanks to Dr. Jennifer Erway who taught me my first optimization class, which would be very helpful to my future career. I am grateful to Mrs. Jule Connolly for her support in my work as teaching assistant and tutoring, and to Dr. Miaohua Jiang for his valuable guidance during my transition to studying and living abroad. I appreciate the friendliness and help from all the graduate students, faculty and staff in the department. You make me feel at home when I study at Wake. Finally I greatly appreciate my parents’ and other family members’ love to me, as a child far from the whole family.

ii Table of Contents

Acknowledgments ...... ii

Abstract ...... v

List of Tables ...... vi

List of Figures ...... vii

Chapter 1 Introduction ...... 1 1.1 Terms and Definitions ...... 1 1.2 Historical Background ...... 4 1.2.1 Applications of the Friendship Paradox ...... 6 1.3 Overview of Results ...... 8 1.4 Organization of the thesis ...... 9

Bibliography ...... 11

Chapter 2 The friendship paradox for weighted and directed networks ...... 14 2.1 Introduction ...... 15 2.2 Directed networks ...... 19

Bibliography ...... 25

Chapter 3 Future Directions ...... 30

Appendix A The degree-wise effect of a second step for a random walk on a graph...... 31 A.1 Introduction ...... 32 A.2 Proof of Theorem A.3 ...... 35

Bibliography ...... 44

Appendix B A new look at clustering coefficients with generalization to weighted and multi-faction networks ...... 48 B.1 Introduction ...... 49 B.2 Weighted networks ...... 54

iii B.3 Clustering for node subsets of interest ...... 61 B.3.1 Two-mode networks ...... 63

B.4 Computing values of γv ...... 69 B.5 Applications ...... 73 B.6 Conclusion ...... 82

Bibliography ...... 83 B.7 Appendix ...... 90

Curriculum Vitae ...... 94

iv Abstract

Hongyi Jiang

This thesis studies the friendship paradox for weighted and directed networks, from a probabilistic perspective. We consolidate and extend recent results of Cao and Ross and Kramer, Cutler and Radcliffe, to weighted networks. Friendship paradox results for directed networks are given; connections to detailed balance are considered.

v List of Tables

B.1 The values of γv(G, S) (to two decimal places) for each node (employing the appropriate set S for the node v, so that v ∈ S), in each of the two graphs in Figure B.3. The average values γG(P) are 0.7158 (left) and 0.9876 (right)...... 63 B.2 Local clustering values for women in the Southern Women data set. ∗ 0 0 0 0 Here γev = (γv − me (k, k ))/(Mf(k, k ) − me (k, k )), where me (k, k ) and Mf(k, k0)) are as in (B.46) and (B.48), respectively. The two-mode LCC is calculated as in [1], for comparison...... 75 B.3 Sizes of the primary node set, secondary node sets and edge set for the two-mode networks considered in Tables B.4 and B.5. The Nor- wegian Directors network (see [2]) consists of 1495 directors connected to 367 companies on whose boards they served (the largest connected component consists of 818 directors). The US Supreme Court network consists of 9 justices connected to 24 cases, with an edge between a jus- tice and a case whenever the justice voted in the minority for that case [3]. The Scotland network is comprised of 131 directors and 86 joint- stock companies in early 20th century Scotland [4]. The St. Louis Crime network consists of 754 suspects for 509 crimes in 1990’s St. Louis, Missouri, USA [5]. The CEO’s and Clubs network consists of 26 CEO’s and the 15 clubs of which they were members [6], see also [7]. The Authors and Papers network is a collaboration network comprised of 86 authors and 167 papers [8]...... 76 B.4 The mean clustering values for some two-mode networks. Here for a subset S ⊆ V , γG(S) is the mean value of γv(G, S) over all v ∈ S and for P P a partition P = {S1,S2}, γG(P) is the mean value ( S∈P v∈S γv(S))/n. 77 ∗ B.5 Global clustering values for some two-mode networks. Here γfG is the ∗ mean value of γev over all v ∈ S (the three values in parentheses indicate 0 0 values when, for nodes for which me (k, k ) = Mf(k, k ), the correspond- ∗ ing γev values are treated as zero, or one, or are excluded in computing the mean, respectively). GCCO is calculated as in [1], GCCR is calcu- lated as in [9], and the value for P rojected is the one-mode clustering coefficient as in (B.3) for the corresponding projected network. . . . . 77 B.6 Global and subset clustering coefficients for some multi-faction networks. 80

vi List of Figures

2.1 Two five-node directed networks. In-degrees are indicated adjacent to the corresponding nodes. The constants along edges in (a) indicate multiple edges...... 19

A.1 Two six-node networks. Degrees are indicated adjacent to the corre- sponding nodes...... 34 A.2 (a) gives configuration types leading to a positive value for P(X0 ∈ + + − S ,X1 ∈ S ,X2 ∈ S ). Nodes on the left and right are assumed to be in S− and S+, respectively. (b) gives configuration types leading to a − + − positive value for P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ). The configurations corresponding to (A.16), (A.17), (A.21), (A.22) and (B.14) are given in A, B, C, D and E, respectively...... 38

B.1 A simple five-node network...... 52 B.2 A simple weighted graph...... 56 B.3 A small (left), and its corresponding weighted pro- jection (right), with weights as in (B.21)...... 57 B.4 A simple five-node , with weights indicated adjacent to the corresponding edge...... 59 B.5 Two ten-node networks, each partitioned into two subsets, one of size four (white) and one of size six (grey)...... 62 B.6 Configurations in the ego network of node 1 with γ1 = me (4, 7) = 372/361 (left) and γ1 = Mf(4, 7) = 16/5 (right). Here p = 1 and r = 3 in (B.48)...... 65 0 0 B.7 The conjectured enveloping values me (k, k ) and Mf(k, k ) in (B.46) and (B.48), for 2 ≤ k ≤ 10 and 2 ≤ k0 ≤ 20...... 66 B.8 Two small two-mode networks, with primary and secondary node sets of size eight and four, respectively...... 68 B.9 Two simple two-mode networks with three individuals and three events. 69 B.10 A small seven-node network with selected subset S = {1, 2, 3, 4}.... 71 B.11 The Davis Southern Women network. The events are denoted E1 through E14...... 74 B.12 The ego networks of women, Charlotte and Olivia, from the Davis Southern Women network...... 75

vii B.13 Comparison of local clustering coefficients against (weighted) degree for four weighted networks. Where appropriate, a log-scale has been used for degree. Clustering coefficients are computed as a function of vertex strengths, for Barrat’s coefficient with arithmetic mean (◦), Barrat’s coefficient with geometric mean (4), the coefficient of Zhang ∗ and Horvath [10] (+), the coefficient of Onnela et al [11] (2) and 1−γv , as in (B.26) (∗). Note that in each case (undefined) coefficient values for nodes with only one neighbour have been excluded...... 79 B.14 The 34-node and 78-edge two-faction karate of Zachary [12]. The nodes represent members of a karate club and edges are determined according to interactions outside the club. A conflict arose within the group leading to allegiances as indicated...... 81 B.15 A network of friendship choices in a school [13]. Top left is partitioned by race; top right is partitioned by gender and bottom is partitioned by grade (7–8 and 9–12)...... 81

viii Chapter 1: Introduction

The friendship paradox, introduced widely by Feld in [6], states roughly that, in a network scenario, one’s neighbours have (on average) more neighbours than oneself. The result has recently been employed to advantage in epidemic detection and more general sampling scenarios (see [3, 2, 8, 5, 13, 9, 19]), and has received considerable attention from scientists across disciplines. For a recent discussion of societal welfare implications see [11].

This thesis firstly studies the friendship paradox for weighted networks. We consol- idate and extend recent results of Cao and Ross [1] and Kramer, Cutler and Radcliffe [15], to weighted networks. It is proved that on a weighted network, the degree of nodes reached following extra steps of a random walk is always stochastically larger than that of a uniformly randomly selected initial point. Next, friendship paradox results for directed networks are given from a probabilistic perspective; connections to detailed balance are considered.

1.1 Terms and Definitions

The thesis is mainly in the field of network analysis, so readers without the related background may be unfamiliar with several terms and definitions of the field. To make the work more accessible, we herein provide some self-contained background.

A network or graph is a system whose elements are connected together. The ele- ments are usually represented as nodes or vertices and the connections among nodes are known as edges. The nodes might be individuals, species, proteins, airports, or even countries, whereas edges can take the form of, for instance, friendship, commu- nication, collaboration, energy flow, or trade. A neighbor of a vertex v refers to a

1 vertex that is connected to the vertex v by an edge. A directed graph is a graph such that the edges have a direction associated with them. If the edges are undirected, the graph is an undirected graph.A weighted graph is a graph wherein the edges between nodes have weights assigned to them. These weights are often referred to as the strength, intensity, or capacity of connections. Otherwise, the graph is called an unweighted graph.

We mathematically define graphs as follows: G = (V, ω) is a directed weighted graph, or network, with a set of vertices or nodes, V = {v1, v2, . . . , vn}, and a weight function ω from V × V to the non-negative reals, R+.

+ For v ∈ V , define the in-degree and out-degree functions di and do from V to R , via

def X def X di(v) = ω(u, v) and do(v) = ω(v, u), (1.1) u∈V u∈V respectively. If ω is symmetric, i.e. ω(v, w) = ω(w, v) for all (v, w) ∈ V ×V , then G is an undirected graph and we will on occasion refer to the degree function d = di = do.

For v ∈ V , we refer to the set

N(v) def= {w ∈ V : ω(v, w) > 0} (1.2) as the neighbourhood set of v, and the elements of N(v) as the neighbours of v.

If ω(v, w) ∈ {0, 1} for all v, w ∈ V , G is an unweighted (possibly directed) graph, and we can write G = (V,E), where E = {(v, w) ∈ V × V : ω(v, w) = 1}.

A one mode network is a network wherein edges may be established between any pair of nodes. For example, friendship networks can be referred to as one mode networks.

A two mode network is a particular type of network with node set V partitioned into two disjoint sets of nodes, and wherein edges are only allowed between nodes

2 belonging to different sets. Scientific collaboration networks are examples of two mode networks where the two disjoint node sets consist of scientists and academic papers respectively, and links are based on authorship.

Projection is a network analysis process of transforming a two-mode network into a one-mode network. Although it is preferable to analyze networks in their original form, few methods exist for analyzing two-mode networks. As such, projection is an easy and sometimes effective way to analyze these networks. A projected scientific collaboration network might be a graph of scientists wherein connections are only permitted between two individuals if they coauthored at least one paper.

A random walk (specifically on networks) is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of random steps on the graph. For the cases considered below, a node of the graph is randomly chosen as the beginning of the walk (although more general initial dis- tributions are possible). Following this, a neighbor of the current node is selected, via some probability distribution on the neighbour set. The process then continues with the new node, iteratively. Note that each selection only depends on the current location and is not related to selections within the path. Notationally, consider a time-homogeneous random walk X = (X0,X1,... ) on the graph G dictated by a transition matrix, P = (Pi,j), i.e.

def Pi,j = P(Xl+1 = vj | Xl = vi), (1.3)

for 1 ≤ i, j ≤ n and l ≥ 0. We will assume throughout that X0 is uniformly selected from V .

The configuration model is a mathematically convenient method to produce ran- dom graphs with a prescribed degree sequence. In the case of undirected graphs, we refer to an undirected configuration model. In particular, assign stubs to each node

3 based on the node’s assigned degree sequence and randomly pair stubs to produce an undirected graph. Similarly in a directed graph scenario (with prescribed in- and out- degrees), each node is assigned in-stubs and out-stubs and out-stubs are randomly attached to in-stubs to establish a random directed graph.

1.2 Historical Background

The friendship paradox, which was first widely introduced by Feld [6] in 1991, states that when individuals compare themselves with their friends, it is likely that the majority will feel they have less friends than their friends do. The logic underlying the phenomenon is mathematically explored for an unweighted and undirected network scenario, showing that one’s neighbours have (on average) more neighbours than oneself. In particular, let Z be the node which is chosen (uniformly) at random from the pair at the terminal ends of a randomly chosen edge. Let

P d(v) 2|E| µ def= (d(X )) = v∈V = , (1.4) E 0 n n

2 and σ be the variance of d(X0). Then for v ∈ V ,

d(v) 1 (Z = v) = (1.5) P |E| 2

Thus, employing Eq. (1.4) and (1.5), we have

P 2 X d(v) (d(Z)) = d(v) (Z = v) = v∈V E P 2|E| v∈V

n (d(X )2) (d(X )2) = E 0 = E 0 2|E| µ

σ2 + µ2 σ2 = = µ + ≥ µ, (1.6) µ µ

4 To repeat, what is proved above is that, for an unweighted and undirected graph, if X0 denotes a randomly chosen person, and Z denotes a randomly chosen person from a randomly chosen friendship pair (represented by an edge of the network),

E(d(Z)) ≥ E(d(X0)). That is, on average, in a sense, friends have more friends than individuals.

In applied work, however, researchers (see for instance [2, 4]) use Feld’s friendship paradox to justify their applications and network analysis, often based on another version of the friendship paradox, that is, if X1 is a randomly chosen friend of X0, then

E(d(X1)) ≥ E(d(X0)). (1.7)

Recently, people have taken note of this, see [11, 1, 15] and [20, Theorem 1.2]. The proof of Eq. (1.7) is stated below.

X 1 1 E(d(X1)) = d(vj) n d(vi) (i,j)∈E

1 X d(vj) = n d(vi) (i,j)∈E

1 X d(vi) d(vj) 1 X = + ≥ 2 (1.8) n d(vj) d(vi) n (i,j)∈E (i,j)∈E i

2|E| = = (d(X )), (1.9) n E 0

2 2 where the inequality in (1.8) follows from d(vi) + d(vj) ≥ 2d(vi)d(vj) and the final equality in (1.9) follows from Eq. (1.4).

Recently, Cao and Ross [1] proved a stronger version of the friendship paradox.

Theorem 1.1. Suppose X = (X0,X1,... ) is a random walk on an unweighted, undirected graph G. Then, the degree of X1 is stochastically larger than the degree of

5 X0, i.e. for all t ∈ R

P(d(X1) ≥ t) ≥ P(d(X0) ≥ t). (1.10)

Kramer et al. [15] propose and prove a multistep friendship paradox. It can be described as below:

Theorem 1.2. Suppose X = (X0,X1,... ) is a random walk on an unweighted, undirected graph G. Then, for k ≥ 0, the degree of Xk is no less than the degree of X0 in expected value, i.e.

E(d(Xk)) ≥ E(d(X0)). (1.11)

In the next section we will discuss several recent applications of the friendship paradox in public health and other fields.

1.2.1 Applications of the Friendship Paradox

Cohen et al [3] present an effective immunization strategy for computer networks and populations. In their strategy, they choose a random set of individuals and look for a random acquaintance with whom they are in contact. The acquaintances, rather than the originally chosen nodes, are the ones immunized. They propose the strategy because of the fact that randomly selected acquaintances possess more links than randomly selected nodes, which is the main idea of the friendship paradox.

Christakis and Fowler [2] propose a similar strategy to detect infectious diseases contagion by monitoring the friends of randomly selected individuals. Garcia et al. [8] elaborate their theoretical framework sampling technique to take advantage of the local structure inherent in large-scale online social networks.

Kim et al. [13] compared the effects of two targeting strategies on maximiz- ing population-level behaviour change by conducting a randomised controlled trial

6 of network targeting algorithms using two public health interventions. They found that, based on their experiments, targeting nominated friends of randomly chosen persons, which exploits the friendship paradox, is more effective than randomly tar- geting. By contrast, targeting the most highly connected individuals produced no greater adoption of either intervention, compared with random targeting. Herrera et al. [9] conduct similar comparison on three social networks. They conclude that al- though sampling the most connected nodes produces helpful results, sampling friends of random individuals is a more practical and robust alternative.

Eom and Jo [4] introduce a “generalized friendship paradox” for arbitrary node characteristics in complex networks. By analyzing two coauthorship networks of Phys- ical Review journals and Google Scholar profiles, they found that the generalized friendship paradox holds at the individual and network levels for various characteris- tics, including the number of coauthors, the number of citations, and the number of publications. The origin of the generalized friendship paradox is shown to be rooted in positive correlations between degree and characteristics. Based on this, Eom and Jo [12] study how the generalized friendship paradox holds for individual nodes. They firstly define that the generalized friendship paradox holds for a node v if the at- tribute of v is lower than its neighbors’ average attributes. The proportion of nodes for which this is satisfied is referred to as the “holding probability”. By analyzing a solvable model for the uncorrelated case and numerically studying the correlated model of networks with tunable degree-degree and degree-attribute correlations, they found that at the individual level, the relevance of degree-attribute correlation to the holding probability may depend on whether the network is assortative or dissortative.

Momeni and Rabbat [17] propose several measures of nodal qualities to analyze the prevalence of the generalized friendship paradox over Twitter and they confirm high levels of prevalence. The origin of the prevalence of generalized friendship paradox is

7 traced to the hierarchical nature of the connections in the network. They conclude that these paradoxes are collective phenomena and a large fraction of individuals can experience the generalized friendship paradox even in the absence of a significant correlation between degrees and attributes.

Fotouhi et al. [7] posit a quality-based network growth model in which the chance for a node to receive new links depends both on its degree and a quality parameter. In the model, nodes are assigned qualities the first time they join the network, and these do not change over time. It is demonstrated that this model exhibits both the friendship paradox and the generalized friendship paradox at the network level, regardless of the distribution of qualities.

Lerman et al. [16] find that some social networks’ underlying structures can make a behavior appear far more common locally than globally. They trace the origins of this phenomenon to the friendship paradox in social networks. As a result of the paradox, a behavior that is globally rare may be systematically overrepresented in the local neighborhoods of many people.

Hodas et al. [10] confirm that several directed forms of the friendship paradox hold for most Twitter users by analyzing a sample of a Twitter firehose with directed nature. That is,“everyone you follow or who follows you has more friends and followers than you”, “your friends receive more viral content than you, on average” and “your friends are more active than you, on average”.

For further applications, see for instance Jackson [11], Kooti et al. [14], Wu et al. [21], Momeni and Rabbat [18] and Singer [19].

1.3 Overview of Results

This thesis provides several new results regarding the friendship paradox.

In what follows we will extend Theorems 1.1 and 1.2 in the context of weighted

8 and directed graphs.

The following theorem is an extension to weighted networks.

Theorem 1.3. (Multistep friendship paradox) Suppose X = (X0,X1,... ) is a ran- dom walk on a weighted, undirected graph G = (V, ω).1 Then, for k ≥ 1 the degree of

Xk is stochastically larger than the degree of X0, i.e. for all t ∈ R

P(d(Xk) ≥ t) ≥ P(d(X0) ≥ t).

It is quite clear that Theorem 2.5 will not hold in general (for all t > 0) for directed networks, (see for instance the example following Figure 2.1 in Chapter 2). However, the next result shows that the friendship paradox holds for directed graphs, on average, for given degree sequences, in a certain sense.

Theorem 1.4. (Friendship paradox for directed networks) Suppose V = {v1, . . . , vn} and the degree sequences di and do are fixed. Consider the ensemble of graphs, G of all graphs with these degree sequences. If G ∈ G (with adjacency matrix A = AG = [Ai,j]) is formed randomly via the configuration model, and P = PG = [Pi,j] is the resulting (random) transition matrix for a random walk on G, i.e.

Ai,j Pi,j = , (1.12) do(vi) then for t ≥ 0, on average

P(di(X1) ≥ t) − P(di(X0) ≥ t) ≥ 0. (1.13)

1.4 Organization of the thesis

The remainder of the thesis proceeds as follows. Chapter 2 contains the paper “The friendship paradox for weighted and directed networks” which is in revision for the

1ω is a weight function from V × V to the non-negative reals, R+.

9 journal Probability in Engineering and Information Sciences. Chapter 3 includes discussion of future research. Appendix A consists of the paper “The degree-wise effect of a second step for a random walk on a graph” which has been submitted to the Journal of Applied Probability. Appendix B includes the paper “A new look at clustering coefficients with generalization to weighted and multi-faction networks” for which a revision has been submitted to the journal Social Networks.

10 Bibliography

[1] Yang Cao and Sheldon M Ross. The friendship paradox. Mathematical Scientist, 41(1):61–64, 2016.

[2] Nicholas A Christakis and James H Fowler. Social network sensors for early detection of contagious outbreaks. PLOS ONE, 5(9):e12948, 2010.

[3] Reuven Cohen, Shlomo Havlin, and Daniel Ben-Avraham. Efficient immuniza- tion strategies for computer networks and populations. Physical Review Letters, 91(24):247901, 2003.

[4] Young-Ho Eom and Hang-Hyun Jo. Generalized friendship paradox in complex networks: The case of scientific collaboration. Scientific Reports, 4:4603, 2014.

[5] Young-Ho Eom and Hang-Hyun Jo. Tail-scope: Using friends to estimate heavy tails of degree distributions in large-scale complex networks. Scientific Reports, 5:09752, 2015.

[6] Scott L Feld. Why your friends have more friends than you do. American Journal of Sociology, 96(6):1464–77, 1991.

[7] Babak Fotouhi, Naghmeh Momeni, and Michael G Rabbat. Generalized friend- ship paradox: An analytical approach. In International Conference on Social Informatics, pages 339–352. Springer, 2014.

[8] Manuel Garcia-Herranz, Esteban Moro, Manuel Cebrian, Nicholas A Christakis, and James H Fowler. Using friends as sensors to detect global-scale contagious outbreaks. PLOS ONE, 9(4):e92413, 2014.

11 [9] Jose L Herrera, Ravi Srinivasan, John S Brownstein, Alison P Galvani, and Lauren Ancel Meyers. Disease surveillance on complex social networks. PLOS Computational Biology, 12(7):e1004928, 2016.

[10] Nathan Oken Hodas, Farshad Kooti, and Kristina Lerman. Friendship paradox redux: Your friends are more interesting than you. CoRR, abs/1304.3480, 2013.

[11] Matthew O Jackson. The friendship paradox and systematic biases in percep- tions and social norms. Available at SSRN, 2016.

[12] Hang-Hyun Jo and Young-Ho Eom. Generalized friendship paradox in networks with tunable degree-attribute correlation. Physical Review E, 90(2):022809, 2014.

[13] David A Kim, Alison R Hwong, Derek Stafford, D Alex Hughes, A James O’Malley, James H Fowler, and Nicholas A Christakis. Social network targeting to maximise population behaviour change: a cluster randomised controlled trial. The Lancet, 386(9989):145–153, 2015.

[14] Farshad Kooti, Nathan O Hodas, and Kristina Lerman. Network weirdness: Exploring the origins of network paradoxes. In Eighth International AAAI Con- ference on Weblogs and , pages 266–274, 2014.

[15] Josh Brown Kramer, Jonathan Cutler, and AJ Radcliffe. The multistep friend- ship paradox. American Mathematical Monthly, 123(9):900–908, 2016.

[16] Kristina Lerman, Xiaoran Yan, and Xin-Zeng Wu. The “majority illusion” in social networks. PLOS ONE, 11(2):e0147617, 2016.

[17] Naghmeh Momeni and Michael Rabbat. Qualities and inequalities in online social networks through the lens of the generalized friendship paradox. PLOS ONE, 11(2):e0143633, 2016.

12 [18] Naghmeh Momeni and Michael G Rabbat. Measuring the generalized friendship paradox in networks with quality-dependent connectivity. In Complex Networks VI, pages 45–55. Springer, 2015.

[19] Yaron Singer. Influence maximization through adaptive seeding. ACM SIGecom Exchanges, 15(1):32–59, 2016.

[20] Remco Van Der Hofstad. Random graphs and complex networks, volume 1. Cam- University Press, 2016.

[21] Xin-Zeng Wu, Allon G Percus, and Kristina Lerman. Neighbor-neighbor corre- lations explain measurement bias in networks. arXiv preprint arXiv:1612.08200, 2016.

13 Chapter 2: The friendship paradox for weighted and directed networks

The following paper1 has been submitted to and is currently under revision for the journal Probability in Engineering and Information Science. Stylistic variations are due to the requirements of the journal. H. J. had the major role in the preparation of the manuscript. K. S. B. and H. J. initiated the research, investigated all background work and devised the proofs.

1K. Berenhaut and H. Jiang, The friendship paradox for weighted and directed networks (2017), Probability in Engineering and Information Science In Revision 2.1 Introduction

The friendship paradox, introduced by [11], states roughly that, in a network scenario, one’s neighbours have (on average) more neighbours than oneself. The result has recently been employed to advantage in epidemic detection and more general sampling scenarios (see [8, 7, 13, 10, 18, 14, 34]), and has received considerable attention from scientists across disciplines. For a recent discussion of societal welfare implications see [16].

Throughout, we will assume that G = (V, ω) is a directed weighted graph, or network, with a set of vertices or nodes, V = {v1, v2, . . . , vn}, and a weight function ω from V × V to the non-negative reals, R+. Such graphs arise in many physical, eco- logical, social, and economic studies where the weights represent varying tie strength, intensity or capacity (see for instance [29, 33, 40, 3, 36, 30, 2, 38]). We also consider a general node attribute function, f : V → [0, ∞). For a node v ∈ V , f(v) could de- note, for instance, the in-degree or out-degree of v in G, some other graph dependent measure such as betweenness or closeness (see for instance [31] and the references therein), or some attribute extraneous to G, itself, such as biomass in a food web.

+ For v ∈ V , define the in-degree and out-degree functions di and do from V to R , via

def X def X di(v) = ω(u, v) and do(v) = ω(v, u), (2.1) u∈V u∈V respectively. If ω is symmetric, i.e. ω(v, w) = ω(w, v) for all (v, w) ∈ V × V , we will on occasion refer to the degree function d = di = do. If ω(v, w) ∈ {0, 1} for all v, w ∈ V , G is an unweighted (possibly directed) graph, and we can write G = (V,E), where E = {(v, w) ∈ V × V : ω(v, w) = 1}.

For the purposes of neighbour selection, as in [20], it will be convenient to consider a time-homogeneous random walk X = (X0,X1,... ) on the graph G dictated by a

15 transition matrix, P = [Pi,j], i.e.

def Pi,j = P(Xl+1 = vj | Xl = vi), (2.2)

for 1 ≤ i, j ≤ n and l ≥ 0. We will assume throughout that X0 is uniformly selected from V .

Recently, [5] proved the following version of the friendship paradox (see also [16]).

Theorem 2.1. Suppose X = (X0,X1,... ) is a random walk on an unweighted, undirected graph G. Then, the degree of X1 is stochastically larger than the degree of

X0, i.e. for all t ∈ R

P(d(X1) ≥ t) ≥ P(d(X0) ≥ t). (2.3)

In addition, [20] proved the following result regarding random walks on unweighted, undirected graphs.

Theorem 2.2. Suppose X = (X0,X1,... ) is a random walk on an unweighted, undirected graph G. Then, for k ≥ 0, the degree of Xk is no less than the degree of X0 in expected value, i.e.

E(d(Xk)) ≥ E(d(X0)). (2.4)

For further recent work related to the friendship paradox, see for instance [9, 17, 21, 26, 12, 28, 19, 15, 37], and for further information on random walks on graphs, see for instance [22, 1, 39, 32, 35].

In what follows we will extend Theorems A.1 and A.2 in the context of weighted and directed graphs. The following simple lemma will be crucial, throughout.

Lemma 2.1. Suppose X = (X0,X1,... ) is a time-homogeneous Markov chain on the state space V with transition matrix P = [Pi,j] and X0 distributed uniformly on

16 V . If t ∈ R, and f : V → [0, ∞), then

def 1 X ∆ = (f(X ) ≥ t) − (f(X ) ≥ t) = (P − P ). (2.5) t P 1 P 0 n i,j j,i 1≤i,j≤n f(vi)

Proof. For t > 0, define the sets

+ − St = {v : f(v) ≥ t} and St = {v : f(v) < t}, (2.6)

+ − and note that St + St = n. We then have

+ + + − P(f(X1) ≥ t) = P(X1 ∈ St ,X0 ∈ St ) + P(X1 ∈ St ,X0 ∈ St ) (2.7)

+ − + + P(f(X0) > t) = P(X0 ∈ St ,X1 ∈ St ) + P(X0 ∈ St ,X1 ∈ St ). (2.8)

Taking a difference in (2.7) and (2.8) then gives

+ − + − ∆t = P(X1 ∈ St ,X0 ∈ St ) − P(X0 ∈ St ,X1 ∈ St ) (2.9)   1 X X = P − P (2.10) n  ij ij f(vi)

Despite its simplicity, Lemma 2.1 leads directly to several results.

Theorem 2.3. Suppose X = (X0,X1,... ) is a time-homogeneous Markov chain on the state space V with transition matrix P = [Pi,j], and consider a function f : V → [0, ∞). If

f(vi) > f(vj) implies Pi,j ≤ Pj,i, (2.11) then P(f(X1) ≥ t) ≥ P(f(X0) ≥ t), for all t ∈ R.

In essence, the requirement in (2.11) states that the flow of probability into nodes with higher f-value from nodes with lower f-value is greater than the flow in the

17 opposing direction. One key instance when (2.11) holds is when f(v) is the degree of node v in an undirected graph, G, and P is the transition matrix for a random walk on G.

Theorem 2.4. Suppose X = (X0,X1,... ) is a time-homogeneous Markov chain on the state space V with transition matrix P = [Pi,j], and consider a function f : V → [0, ∞). If detailed balance holds, i.e. for all 1 ≤ i, j ≤ n,

f(vi)Pi,j = f(vj)Pj,i, (2.12) then P (f(X1) ≥ t) ≥ P (f(X0) ≥ t), for all t ∈ R.

Proof. Suppose 1 ≤ i, j ≤ n with f(vi) > f(vj) ≥ 0. If Pj,i > 0, then

P f(v ) i,j = j ≤ 1, (2.13) Pj,i f(vi) and hence (2.11) holds. Otherwise, Pj,i = Pi,j = 0, and the result follows.

Now, let F = [Fi,j] be a diagonal matrix with i-th diagonal entry Fi,i = f(vi).

−1 If P = F B for some symmetric matrix B = [Bi,j], then FP = B is symmetric and hence Equation (2.12) holds. Suppose that A = [Ai,j] is an n × n matrix with

(i, j)-entry Ai,j = ω(vi, vj) and that A is symmetric. For v ∈ V , let f(v) = d(v) be the degree of v in G and set P = F −1A. The k-step transition matrix, P k, satisfies P k = F −1B where B = F (F −1A)k is symmetric. We immediately have the following extension of Theorems A.1 and A.2.

Theorem 2.5. (Multistep friendship paradox) Suppose (X0,X1,... ) is a random walk on an undirected graph G = (V, ω). Then, for k ≥ 1 the degree of Xk is stochastically larger than the degree of X0.

We will employ Lemma 2.1 further in the next section. We now turn to consider- ation of directed networks.

18 2.2 Directed networks

The friendship paradox in directed graph scenarios has been considered in [15, 19, 13, 27]. It is quite clear that results such as those in Section 1 will not hold in general (for all t > 0) for directed networks, as the next example illustrates.

Figure 2.1: Two five-node directed networks. In-degrees are indicated adjacent to the corresponding nodes. The constants along edges in (a) indicate multiple edges.

Example. Consider the 5-node directed graph depicted in Figure 1(a), with an in-degree sum of ten; note that there are two multi-edges of weight two and three, respectively. Here, the mean in-degree is two, while selecting a random v ∈ V and a random out-edge of v leads to a node with expected in-degree 39/20 < 2. Similarly for the 5-node graph in (b), the mean in-degree is 2.8 and selecting a random v ∈ V and a random out-edge of v leads to a node with expected in-degree 41/15 < 2.8.

In this section we will show that the friendship paradox holds, on average, for given degree sequences, in a certain sense. In particular suppose G = (V, ω) is a directed graph with ω(v, w) ∈ Z+ = {0, 1, 2, 3,... }, for all (v, w) ∈ V × V . Now, consider the sequences of in-degree and out-degrees of G, di = (di(v1), di(v2), . . . , di(vn)) and

19 do = (do(v1), do(v2), . . . , do(vn)). The configuration (or matching) model provides a well-studied means to produce a random directed multi-edge graph with fixed degree sequences di and do (see for instance [23, 6]). In particular, assign to each node v, di(v) in-stubs and do(v) out-stubs, and randomly pair in-stubs and out-stubs to create a (random) graph with degree sequences di and do. For further discussion of configuration models, see for instance [24, 25, 4].

Now, as in (B.35), for t > 0, set

+ def − def St = {v : di(v) ≥ t} and St = {v : di(v) < t}. (2.14)

In addition define the degree sums

+ def X − def X It = di(v),It = di(v), (2.15) + − v∈St v∈St

− def X + def X Ot = do(v),Ot = do(v), (2.16) − + v∈St v∈St

+ − + − and M = It + It = Ot + Ot We will prove the following result.

Theorem 2.6. (Friendship paradox for directed networks) Suppose V = {v1, . . . , vn} and the degree sequences di and do are fixed. Consider the ensemble of graphs, G of all graphs with these degree sequences. If G ∈ G (with adjacency matrix A = AG = [Ai,j]) is formed randomly via the configuration model, and P = PG = [Pi,j] is the resulting (random) transition matrix for a random walk on G, i.e.

Ai,j Pi,j = , (2.17) do(vi)

20 − + then for t ≥ 0, with St and St non-empty,

+ −  + −  |St ||St | It It EG (P(di(X1) ≥ t) − P(di(X0) ≥ t)) = + − − Mn |St | |St | I+ |S+| = t − t > 0, (2.18) M n where EG indicates expected value with respect to the configuration model for the given degree sequences.

− Proof. For vj ∈ St , set Yj,k = 1/do(vj) whenever the k-th stub outgoing from vj + + attaches to a node in St and zero otherwise. Similarly for vj ∈ St , Yj,k = 1/do(vj) − whenever the k-th stub outgoing from vj attaches to a node in St and zero otherwise. Then

1 + −  (I /M) if vj ∈ S do(vj ) t t  1 − + EG(Yj,k) = (I /M) if vj ∈ S (2.19) do(vj ) t t  0 otherwise.

Now, the random transition matrix, P satisfies

X X X X Pi,j = Pi,j = Yi,k, (2.20) d (v )

  + + X X It It − G Pi,j = = · S , (2.21) E   M M t d (v )

  − X It + G Pij = · S . (2.22) E   M t di(vj )

21 Employing Lemma 2.1 and Equations (2.21) and (2.22), we have

 + −  1 It − It + G ( (di(X1) ≥ t) − (di(X0) ≥ t)) = · S − · S , (2.23) E P P n M t M t

+ + − − and the theorem follows upon simplification, noting that It / St and It / St are + − the mean in-degrees over the sets St and St , respectively. Summing over t ≥ 1 in (2.18) leads to the following corollary.

Corollary 2.1. Under the assumptions in the statement of Theorem 2.6, we have

n−1 P (d (v) − m)2 ( (d (X )) − (d (X ))) = v∈V i , (2.24) EG E i 1 E i 0 m

def −1 P where m is the mean in-degree, given by m = n v∈V di(v).

Proof. Summing over t ≥ 1, we obtain

X + X X X X X 2 It = di(v) = di(v) = di(v) (2.25)

t≥1 t≥1 v:di(v)≥t v∈V 1≤t≤di(v) v∈V and

X + X X X X X St = 1 = 1 = di(v). (2.26)

t≥1 t≥1 v:di(v)≥t v∈V 1≤t≤di(v) v∈V

Hence, employing (2.18) gives

! X X EG (E(di(X1)) − E(di(X0)) = EG P(di(X1) ≥ t) − P(di(X0) ≥ t) t≥1 t≥1 X = (EG (P(di(X1) ≥ t) − P(di(X0) ≥ t))) t≥1

+ + ! X I St = t − . (2.27) M n t≥1

22 Equations (2.25) and (2.26), and the fact that M/n = m, then imply

+ + X I X St ( (d (X )) − (d (X )) = t − EG E i 1 E i 0 M n t≥1 t≥1 ! 1 1 X = d (v)2 − m2 . (2.28) m n i v∈V

The result follows.

Arguing similarly we also have the corresponding results to Theorem 2.6 and

Corollary 2.1, when the in-degree and out-degree functions, di and do, are swapped throughout.

Finally, consider the ensemble of undirected multigraphs, (where ω is symmetric), and define

+ def X − def X Dt = d(v),Dt = d(v), (2.29) + − v∈St v∈St

def + − and M = Dt + Dt . Similar to before, the configuration model also provides a means to produce a random undirected multi-edge graph with degree sequence d =

(d(v1), d(v2), . . . , d(vn)); see for instance [23, 6]. In particular, assign to each node v, d(v) stubs, and randomly pair these stubs to create a (random) graph with degree sequence d.

The following result is proved similar to above; the M − 1 in equations (2.31) and (A.8) arises due to the fact that while loops are possible, in considering an edge incident to a single node, that edge cannot connect to itself.

Theorem 2.7. Suppose V = {v1, . . . , vn} and the degree sequence d is fixed. Consider the ensemble of graphs, G, of all graphs with this degree sequence. If G ∈ G (with adjacency matrix A) is formed randomly via the configuration model (for undirected

23 graphs) and P = [Pi,j] is the resulting (random) transition matrix for a random walk on G, i.e.

Ai,j Pi,j = , (2.30) d(vi)

− + then for t ≥ 0, with St and St non-empty,

+ −  + −  |St ||St | Dt Dt EG(P(d(X1) ≥ t) − P(d(X0) ≥ t)) = + − − (2.31) (M − 1)n |St | |St | D+ |S+| M = t − t > 0. (2.32) (M − 1) n M − 1

24 Bibliography

[1] David Aldous and Jim Fill. Reversible markov chains and random walks on graphs, 2002.

[2] Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, and Alessandro Vespignani. The architecture of complex weighted networks. Proceedings of the National Academy of Sciences of the United States of America, 101(11):3747– 3752, 2004.

[3] Marc Barth´elemy, Alain Barrat, Romualdo Pastor-Satorras, and Alessandro Vespignani. Characterization and modeling of weighted networks. Physica A: Statistical Mechanics and its Applications, 346(1):34–43, 2005.

[4] Edward A Bender and E Rodney Canfield. The asymptotic number of labeled graphs with given degree sequences. Journal of Combinatorial Theory, Series A, 24(3):296–307, 1978.

[5] Yang Cao and Sheldon M Ross. The friendship paradox. Mathematical Scientist, 41(1):61–64, 2016.

[6] Ningyuan Chen and Mariana Olvera-Cravioto. Directed random graphs with given degree distributions. Stochastic Systems, 3(1):147–186, 2013.

[7] Nicholas A Christakis and James H Fowler. Social network sensors for early detection of contagious outbreaks. PLOS ONE, 5(9):e12948, 2010.

[8] Reuven Cohen, Shlomo Havlin, and Daniel Ben-Avraham. Efficient immuniza- tion strategies for computer networks and populations. Physical Review Letters, 91(24):247901, 2003.

25 [9] Young-Ho Eom and Hang-Hyun Jo. Generalized friendship paradox in complex networks: The case of scientific collaboration. Scientific Reports, 4:4603, 2014.

[10] Young-Ho Eom and Hang-Hyun Jo. Tail-scope: Using friends to estimate heavy tails of degree distributions in large-scale complex networks. Scientific Reports, 5:09752, 2015.

[11] Scott L Feld. Why your friends have more friends than you do. American Journal of Sociology, 96(6):1464–77, 1991.

[12] Babak Fotouhi, Naghmeh Momeni, and Michael G Rabbat. Generalized friend- ship paradox: An analytical approach. In International Conference on Social Informatics, pages 339–352. Springer, 2014.

[13] Manuel Garcia-Herranz, Esteban Moro, Manuel Cebrian, Nicholas A Christakis, and James H Fowler. Using friends as sensors to detect global-scale contagious outbreaks. PLOS ONE, 9(4):e92413, 2014.

[14] Jose L Herrera, Ravi Srinivasan, John S Brownstein, Alison P Galvani, and Lauren Ancel Meyers. Disease surveillance on complex social networks. PLOS Computational Biology, 12(7):e1004928, 2016.

[15] Nathan Oken Hodas, Farshad Kooti, and Kristina Lerman. Friendship paradox redux: Your friends are more interesting than you. CoRR, abs/1304.3480, 2013.

[16] Matthew O Jackson. The friendship paradox and systematic biases in percep- tions and social norms. Available at SSRN, 2016.

[17] Hang-Hyun Jo and Young-Ho Eom. Generalized friendship paradox in networks with tunable degree-attribute correlation. Physical Review E, 90(2):022809, 2014.

26 [18] David A Kim, Alison R Hwong, Derek Stafford, D Alex Hughes, A James O’Malley, James H Fowler, and Nicholas A Christakis. Social network targeting to maximise population behaviour change: a cluster randomised controlled trial. The Lancet, 386(9989):145–153, 2015.

[19] Farshad Kooti, Nathan O Hodas, and Kristina Lerman. Network weirdness: Exploring the origins of network paradoxes. In Eighth International AAAI Con- ference on Weblogs and Social Media, pages 266–274, 2014.

[20] Josh Brown Kramer, Jonathan Cutler, and AJ Radcliffe. The multistep friend- ship paradox. American Mathematical Monthly, 123(9):900–908, 2016.

[21] Kristina Lerman, Xiaoran Yan, and Xin-Zeng Wu. The “majority illusion” in social networks. PLOS ONE, 11(2):e0147617, 2016.

[22] L´aszl´oLov´asz. Random walks on graphs. Combinatorics, Paul erdos is eighty, 2:1–46, 1993.

[23] Ron Milo, Nadav Kashtan, Shalev Itzkovitz, Mark EJ Newman, and Uri Alon. On the uniform generation of random graphs with prescribed degree sequences. arXiv preprint cond-mat/0312028, 2003.

[24] Michael Molloy and Bruce Reed. A critical point for random graphs with a given degree sequence. Random Structures & Algorithms, 6(2-3):161–180, 1995.

[25] Michael Molloy and Bruce Reed. The size of the giant component of a random graph with a given degree sequence. Combinatorics, Probability and Computing, 7(03):295–305, 1998.

[26] Naghmeh Momeni and Michael Rabbat. Qualities and inequalities in online social networks through the lens of the generalized friendship paradox. PLOS ONE, 11(2):e0143633, 2016.

27 [27] Naghmeh Momeni and Michael Rabbat. Qualities and inequalities in online social networks through the lens of the generalized friendship paradox. PLOS ONE, 11(2):e0143633, 2016.

[28] Naghmeh Momeni and Michael G Rabbat. Measuring the generalized friendship paradox in networks with quality-dependent connectivity. In Complex Networks VI, pages 45–55. Springer, 2015.

[29] M. E. J. Newman. Analysis of weighted networks. Phys. Rev. E, 70:056131, 2004.

[30] Tore Opsahl, Filip Agneessens, and John Skvoretz. Node in weighted networks: Generalizing degree and shortest paths. Social Networks, 32(3):245– 251, 2010.

[31] Tore Opsahl, Filip Agneessens, and John Skvoretz. Node centrality in weighted networks: Generalizing degree and shortest paths. Social networks, 32(3):245– 251, 2010.

[32] Pascal Pons and Matthieu Latapy. Computing communities in large networks using random walks. In Computer and Information Sciences-ISCIS 2005, pages 284–293. Springer, 2005.

[33]M Angeles´ Serrano, Mari´anBogun´a,and Alessandro Vespignani. Extracting the multiscale backbone of complex weighted networks. Proceedings of the National Academy of Sciences, 106(16):6483–6488, 2009.

[34] Yaron Singer. Influence maximization through adaptive seeding. ACM SIGecom Exchanges, 15(1):32–59, 2016.

28 [35] Albert Sol´e-Ribalta,Manlio De Domenico, Sergio G´omez,and Alex Arenas. Ran- dom walk centrality in interconnected multilayer networks. Physica D: Nonlinear Phenomena, 323:73–79, 2016.

[36] Stanley Wasserman and Katherine Faust. : Methods and applications, volume 8. Cambridge University Press, 1994.

[37] Xin-Zeng Wu, Allon G Percus, and Kristina Lerman. Neighbor-neighbor corre- lations explain measurement bias in networks. arXiv preprint arXiv:1612.08200, 2016.

[38] S. H. Yook, H. Jeong, A.-L. Barab´asi,and Y. Tu. Weighted evolving networks. Phys. Rev. Lett., 86:5835–5838, Jun 2001.

[39] Haijun Zhou and Reinhard Lipowsky. Network brownian motion: A new method to measure vertex-vertex proximity and to identify communities and subcommu- nities. In Computational Science-ICCS 2004, pages 1062–1069. Springer, 2004.

[40] Tao Zhou, Jie Ren, Mat´uˇsMedo, and Yi-Cheng Zhang. Bipartite network pro- jection and personal recommendation. Physical Review E, 76(4):046115, 2007.

29 Chapter 3: Future Directions

There are many potential extensions of the current work. In the thesis, we compare the degree of different steps of random walks. However, future work could consider comparison of other measures such as betweenness, closeness, etc. It is possible that similar relationships exist between different steps when comparing these measures.

In addition, the theorems we proved show that the initial degree tends to be smaller than the degree after multiple steps. A natural question would be: which step is the best step to reach a node of large degree?

Our friendship paradox on directed network is built based on the configuration model, which may produce self loops, but it is somewhat counter-intuitive since a person himself or herself is not usually considered to potentially be his or her own friend. Thus it could certainly be interesting to remove self-loops when considering the friendship paradox.

30 Appendix A: The degree-wise effect of a second step for a random walk on a graph

The following paper1 has been submitted to Journal of Applied Probability. Stylis- tic variations are due to the requirements of the journal. K.M.N. and E.J.K. performed computations and provided insights leading to the devising of the statement of The- orem A.3. K.S.B. and H.J. provided the proof of Theorem A.3.

1K. Berenhaut, H. Jiang, Katelyn M. McNab and Elizabeth J. Krizay, The degree-wise effect of a second step for a random walk on a graph (2017), Journal of Applied Probability Submitted A.1 Introduction

The friendship paradox, introduced by [14], states roughly that, in a network scenario, one’s neighbours have (on average) more neighbours than oneself. The result has recently been employed to advantage in epidemic detection and more general sampling scenarios (see [11, 10, 16, 13, 21, 17, 34]), and has received considerable attention from scientists across disciplines. For a recent discussion of societal welfare implications see [19].

Throughout, we will assume that G = (V,E) is a multigraph, with a set of vertices or nodes, V = {v1, v2, . . . , vn}, and a multiset of unordered pairs of elements of V ,

E = {e1, e2, . . . , em}, with each unordered pair (or edge) of the form {v, w} having non-negative multiplicity ω(v, w)=ω(w, v). We will refer to ω : V × V → Z+ ∪ {0} as the multiplicity function of the multigraph G.

For v ∈ V , define the degree function d from V to Z+, via

def X d(v) = ω(v, w). (A.1) w∈V

We will assume throughout that G has no zero-degree vertices, i.e. d(v) > 0 for all v ∈ V . If ω(v, w) ∈ {0, 1} for all (v, w) ∈ V × V , we will say that the graph G is simple.

For the purposes of neighbour selection, as in [23], it will be convenient to consider a time-homogeneous random walk X = (X0,X1,... ) on the graph G dictated by a transition matrix, P = (Pi,j), i.e.

def Pi,j = P(Xl+1 = vj | Xl = vi), (A.2) for 1 ≤ i, j ≤ n and l ≥ 0. We will assume throughout that X0 is uniformly selected from V .

Recently, [8] proved the following version of the friendship paradox (see also [19]).

32 Theorem A.1. Suppose X = (X0,X1,... ) is a random walk on a simple graph G.

Then, the degree of X1 is stochastically larger than the degree of X0, i.e. for all t ∈ R

P(d(X1) ≥ t) ≥ P(d(X0) ≥ t). (A.3)

In addition, [23] proved the following result regarding random walks on simple graphs (see also [35, Theorem 1.2]).

Theorem A.2. Suppose X = (X0,X1,... ) is a random walk on a simple graph G.

Then, for k ≥ 0, the degree of Xk is no less than the degree of X0 in expected value, i.e.

E(d(Xk)) ≥ E(d(X0)). (A.4)

For further recent work related to the friendship paradox, see for instance [12, 20, 24, 31, 15, 33, 22, 18, 32, 36], and for further information on random walks on graphs, see for instance [26, 1, 25, 7].

In light of recent applications of the friendship paradox, Theorems A.1 and A.2 suggest investigation of the relative benefit of additional random walk steps (i.e. friends of friends, friends of friends of friends, etc., in a social network context). It is, in fact, possible to construct small simple graphs where additional steps can be either beneficial or detrimental, if the goal at hand is to obtain a node of sufficiently high degree. This is illustrated in the following example.

Example. Consider the 6-node 8-edge simple graph depicted in Figure 1(a), Here,

P (d(X1) ≥ 3) = 78/108 < 79/108 = P (d(X2) ≥ 3). On the other hand, for the 6- node 7-edge graph in Figure 1(b) (with the edge connecting Nodes 1 and 4 removed),

P (d(X1) ≥ 3) = 24/27 > 22/27 = P (d(X2) ≥ 3). Note that in both instances,

P (d(X0) ≥ 3) = 2/3.

33 Figure A.1: Two six-node networks. Degrees are indicated adjacent to the corre- sponding nodes.

Here, we will show that one step is more beneficial than two steps, on average, for a given degree sequence, in a certain sense. In particular, consider the degree se- quence, d = (d(v1), d(v2), . . . , d(vn)). The configuration (or matching) model provides a well-studied means to produce a random multigraph with degree sequence d; see for instance [28], [9], and [35, Chapter 7]. In particular, assign to each node v, d(v) stubs, and randomly pair these stubs to create a (random) graph with degree sequence d. For further discussion of configuration models, see for instance [29, 30, 4].

Now, for a given degree sequence d, and t > 0, define the sets

+ + def − − def S = St = {v : d(v) ≥ t} and S = St = {v : d(v) < t}, (A.5) and the constants

+ + def X − − def X D = Dt = d(v) and D = Dt = d(v), (A.6) + − v∈St v∈St

def + − + − and M = Dt + Dt . Here, S and S are the sets of high and low degree nodes, + − respectively, while Dt and Dt are their respective degree sums. Note that total degree sum, M, must always be even.

We will prove the following result.

Theorem A.3. Suppose V = {v1, . . . , vn} and the degree sequence d is fixed. Con- sider the ensemble of graphs, G, of all multigraphs with this degree sequence. If G ∈ G

34 (with multiplicity function ω) is formed randomly via the configuration model and

P = (Pi,j) is the resulting (random) transition matrix for a random walk on G, i.e.

ω(vi, vj) Pi,j = , (A.7) d(vi) then for t ≥ 0,

def ∆ = P(d(X1) ≥ t) − P(d(X2) ≥ t) ≥ 0. (A.8) with equality if and only if min(|S+| , |S−|) = 0.

For further recent work related to random walks on random graphs, see [2, 5, 3, 6, 27].

In the next section we will prove Theorem A.3.

A.2 Proof of Theorem A.3

In this section, we will prove Theorem A.3. The following lemma provides a helpful mean inequality.

Lemma A.1. Suppose r, s ≥ 1 and α = (αi)i≥1 and β = (βi)i≥1 are two sequences of positive integers satisfying αi < βj for all i, j ≥ 1. Then,

2 m (β) − m (α) ≥ (m (β)A (α) − m (α)A (β)) , (A.9) s r 3 s r r s

where for t ≥ 1 and x = (xi)i≥1, mt(x) is the mean of the first t entries in x, i.e. (x1 + x2 + ··· + xt)/t, and At(x) is the mean of the reciprocals of the first t entries, i.e. (1/x1 + 1/x2 + ··· + 1/xt)/t. Equality in (A.9) holds if and only if

β1 = β2 = . . . , βs = 2.

35 Proof. Let W and Z be independent random variables uniformly distributed on the index sets {1, 2, . . . , r} and {1, 2, . . . , s}, respectively, X = αW and Y = βZ . Then

mr(α) = E(X) , ms(β) = E(Y ) ,Ar(α) = E(1/X) and As(β) = E(1/Y )(A.10),

def Setting B = ms(β) − mr(α) − (2/3) (ms(β)Ar(α) − mr(α)As(β)), we have

2 B = (Y ) − (X) − ( (Y ) (1/X) − (X) (1/Y )) E E 3 E E E E  2 Y 2 − X2  = (Y − X) − E 3 XY

  2  1 1  = (Y − X) 1 − + ≥ 0, (A.11) E 3 X Y since P (Y > X ≥ 1) = 1. If P (Y = 2) = 1 then P (X = 1) = 1 and B = 0, Otherwise B > 0 and the result follows.

We will now prove Theorem A.3.

Proof of Theorem A.3. For convenience, suppose vi = i for 1 ≤ i ≤ n, and write di for d(vi).

Note that, employing the notation in (A.5), we have

+ + ∆ = P(X1 ∈ S ) − P(X2 ∈ S )

+ − + + = (P(X1 ∈ S ,X2 ∈ S ) + P(X1 ∈ S ,X2 ∈ S ))

− + + + − (P(X1 ∈ S ,X2 ∈ S ) + P(X1 ∈ S ,X2 ∈ S ))

+ − − + = P(X1 ∈ S ,X2 ∈ S ) − P(X1 ∈ S ,X2 ∈ S ). (A.12)

If min(|S+| , |S−|) = 0, then ∆ = 0. So assume S+ and S− are both non-empty. Note that D− ≥ 1 and D+ ≥ 2, so M ≥ 4 since M is even.

36 Suppose that the stubs outgoing from each node v have been ordered, and for

(i, j) ∈ V × V , 1 ≤ k1 ≤ di and 1 ≤ k2 ≤ dj, define Ii,j,k1,k2 to be the indicator of the event that the k1-th stub outgoing from vi attaches to the k2-th stub outgoing from

+ vj. In addition, notationally, for z ∈ Z , let

[z] = {1, 2, . . . , z}. (A.13)

Now, note that

+ − − + − P(X1 ∈ S ,X2 ∈ S ) = P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S )

+ + − +P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ) (A.14)

+ + − First, consider P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ) and recall that X0 is assumed to be uniformly selected from V . We have (see Figure A.2 (a))

+ + − −1 P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ) = n E(A + B), (A.15) where

  X  X 1 1  A =  Ii,i,k1,k2 Ii,j,k3,k4  (A.16) d d + −  i i  (i,j)∈S ×S (k1,k2,k3,k4)∈[di]×[di]×[di]×[dj ] k1, k2, k3 distinct and

  X  X 1 1  B =  Ii,j,k1,k2 Ij,l,k3,k4  . (A.17) d d + + −  i j  (i,j,l)∈S ×S ×S (k1,k2,k3,k4)∈[di]×[dj ]×[dj ]×[dl] i6=j k26=k3

37 Figure A.2: (a) gives configuration types leading to a positive value for + + − P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ). Nodes on the left and right are assumed to be in S− and S+, respectively. (b) gives configuration types leading to a positive value − + − for P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ). The configurations corresponding to (A.16), (A.17), (A.21), (A.22) and (B.14) are given in A, B, C, D and E, respectively.

+ For a given node i ∈ S , there are di(di − 1)(di − 2) distinct triples of stubs outgoing from the node. For each of these, the probability that the first of these stubs connects to the second and the third connects to a stub of a node in S− is (1/(M − 1)) · (D−/(M − 3)). Thus,

X 1 1 1 D− E(A) = di(di − 1)(di − 2) di di M − 1 M − 3 i∈S+

1 D− X  2  = di − 3 + M − 1 M − 3 di i∈S+ ! 1 D− X 1 = D+ − 3|S+| + 2 . (A.18) M − 1 M − 3 di i∈S+

38 Similarly

X X 1 1 1 D− E(B) = didj(dj − 1) di dj M − 1 M − 3 i∈S+ j∈S+ i6=j

D− X X = (d − 1) (M − 1)(M − 3) j i∈S+ j∈S+ i6=j

D− X = ((D+ − d ) − (|S+| − 1)) (M − 1)(M − 3) i i∈S+

D− = |S+|D+ − D+ − |S+|2 + |S+| (M − 1)(M − 3)

D− = D+ − |S+| |S+| − 1 . (A.19) (M − 1)(M − 3)

− + − For P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ), we have (see Figure A.2 (b)),

− + − −1 P(X0 ∈ S ,X1 ∈ S ,X2 ∈ S ) = n E(C + D + E), (A.20) where

  X  X 1 1  C =  Ii,j,k1,k2 Ij,l,k3,k4  (A.21) d d − + −  i j  (i,j,l)∈S ×S ×S (k1,k2,k3,k4)∈[di]×[dj ]×[dj ]×[dl] i6=l k26=k3

  X  X 1 1  D =  Ii,j,k1,k2 Ij,i,k3,k4  (A.22) d d − +  i j  (i,j)∈S ×S (k1,k2,k3,k4)∈[di]×[dj ]×[dj ]×[di] k16=k4, k26=k3 and

39   X X 1 1 E = I . (A.23)  d d i,j,k1,k2  − + i j (i,j)∈S ×S (k1,k2)∈[di]×[dj ]

We then have

− X X 1 1 1 D − di E(C) = didj(dj − 1) di dj M − 1 M − 3 i∈S− j∈S+

1 X X = D− − d  (d − 1) (M − 1)(M − 3) i j i∈S− j∈S+

1 X = (D+ − |S+|) D− − d  (M − 1)(M − 3) i i∈S−

D− = (D+ − |S+|)(|S−| − 1), (A.24) (M − 1)(M − 3)

X X 1 1 1 di − 1 E(D) = didj(dj − 1) di dj M − 1 M − 3 i∈S− j∈S+

1 X X = (d − 1) (d − 1) (M − 1)(M − 3) i j i∈S− j∈S+

1 = (D+ − |S+|)(D− − |S−|) (A.25) (M − 1)(M − 3) and finally

X X 1 1 1 1 X X E(E) = didj = 1 di dj M − 1 M − 1 i∈S− j∈S+ i∈S− j∈S+

1 = |S+||S−|. (A.26) M − 1

40 Thus

+ − −1 P(X1 ∈ S ,X2 ∈ S ) = n E(A + B + C + D + E) (A.27) where A, B, C, D and E are as in (A.18), (A.19), (A.24), (A.25) and (A.26).

In similar fashion, we have

− + −1 P(X1 ∈ S ,X2 ∈ S ) = n E(A2 + B2 + C2 + D2 + E2) (A.28)

where A2, B2, C2, D2 and E2 are formed from A, B, C, D and E by swapping signs for all occurrences of D+, D−, S+ and S− in (A.18), (A.19), (A.24), (A.25), and (A.26), respectively.

Let ∆∗ = n(M − 1)(M − 3)∆. Combining (A.12), (A.27) and (A.28) and noting

41 that D2 = D and E2 = E, we have

∗ ∆ = (M − 1)(M − 3) · E((A + B + C) − (A2 + B2 + C2))

X 1 = D− D+ − 3|S+| + 2 + (D+ − |S+|)(|S+| − 1) di i∈S+ ! +(D+ − |S+|)(|S−| − 1)

X 1 −D+ D− − 3|S−| + 2 + (D− − |S−|)(|S−| − 1) di i∈S− ! +(D− − |S−|)(|S+| − 1)

= D−(D+ − |S+|)(|S−| + |S+| − 2) − D+(D− − |S−|)(|S+| + |S−| − 2)

−3(|S+|D− − |S−|D+)

X 1 X 1 +2D− − 2D+ di di i∈S+ i∈S−

X 1 X 1 = (|S+| + |S−| − 2 + 3)(|S−|D+ − |S+|D−) + 2D− − 2D+ . di di i∈S+ i∈S−

(A.29)

Since |S−| + |S+| = n, we have

X 1 X 1 ∆∗ = (n + 1)(|S−|D+ − |S+|D−) + 2D− − 2D+ di di i∈S+ i∈S−

 D+ D−  = (n + 1)|S+||S−| − |S+| |S−|

+ P 1 − P 1 !! 2 D − D + − i∈S di − i∈S di . (A.30) n + 1 |S+| |S−| |S−| |S+|

+ − The result follows upon applying Lemma A.1 with s = |S |, r = |S |,(β1, β2, . . . , βs)

42 + − an ordering of (d(i): i ∈ S ) and (α1, α2, . . . , αr) an ordering of (d(i): i ∈ S ). Note that the quantity in (A.30) is strictly larger than zero, since if d(v) = 2 for all v ∈ S+ and n = 2, S− = {1} and S+ = {2} which contradicts the requirement that M is even.

43 Bibliography

[1] David Aldous and Jim Fill. Reversible markov chains and random walks on graphs, 2002.

[2] Luca Avena, Hakan Guldas, Remco van der Hofstad, and Frank den Hollander. Mixing times of random walks on dynamic configuration models. arXiv preprint arXiv:1606.07639, 2016.

[3] Anna Ben-Hamou and Justin Salez. Cutoff for non-backtracking random walks on sparse random graphs. arXiv preprint arXiv:1504.02429, 2015.

[4] Edward A Bender and E Rodney Canfield. The asymptotic number of labeled graphs with given degree sequences. Journal of Combinatorial Theory, Series A, 24(3):296–307, 1978.

[5] Nathanael Berestycki, Eyal Lubetzky, Yuval Peres, and Allan Sly. Random walks on the random graph. arXiv preprint arXiv:1504.01999, 2015.

[6] Charles Bordenave, Pietro Caputo, and Justin Salez. Random walk on sparse random digraphs. arXiv preprint arXiv:1508.06600, 2015.

[7] Pierre Br´emaud.Random walks on graphs. In Discrete Probability Models and Methods, pages 185–214. Springer, 2017.

[8] Yang Cao and Sheldon M Ross. The friendship paradox. Mathematical Scientist, 41(1):61–64, 2016.

[9] Ningyuan Chen and Mariana Olvera-Cravioto. Directed random graphs with given degree distributions. Stochastic Systems, 3(1):147–186, 2013.

44 [10] Nicholas A Christakis and James H Fowler. Social network sensors for early detection of contagious outbreaks. PLOS ONE, 5(9):e12948, 2010.

[11] Reuven Cohen, Shlomo Havlin, and Daniel Ben-Avraham. Efficient immuniza- tion strategies for computer networks and populations. Physical Review Letters, 91(24):247901, 2003.

[12] Young-Ho Eom and Hang-Hyun Jo. Generalized friendship paradox in complex networks: The case of scientific collaboration. Scientific Reports, 4:4603, 2014.

[13] Young-Ho Eom and Hang-Hyun Jo. Tail-scope: Using friends to estimate heavy tails of degree distributions in large-scale complex networks. Scientific Reports, 5:09752, 2015.

[14] Scott L Feld. Why your friends have more friends than you do. American Journal of Sociology, 96(6):1464–77, 1991.

[15] Babak Fotouhi, Naghmeh Momeni, and Michael G Rabbat. Generalized friend- ship paradox: An analytical approach. In International Conference on Social Informatics, pages 339–352. Springer, 2014.

[16] Manuel Garcia-Herranz, Esteban Moro, Manuel Cebrian, Nicholas A Christakis, and James H Fowler. Using friends as sensors to detect global-scale contagious outbreaks. PLOS ONE, 9(4):e92413, 2014.

[17] Jose L Herrera, Ravi Srinivasan, John S Brownstein, Alison P Galvani, and Lauren Ancel Meyers. Disease surveillance on complex social networks. PLOS Computational Biology, 12(7):e1004928, 2016.

[18] Nathan Oken Hodas, Farshad Kooti, and Kristina Lerman. Friendship paradox redux: Your friends are more interesting than you. CoRR, abs/1304.3480, 2013.

45 [19] Matthew O Jackson. The friendship paradox and systematic biases in percep- tions and social norms. Available at SSRN, 2016.

[20] Hang-Hyun Jo and Young-Ho Eom. Generalized friendship paradox in networks with tunable degree-attribute correlation. Physical Review E, 90(2):022809, 2014.

[21] David A Kim, Alison R Hwong, Derek Stafford, D Alex Hughes, A James O’Malley, James H Fowler, and Nicholas A Christakis. Social network targeting to maximise population behaviour change: a cluster randomised controlled trial. The Lancet, 386(9989):145–153, 2015.

[22] Farshad Kooti, Nathan O Hodas, and Kristina Lerman. Network weirdness: Exploring the origins of network paradoxes. In Eighth International AAAI Con- ference on Weblogs and Social Media, pages 266–274, 2014.

[23] Josh Brown Kramer, Jonathan Cutler, and AJ Radcliffe. The multistep friend- ship paradox. American Mathematical Monthly, 123(9):900–908, 2016.

[24] Kristina Lerman, Xiaoran Yan, and Xin-Zeng Wu. The “majority illusion” in social networks. PLOS ONE, 11(2):e0147617, 2016.

[25] David Asher Levin, Yuval Peres, and Elizabeth Lee Wilmer. Markov chains and mixing times. American Mathematical Soc., 2009.

[26] L´aszl´oLov´asz. Random walks on graphs. Combinatorics, Paul erdos is eighty, 2:1–46, 1993.

[27] Eyal Lubetzky, Allan Sly, et al. Cutoff phenomena for random walks on random regular graphs. Duke Mathematical Journal, 153(3):475–510, 2010.

[28] Ron Milo, Nadav Kashtan, Shalev Itzkovitz, Mark EJ Newman, and Uri Alon. On the uniform generation of random graphs with prescribed degree sequences.

46 arXiv preprint cond-mat/0312028, 2003.

[29] Michael Molloy and Bruce Reed. A critical point for random graphs with a given degree sequence. Random Structures & Algorithms, 6(2-3):161–180, 1995.

[30] Michael Molloy and Bruce Reed. The size of the giant component of a random graph with a given degree sequence. Combinatorics, Probability and Computing, 7(03):295–305, 1998.

[31] Naghmeh Momeni and Michael Rabbat. Qualities and inequalities in online social networks through the lens of the generalized friendship paradox. PLOS ONE, 11(2):e0143633, 2016.

[32] Naghmeh Momeni and Michael Rabbat. Qualities and inequalities in online social networks through the lens of the generalized friendship paradox. PLOS ONE, 11(2):e0143633, 2016.

[33] Naghmeh Momeni and Michael G Rabbat. Measuring the generalized friendship paradox in networks with quality-dependent connectivity. In Complex Networks VI, pages 45–55. Springer, 2015.

[34] Yaron Singer. Influence maximization through adaptive seeding. ACM SIGecom Exchanges, 15(1):32–59, 2016.

[35] Remco Van Der Hofstad. Random graphs and complex networks, volume 1. Cam- bridge University Press, 2016.

[36] Xin-Zeng Wu, Allon G Percus, and Kristina Lerman. Neighbor-neighbor corre- lations explain measurement bias in networks. arXiv preprint arXiv:1612.08200, 2016.

47 Appendix B: A new look at clustering coefficients with generalization to weighted and multi-faction networks

The following paper1 has been submitted to and is currently under revision for the journal Social Networks. Stylistic variations are due to the requirements of the journal. K.S.B and R.C.K performed research and wrote the paper. H.J. contributed to the work in the appendix as well as discussion and results in Section B.2. in the

1K. Berenhaut, R. Kotsonis and H. Jiang, A new look at clustering coefficients with generalization to weighted and multi-faction networks (2017), Social Networks In Revision revision (including Theorem B.2.).

B.1 Introduction

In this paper we propose a new method for studying local and global clustering in networks employing random walk pairs. The method is intuitive and directly generalizes standard local and global clustering coefficients to two-mode networks (as well as weighted networks and networks containing nodes of multiple types).

One often considered local property of social networks is that of (within the ego network of an individual). In particular, suppose an individual v has kv neighbours, and hence kv(kv − 1)/2 distinct pairs of neighbours. A standard measure is the local clustering coefficient, Cv, which is the proportion of these pairs who are themselves connected (see [14]), i.e.

number of pairs of neighbours of v that are connected C = . (B.1) v number of pairs of neighbours of v

Consider a network represented as an undirected graph, G = (V,E), with a set of n vertices or nodes, V = {v1, v2, . . . , vn}, and a set of connections or edges, E.

Averaging Cv over all nodes v then leads to a measure, CG, of global clustering (see [14])

1 X C = C . (B.2) G n v v∈V

Akin to (B.1), an alternative measure of global clustering [15] is given by

number of paths of length 2 in G that are closed C∗ = , (B.3) G number of paths of length 2 in G where a path of length two is a triple (u, v, w) ∈ V 3 satisfying {(u, v), (v, w)} ⊆ E, and such a path is closed when, in addition, (u, w) ∈ E. Barrat et al. [16] and Opsahl

49 ∗ and Panzarasa [17] extended Cv and CG to weighted graphs by incorporating weights of triangles in (B.1) and (B.3), respectively (see also [18] and the references therein).

The study of closure in the neighborhood of an individual is motivated by consid- erations of tension and cohesiveness from the perspective of the individual. Triplets of nodes (triads; see Simmel [19]) – and sentiments, connections, and interactions between members – have been a topic of interest for several decades. For discussion of derived for members based on existent strong or weak connections (or lack thereof) see for instance Granovetter [20], Burt [21] and Coleman [22]. Con- sonance in triads, and implications for the network as a whole, has been considered through aspects of cognitive and structural balance (see Heider [23], Cartwright and Harary [24] and Holland and Leinhardt [25]). For discussion of the influence of social contexts on triadic closure, see for instance Feld [26] and Kossinets and Watts [27], and the references therein.

Rather than simply considering connections between neighbours of a node v ∈ V , one might, more generally, be interested in the proximity of neighbors (of an individ- ual) to each other in the graph. Instead of a binary perspective of connection, one might naturally consider how far apart two randomly chosen neighbors of a particular node are.

Specifically, consider a particular node v ∈ V and uniformly and independently select two neighbours of v, say W1 and W2 (note that W1 and W2 may be equal). A quantity of interest is then the expected value of dG(W1,W2), where for two nodes x and y, dG(x, y) denotes the shortest path distance between x and y. Note that, here dG(W1,W2) is either 0 (if W1 = W2), 1 (if W1 and W2 are neighbours), or 2 (since v is a common neighbour).

Thus, for v ∈ V define γv via

def γv = γv(G) = E(dG(W1,W2)), (B.4)

50 where E represents expected value. The value of γv is bounded between zero and two and is readily interpreted as giving meaningful information regarding clustering near the node of interest. For fixed degree, the exact value is a function of the number of connections among neighbours of v (as is Cv in (B.1)). In particular, setting

Y = dG(W1,W2), k = kv and letting e = ev be the number of pairs of connected neighbours of v, i.e.

e = ev = |{(u1, u2) ∈ V × V : {(u1, u2), (v, u1), (v, u2)} ⊆ E}|, (B.5) we have the probabilities P(Y = 0) = 1/k, P(Y = 1) = e/k2 and P(Y = 2) = 1 − (e + k)/k2. Hence

e 2(k2 − (e + k)) γ = (Y ) = + v E k2 k2 2k(k − 1) − e = . (B.6) k2

Consider the following simple example.

Example 1. Figure B.1 gives a simple network with five nodes. For the central node v, we have P(Y = 0) = 1/4, P(Y = 1) = 4/16, P(Y = 2) = 1/2, and the expected distance between two uniformly and independently selected neighbours W1 and W2 of v is given by γv = 1.25. Corresponding values for the other nodes are

(γ1, γ2, γ3, γ4) = (0, 1/2, 8/9, 1/2).

51 2

3 V 1

4

Figure B.1: A simple five-node network.

Referring to Equation (B.6), γv is monotone in e for fixed k. Hence, inserting the extreme values of zero and k(k −1) for e in (B.6), leads to the following simple result.

Lemma B.1. Suppose node v has degree kv in the graph G, and for any positive integer x, define m(x) = (x − 1)/x and M(x) = 2(x − 1)/x. Then

m(kv) ≤ γv ≤ M(kv), (B.7) and the lower and upper bounds in (B.7) are best possible.

Considering Lemma B.1, one potential normalization of the quantity γv is the

“min-max scaling” of γv (see for instance [28, 29]), i.e.

∗ def γv − m(kv) γv = . (B.8) M(kv) − m(kv)

∗ It follows easily that 0 ≤ γv ≤ 1 for v ∈ V . There is a, perhaps surprising, simple equivalence between the normalized distance in (B.8) and the standard clustering coefficient, as in (B.1).

52 Theorem B.1. Suppose v ∈ V . Then

∗ Cv = 1 − γv . (B.9)

Proof. Writing k = kv, and inserting the values for m(k) and M(k) in (B.7) gives

2k(k − 1) − e − k(k − 1) γ∗ = v k(k − 1) e = 1 − = 1 − C . (B.10) k(k − 1) v

Akin to (B.2), we can define the global value γG via

def 1 X γ = γ . (B.11) G n v v∈V

The value of γG can then be interpreted as the expected distance between two ran- domly chosen neighbours of a randomly chosen node from V .

For discussion of some further concepts related to the clustering coefficients Cv, such as redundancy, efficiency, and effective size, see for instance [30] and the refer- ences therein.

The intuitive sense of γv in (B.4) and Theorem B.1 suggest generalization to other scenarios. The main benefits of the approach taken here center on coverage of clustering in a wide variety of contexts (binary one-mode, weighted one-mode, two-mode, and more generally any undirected network wherein a particular subset of nodes is of interest), and the natural and inherent emphasis on “stronger” ties and network exploration, resulting from the employment of random walks (see, in particular discussion surrounding Figure B.4 in Section 2 and Figures B.8 and B.9 in Section 3). To our knowledge this is the first approach directly applicable in all the above scenarios.

53 The remainder of the paper proceeds as follows. In Sections 2 and 3, we con- sider local clustering in weighted networks and networks with varying node attributes (including two-mode networks), respectively. Section 4 contains some discussion re- garding computational aspects and Section 5 concludes with applications to existent data sets. An appendix is included, which deals with some technicalities from Section 3 regarding two-mode networks.

B.2 Weighted networks

Generalization of clustering coefficients to graphs endowed with a weight function on edges has been considered by several authors (see for instance [18, 31]). The process leading to the definition of γv in (B.4) above extends naturally to such graphs, with similar connections to existing methods (see Theorem B.2, below).

Assume that G = (V, ω) is an undirected weighted graph, with a set of vertices

V , and a symmetric weight function ω from V × V to the non-negative reals, R+. Such graphs arise in many ecological, social, physical and economic studies where the weights can represent varying tie strength, intensity or capacity (see for instance [16, 32, 33, 34, 35, 7, 36, 37]). For v ∈ V , we refer to the set

N(v) def= {w ∈ V : ω(v, w) > 0} (B.12) as the neighbourhood set of v, and the elements of N(v) as the neighbours of v. Define the degree (or strength) function d from v to R+, via

def X d(v) = ω(v, w). (B.13) w∈N(v)

If ω(v, w) ∈ {0, 1} for all v, w ∈ V , G reduces to an unweighted graph, and we can write G = (V,E), where

E = {(v, w) ∈ V × V : ω(v, w) > 0}. (B.14)

54 Suppose v ∈ V is fixed and uniformly and independently select two neighbours

W1 and W2 of v proportionally, via

ω(v, w) ω(v, w) P(W1 = w) = P(W2 = w) = P = . (B.15) u∈N(v) ω(v, u) d(v)

Now, define

γv = γv(ω) = E(dG(W1,W2)) (B.16)

where dG is some reasonable distance function on the the weighted graph G. One could incorporate weights in shortest path distance (as in [38]) or simply use shortest path distance on the underlying unweighted graph with edge set E as in (B.14). In the latter case, we have, once again that 0 ≤ γv ≤ 2; we will use shortest path distance throughout.

Example 2. Consider the small six-node weighted graph, with weights as indicated in Figure B.2. We have, for instance, for node 2 that d(2) = 10 and

4 3 ((W ,W ) = (1, 6)) = . (B.17) P 1 2 10 10

Similarly, computing P((W1,W2) = (w1, w2)) for (w1, w2) ∈ N(2)×N(2) and account- ing for order in pairs gives

4 · 3 4 · 1 4 · 2 3 · 2 3 · 1 1 · 2  134 γ = 2 2 + 2 + 2 + 2 + 1 + 2 = . (B.18) 2 100 100 100 100 100 100 100

In the same fashion, we have

 67 8 10 3 (γ , γ , γ , γ , γ , γ ) = 0, , 1, , , . (B.19) 1 2 3 4 5 6 50 9 9 8

55 Figure B.2: A simple weighted graph.

One particular instance where weighted networks appear is in the context of sci- entific collaboration networks (see for instance [16, 38, 39, 40, 41]). Here the set of nodes is partitioned into two non-intersecting sets, V1 and V2, comprised of scientists and papers, respectively, and the set of edges E consists of connections between sci- entists and co-authored papers. Note that such a graph is bipartite (see for instance [7]). A network consisting of graph theorists and co-authored papers is considered in Section B.5, where we consider more general two-mode network scenarios.

∗ ∗ A projected graph, G = (V1,E ), on the set of scientists, V1, can be obtained by creating a connection when two scientists v, w ∈ V1 collaborate on a paper, i.e.

∗ E = {(v, w) ∈ V1 × V1 :(v, u), (w, u) ∈ E, for some u ∈ V2}. (B.20)

Newman [38] proposed weights {ω(v, w)} for such projected graphs which account for stronger ties between scientists who collaborate on a larger number of papers with a lower number of coauthors, given by

X δu(v)δu(w) ω(v, w) = , (B.21) η(u) − 1 u∈V2 η(u)≥2

56 where δu(v) is zero or one depending on whether scientist v is a coauthor of paper u, and η(u) is the degree of u in the bipartite graph, G, i.e. the number of coauthors on paper u. The weight function in (B.21) is also employed, for instance, in [16, 40].

Note that for v, w ∈ V1, the weight ω(v, w), as in (B.21), divided by d(v) = P ω(v, w) can be viewed as the probability of a non-backtracking random walk w∈V1 departing from v reaching node w in two steps. Non-backtracking random walks have been useful recently in applications (see for instance [42, 43, 44, 45]).

Example 3. Figure B.3 gives a small collaboration graph and its corresponding weighted projection, with weights as in (B.21). Note that, for instance,

1 ω(2, 4) = 1 + 1 + 1 + 1 + , (B.22) 2 since individuals 2 and 4 are sole co-authors on four papers, and authors with indi- vidual 3 on one other. The value of γ2 is given by γ2 = 2 · 1 · (9/10) · (1/10) = 9/50, and the full vector of values of γv is

(γ1, γ2, γ3, γ4) = (0, 9/50, 9/8, 9/50). (B.23)

1 2 1 2

1 0.5

4.5

0.5 3 4 3 4

Figure B.3: A small collaboration graph (left), and its corresponding weighted pro- jection (right), with weights as in (B.21).

57 Regarding normalizing γv in (B.16), similar to Lemma B.1, we have the following.

Lemma B.2. Suppose node v has neighbours u1, u2, . . . , uk with corresponding edge weights ω(v, u1), ω(v, u2), . . . , ω(v, uk) in the graph G, and for any positive integer let pi = ω(v, ui)/d(v) (as in (B.15)). Then

m(v) ≤ γv ≤ M(v), (B.24) where

k ! X 2 m(v) = 1 − pi (B.25) i=1 and M(v) = 2m(v), and the lower and upper bounds in (B.24) are best possible.

Considering Lemma B.2, and normalizing as in (B.8) gives

γ − m(v) γ∗ def= v . (B.26) v M(v) − m(v)

∗ As in the unweighted case, it follows easily that 0 ≤ γv ≤ 1 for v ∈ V , and motivated

∗ by Theorem B.1, the quantity 1 − γv is a generalization of Cv to weighted networks.

In fact when all weights are equal to one, we recover the value of Cv.

Example 2 (revisited). Employing (B.26), we have for the simple network in Figure B.2 that

 3 1  (γ∗, γ∗, γ∗, γ∗, γ∗, γ∗) = ∗, , 0, 0, , 1 , (B.27) 1 2 3 4 5 6 35 3 where the asterisk indicates that for node 1, m(v) = M(v). For comparison employing the standard method in Barrat, et al. [16], incorporating weights of triangles via

58 arithmetic means, i.e., for v ∈ V ,

 −1 X ω(v, u1) + ω(v, u2) X ω(v, u1) + ω(v, u2) cw = v  2  2 u16=u2∈N(v) u16=u2∈N(v) ω(u1,u2)>0

1 X ω(v, u1) + ω(v, u2) = , (B.28) d(v)(|N(v)| − 1) 2 u16=u2∈N(v) ω(u1,u2)>0 we have the local clustering coefficients

 2 1  (cw, cw, cw, cw, cw, cw) = ∗, , 0, 0, , 1 , (B.29) 1 2 3 4 5 6 15 3 where here the asterisk indicates that node 1 satisfies |N(1)| = 1 .

∗ Importantly, to see how 1−γv could be considered an improvement on the method of Barrat, et al [16], consider node 1 in the simple five-node network in Figure B.4,

∗ w with variable weight x > 0. In this case, for x = 1, we have 1 − γ1 = c1 = 1/3. On

∗ w the other hand for x = 100, say, 1 − γ1 = 0.0196, while c1 remains 1/3. Note that from a sociological perspective nodes 3 and 4 may be of little relative consequence to node 1 (with regards to clustering), and hence the missing tie between nodes 2 and

∗ 5 suggests low clustering. In fact if x is allowed to grow arbitrarily large, 1 − γ1 will become arbitrarily small.

Figure B.4: A simple five-node weighted network, with weights indicated adjacent to the corresponding edge.

59 Note that Opsahl and Panzarasa [17] mention that using the geometric mean in place of the arithmetic mean in (B.28), i.e.,

 −1 w X p X p ecv =  ω(v, u1)ω(v, u2) ω(v, u1)ω(v, u2), (B.30) u16=u2∈N(v) u16=u2∈N(v) ω(u1,u2)>0 can help overcome some of the sensitivity issues of the arithmetic mean. In fact, similar to Theorem B.1, we have the following equivalence.

∗ Theorem B.2. Suppose v ∈ V , and γv is as in (B.26). Then

 −1 ∗ X X 1 − γv =  ω(v, u1)ω(v, u2) ω(v, u1)ω(v, u2). (B.31)

u16=u2∈N(v) u16=u2∈N(v) ω(u1,u2)>0

Proof. Set

def X A = ω(v, u1)ω(v, u2) (B.32)

u16=u2∈N(v) ω(u1,u2)>0 and

def X K = ω(v, u1)ω(v, u2). (B.33)

u16=u2∈N(v)

Then, employing (B.26) and the fact that M(v) = 2m(v) gives

 γ  1 − γ∗ = 1 − v − 1 v m(v)

2A + 4(K − A) = 2 − 2 P 2 d(v) − u∈N(v) ω(v, u)

2A + 4(K − A) A = 2 − = . (B.34) 2K K

60 In the next section we explore how the general idea can be extended to considera- tions of clustering of node subsets of interest. The case of two-mode networks is then a subcase.

B.3 Clustering for node subsets of interest

In this section we consider a network for which we are interested in local clustering for the nodes in a particular subset of the node set V . In particular, consider a network

G = (V,E) and suppose some subset of nodes S = {s1, s2, . . . , sq} ⊆ V is selected. These nodes could represent, for instance, infected individuals in a social network (or individuals with some specific attribute such as obesity), crimes on a city street network, or expressed genes in a larger gene network. One important case for us is when G is a two-mode (or bipartite) network and S is either a primary or secondary node set (scientific collaboration graphs are one particular instance).

Now, fix a particular node v ∈ S and consider two random walks on G departing

0 0 0 from v, X0,X1,X2,... and X0,X1,X2,... . Let

T = min{t > 0 : Xt ∈ S \ v} (B.35) and

0 0 T = min{t > 0 : Xt ∈ S \ v}, (B.36) i.e. T and T 0 represent the first time that the associated random walks reach nodes

0 in S other than v (under the assumption that X0 = X0 = v). Similar to (B.4), for v ∈ S let

0 γv = γv(S) = γv(G, S) = E(dG(XT ,XT 0 )), (B.37)

61 where dG is shortest path distance in G. Here γv is a measure of closeness of proximate neighbours, within S, of v. For a partition P = {S1,S2,...,Sκ} of V , we can also define the mean values

1 X X γ (P) = γ (S), (B.38) G n v S∈P v∈S and

1 X γG(Si) = γv(Si), (B.39) |Si| v∈Si for 1 ≤ i ≤ κ.

For further information on random walks on networks see for instance [46, 47, 48, 49].

Example 4. Instances of a small ten-node graph are depicted in Figure 4.

9 9

3 3

10 8 10 8

2 4 2 4

5 7 5 7

1 1 6 6

Figure B.5: Two ten-node networks, each partitioned into two subsets, one of size four (white) and one of size six (grey).

Here we have two partitions of the network into two subsets (six gray nodes and four white nodes). Note that the network is not bipartite in either case. Table B.1 gives the value of γv(S), for each v ∈ V (when v ∈ S). Observe that the mean value

γG(P) for the graph on the left is quite a bit smaller than that for the graph on the

62 right (.716 versus .988), suggesting that the former is, in a sense, more segregated.

Nodes 3 and 10 on the right, with γv values of 1.80 and 1.71, are good examples of how subset placement in the network can lead to larger values of γv (indicating less cohesiveness).

1 2 3 4 5 6 7 8 9 10 White 0 1.11 0.50 0.50 Gray 1.14 0.50 1.11 1.33 0 0.96 White 0.92 1.80 0.70 1.71 Gray 0 1.27 1.08 0.96 1.44 0

Table B.1: The values of γv(G, S) (to two decimal places) for each node (employing the appropriate set S for the node v, so that v ∈ S), in each of the two graphs in Figure B.3. The average values γG(P) are 0.7158 (left) and 0.9876 (right).

Several more networks with partitioned nodes are considered in Section B.5.

We now consider the case of two-mode networks.

B.3.1 Two-mode networks

The collaboration networks mentioned in Section B.2 are examples of more general two-mode networks, which have received considerable attention over the last several years. Here, the set of nodes V = {v1, . . . , vn} is partitioned into two non-intersecting sets, V1 and V2 with possible connections between V1 and V2, but not within either.

Letting S = V1 (or S = V2), Equation (B.37) gives a measure of clustering of nodes within the set. Note that in this case (B.37) can be viewed as

γv = γv(S) = E(dG(W1,W2)) (B.40) where W1 and W2 are independently drawn from the distribution

P(W1 = w) = P(W2 = w) = P(XT = w|X0 = v) (X = w|X = v) = P 2 0 . (B.41) 1 − P(X2 = v|X0 = v)

63 In this case, P((W1,W2) = (w1, w2)) > 0 implies that dG(w1, w2) ∈ {0, 2, 4} and hence

0 ≤ γv ≤ 4.

For a fixed node v ∈ V1, define the sets of nodes at distances one and two of v,

N(v) and N2(v), via

def N(v) = {u ∈ V2 :(u, v) ∈ E} (B.42) and

def N2(v) = {w ∈ V1 \ v :(u, w) ∈ E for some u ∈ N(v)}. (B.43)

In light of Theorems B.1 and B.2, it would, again, be of interest to obtain best possible lower and upper bounds for fixed values, for instance, of k = |N(v)| and

0 k = |N2(v)|. Establishing these bounds remains an open problem, but preliminary heuristics and computation suggest the extremal instances depicted in Figure B.6. The conjectured lower bound is attained when there exists a u∗ ∈ N(v) and w∗ ∈

N2(v), such that for u ∈ N(v) and w ∈ N2(v),

(u, w) ∈ E if and only if u = u∗ or w = w∗. (B.44)

That is, nodes in N2(v) are connected to nodes in N(v) in a one-to-all and all-to-one

0 fashion. Here, one of the kv nodes in N2(v) is connected to each of the nodes in N(v),

0 and the other kv − 1 nodes in N2(v) are connected to one particular node in N(v). The corresponding maximal degree nodes on the left in Figure B.6 are nodes 12 (in

N2(v)) and 2 (in N(v)). The conjectured upper bound is attained when all nodes in

N2(v) are connected to exactly one node in N(v) and for any two nodes u1, u2 ∈ N(v),

|d(u1) − d(u2)| ≤ 1.

64 6 7 8 9 10 11 12 6 7 8 9 10 11 12

2 3 4 5 2 3 4 5

1 1

Figure B.6: Configurations in the ego network of node 1 with γ1 = me (4, 7) = 372/361 (left) and γ1 = Mf(4, 7) = 16/5 (right). Here p = 1 and r = 3 in (B.48).

In the appendix, we prove the following result regarding explicit forms for the conjectured extremal configurations suggested above.

Theorem B.3. Suppose G = (V,E) is a two mode network with primary node set

V1 and secondary node set V2. In addition, suppose v ∈ V , k = kv = |N(v)| and

0 0 0 k = kv = |N2(v)|, and define p and r via k = kp + r with p ≥ 0 and 0 ≤ r < k. The following hold.

∗ ∗ (a) If there exists a u ∈ N(v) and w ∈ N2(v), such that for u ∈ N(v) and w ∈

N2(v),

(u, w) ∈ E if and only if u = u∗ or w = w∗, (B.45)

then

8(k0 − 1)(kk0 + k − 1) γ = m(k, k0) def= . (B.46) v e ((k + 1)k0 + k − 1)2

(b) If for all w ∈ N2(v),

|{u ∈ N(v):(u, w) ∈ E}| = 1 (B.47)

65 and for any two nodes u1, u2 ∈ N(v), |d(u1) − d(u2)| ≤ 1, then

2 0 def (4k − 2)p + (8k − 6)p + 4r − 4 γv = Mf(k, k ) = . (B.48) kp2 + 2kp + r

Proof. See the Appendix.

A plot giving the conjectured enveloping values in (B.46) and (B.48), for small k > 1 and k0 > 1, is given in Figure B.7.

0 0 Figure B.7: The conjectured enveloping values me (k, k ) and Mf(k, k ) in (B.46) and (B.48), for 2 ≤ k ≤ 10 and 2 ≤ k0 ≤ 20.

From a social networks perspective, it would be interesting to know configurations of edges leading to exact values of the supremum and infimum

0 def M(k, k ) = sup γv(G) (B.49) G:v∈G G bipartite 0 0 kv=k; kv=k and

0 def m(k, k ) = inf γv(G) (B.50) G:v∈G G bipartite 0 0 kv=k; kv=k

66 These would give insight into the “most clustered” and “least clustered” neighbour- hoods at distance two, from the perspective of an individual in a two-mode network.

0 0 0 Note that me (k, k ) is an upper bound on m(k, k ), and Mf(k, k ) is a lower bound on M(k, k0). As mentioned, computations suggest that M(k, k0) = Mf(k, k0) and

0 0 0 m(k, k ) = me (k, k ), for k, k ≥ 1. Motivated by Theorem B.1, in lieu of explicit formulae for m(k, k0) and M(k, k0), we can define the normalized value

γ − m(k, k0) ∗ v e γv = , (B.51) e 0 0 Mf(k, k ) − me (k, k )

∗ and 1−γev as an extension of the standard local clustering coefficient, Cv to two-mode networks. See Tables B.2 and B.5, below, for applications to the well-known Davis Southern Women network [50], as well as various other bipartite networks.

∗ 0 0 Note that, as with Cv in (B.1), 1−γev may be undefined (i.e. Mf(k, k ) = me (k, k )), ∗ and one may consider the value of γev as zero or one for such nodes (see for instance [51] and [52, Page 303]). For discussion of handling undefined values in considerations of clustering see [53].

For further discussion of clustering of nodes in bipartite networks see, for instance, Opsahl [1], Latapy et. al. [54], Lind et. al. [55], Robins and Alexander [9], and Zhang et. al. [56]. In general these methods involve closure of cycles (in place of triangles) similar to (B.1) and (B.3) (see also Lind and Herrmann [57]).

As in the case of weighted networks, it is not difficult to see how the quantity in (B.51), can uncover features not covered by standard measures based on cycles. Consider the small networks in Figure B.8. Suppose node 1 is involved in three social “events” (or foci) A, B and C, with A having five additional members (nodes 2–6) and B and C each having one additional member. Now, suppose node 6 (in event A)

67 and 7 (in event B) are in a further event D (as in (a)). The method of Opsahl [1] counting closed four paths via six cycles, i.e.

closed 4-paths centered on node v C∗(v) = , (B.52) 4-paths centered on node v

(where a 4-path is said to be closed if the first and last nodes of the path share a connecting node not part of the 4-path) leads to a local clustering coefficient of C∗(1) = 1/11 = .0909. If node 8, in place of node 6, is involved in event D, the value

∗ ∗ of C (1) does not change. On the other hand, we obtain for 1 − γe1 the values .1269 (for the network in (a)) and .2363 (for the network in (b)). This reflects the fact that nodes 7 and 8 are closer ties with node 1, as they are involved in smaller sized events with the node, and hence a single common event for 7 and 8 is more valuable for clustering.

Figure B.8: Two small two-mode networks, with primary and secondary node sets of size eight and four, respectively.

In addition, consider the plots in Figure B.9. In (a), node 1 is involved in two events, A (with node 2) and B (with node 3). Nodes 2 and 3 are also involved in a third event C. In this case, we have C∗(1) = 1, since the single four path is closed (through event C). For the network in (b), with node 2 also involved in event B, we

∗ ∗ have again that C (1) = 1. On the other hand, for (a), we have 1 − γe1 = .8448,

68 ∗ while for (b) 1 − γe1 = 1, which reflects that 2 and 3 share an additional common

∗ event. In a sense, γev takes into account six-cycles as well as four cycles. See Lind and Herrmann [57] for further discussion of cycles of varying sizes in the context of clustering measures.

Figure B.9: Two simple two-mode networks with three individuals and three events.

Before turning to applications, in the next section we briefly address computing of the values of γv, in (B.4), (B.16) and (B.37).

B.4 Computing values of γv

In this section we briefly address computing of the values of γv, in (B.4), (B.16) and (B.37). Code in the R programming language is available upon request.

Suppose G = (V, ω) is fixed. Let Ω = [ω(vi, vj)], I be the n × n identity matrix, and ∆ be a diagonal matrix with diagonal entries ∆i,i = d(vi), the degree of vi as in

(B.13). The values of γvi in (B.16) are easily computed via the quadratic form

0 X γvi = riDri = ri,jDj,kri,k, (B.53) j where for 1 ≤ i, j ≤ n, ri = (ri,1, . . . , ri,n), Di,j = dG(vi, vj), and ri,j = P(W1 = vj) (as defined in (B.15)). For the case of (B.4), we may employ (B.53) where ω(vi, vj) = 1

69 if (vi, vj) ∈ E and zero otherwise. For two-mode networks, we can similarly employ

(B.53), where ri,j = P(W1 = vj) as in (B.41).

For γv(S) for more general subsets S, an appropriate q × q matrix R = [ri,j] can be obtained in the following manner. Define the matrix L = [Li,j] via

  1 if i = j Li,j = −1/d(i) if i∈ / S and (vi, vj) ∈ E . (B.54)  0 otherwise

Note the L is similar to the random-walk normalized Laplacian matrix, L∗ = I −

−1 ∗ 0 ∆ Ω except that if vi ∈ S, then the i-th row of L is replaced with ei = (0, 0,..., 0, 1, 0 ..., 0), i.e. the i-th row of the n × n identity matrix. Now, similar to (B.35), let

T0 = min{t ≥ 0 : Xt ∈ S}, (B.55)

T1 = min{t > 0 : Xt ∈ S}, (B.56) and also define

−1 X = [xi,j] = L . (B.57)

Then, for vj ∈ S and vi ∈ V ,

xi,j = P(XT0 = j | X0 = i). (B.58)

To account for the fact that we are interested in XT , with T as in (B.35), suppose P = ∆−1Ω is the transition matrix associated with a random walk on the graph G, and let Q = PX. Then for i, j ∈ S,

Qi,j = P(XT1 = j | X0 = i). (B.59)

Finally, for vi, vj ∈ S, let

 Q /(1 − Q ) if i, j ∈ S and i 6= j r = i,j i,i (B.60) i,j 0 otherwise.

70 Note that the latter method for subsets can be employed in the cases of γv in

(B.4), (B.16) and (B.40) by taking S = V , S = V and S = V1, respectively.

We now consider a simple example.

Example 5. Consider the seven-node network in Figure B.10, with selected subset {1, 2, 3, 4}.

2

5 3

1 7

4

6

Figure B.10: A small seven-node network with selected subset S = {1, 2, 3, 4}.

We have

 1.00 0 0 0 0 0 0  0 1.00 0 0 0 0 0    0 0 1.00 0 0 0 0   L =  0 0 0 1.00 0 0 0 , (B.61)   −0.25 −0.25 0 −0.25 1.00 0 −0.25   −0.50 0 0 −0.50 0 1.00 0 0 0 −0.33 −0.33 −0.33 0 1.00

71 1.00 0 0 0 0 0 0  0 1.00 0 0 0 0 0    0 0 1.00 0 0 0 0 −1   X = L =  0 0 0 1.00 0 0 0 , (B.62)   0.27 0.27 0.09 0.36 1.09 0 0.27   0.50 0 0 0.50 0 1.00 0 0.09 0.09 0.36 0.45 0.36 0 1.09

 0 0 0 0.33 0.33 0.33 0  0 0 0.50 0 0.50 0 0    0 0.50 0 0 0 0 0.50   P = 0.25 0 0 0 0.25 0.25 0.25 , (B.63)   0.25 0.25 0 0.25 0 0 0.25   0.50 0 0 0.50 0 0 0 0 0 0.33 0.33 0.33 0 0

0.26 0.09 0.03 0.62 0.36 0.33 0.09 0.14 0.14 0.55 0.18 0.55 0 0.14   0.05 0.55 0.18 0.23 0.18 0 0.55   Q = PX = 0.47 0.09 0.11 0.33 0.36 0.25 0.34 , (B.64)   0.27 0.27 0.09 0.36 0.09 0 0.27   0.50 0 0 0.50 0 0 0 0.09 0.09 0.36 0.45 0.36 0 0.09 and finally

 0 0.12 0.04 0.84 0 0 0 0.16 0 0.63 0.21 0 0 0   0.06 0.67 0 0.28 0 0 0   R = 0.69 0.14 0.17 0 0 0 0 . (B.65)    0 0 0 0 0 0 0    0 0 0 0 0 0 0 0 0 0 0 0 0 0

72 0 Now, with γi = riDri, we have

(γ1, γ2, γ3, γ4) = (0.5564348, 1.1966759, 0.9197531, 1.1295605). (B.66)

In the next section, we consider application to various existent data sets.

B.5 Applications

In this section, we consider applications of the above approach to some existent data sets.

The Davis Southern Women (two-mode) network includes 18 women who attended various social events over a nine-month period (see [50, 58]). Here a woman is linked to an event if she attended that event. Figure B.11 gives a graphical depiction of the 32-node and 93-edge network.

73 E4 CHARLOTTE E3 BRENDA E1 ELEANOR LAURA E5

RUTH E2 E7 THERESA

EVELYN E8 SYLVIA E14 E6 VERNE FRANCES KATHERINE

E9 NORA E13

PEARL DOROTHY HELEN MYRNA FLORA E10

OLIVIA E11 E12

Figure B.11: The Davis Southern Women network. The events are denoted E1 through E14.

Table B.2 gives local clustering values for women in the Southern Women data set. For comparison purposes we include values computed via the method of Opsahl for two-mode networks [1]. Note the distinct contrast between the ordering of values

∗ of 1 − γv compared to that for Opsahl’s local clustering coefficient. The ego networks of two of the women, Charlotte and Olivia, are given in Figure B.12. It is interesting to refer back to the discussion at the end of Section 3 (see Figures B.8 and B.9) to see

∗ manners in which clustering from the perspective of Olivia is higher (1 − γv = 0.883

∗ for Olivia versus 1 − γv = .719 for Charlotte). Recall that the approach, in a sense, takes into account event sizes as well as closed four and six cycles.

74 ∗ Node 1 − γev γv Two-mode LCC Theresa 0.5927093 1.902566 0.7625000 Nora 0.5995321 1.882672 0.8525714 Evelyn 0.6044235 1.868410 0.7781250 Helen 0.6278850 1.835314 0.8482549 Sylvia 0.6324003 1.822672 0.7833859 Brenda 0.6338157 1.806876 0.8400504 Ruth 0.6369044 1.975229 0.6917563 Laura 0.6418841 1.784317 0.8435013 Verne 0.6595936 1.925134 0.7028571 Katherine 0.6707748 1.758843 0.8122924 Eleanor 0.6817243 1.861662 0.7981859 Frances 0.6943762 1.833760 0.8690476 Pearl 0.6974817 1.931060 0.6836735 Dorothy 0.7002586 1.828884 0.7512315 Myrna 0.7002586 1.828884 0.7512315 Charlotte 0.7191568 1.734608 1.0000000 Olivia 0.8834012 1.750000 0.6129032 Flora 0.8834012 1.750000 0.6129032

Table B.2: Local clustering values for women in the Southern Women data set. Here ∗ 0 0 0 0 0 γev = (γv − me (k, k ))/(Mf(k, k ) − me (k, k )), where me (k, k ) and Mf(k, k )) are as in (B.46) and (B.48), respectively. The two-mode LCC is calculated as in [1], for com- parison.

Charlotte Olivia

Figure B.12: The ego networks of women, Charlotte and Olivia, from the Davis Southern Women network.

Various two-mode networks are considered in Tables B.4 and B.5, from a global

75 perspective. Some general details for these networks are given in Table B.3. Note

∗ that the values of 1 − γfG in Table B.5 are often quite distinguished from both the clustering coefficients of Opsahl and Paranzasa [17] and Robins [9], as well as those for the projected one-mode network. In fact, for the three networks for which there

∗ are no nodes, v, with m(v) = M(v), we have GCCR < 1 − γfG < GCCO (for the Davis

∗ Southern Women network), 1 − γfG < GCCR < GCCO (for the US Supreme Court

∗ network) and GCCR < GCCO < 1 − γfG (for the CEO’s and Clubs network).

Network |S1| |S2| |E| Davis Southern Women 18 14 93 Norwegian Directors 818 207 1106 US Supreme Court 9 24 86 Scotland 131 86 348 St. Louis Crime 754 509 1476 CEO’s and Clubs 26 15 98 Authors and Papers 86 167 307

Table B.3: Sizes of the primary node set, secondary node sets and edge set for the two-mode networks considered in Tables B.4 and B.5. The Norwegian Directors network (see [2]) consists of 1495 directors connected to 367 companies on whose boards they served (the largest connected component consists of 818 directors). The US Supreme Court network consists of 9 justices connected to 24 cases, with an edge between a justice and a case whenever the justice voted in the minority for that case [3]. The Scotland network is comprised of 131 directors and 86 joint-stock companies in early 20th century Scotland [4]. The St. Louis Crime network consists of 754 suspects for 509 crimes in 1990’s St. Louis, Missouri, USA [5]. The CEO’s and Clubs network consists of 26 CEO’s and the 15 clubs of which they were members [6], see also [7]. The Authors and Papers network is a collaboration network comprised of 86 authors and 167 papers [8].

76 Network γG(S1) γG(S2) γG({S1,S2}) Davis Southern Women 1.8378 1.8022 1.8222 Norwegian Directors 1.8170 1.7149 1.7964 US Supreme Court 1.5960 1.9377 1.8445 Scotland 2.4669 2.2114 2.3656 St. Louis Crime 1.5188 1.7470 1.6107 CEO’s and Clubs 1.9618 1.8582 1.9239 Authors and Papers 1.2887 1.9147 1.7019

Table B.4: The mean clustering values for some two-mode networks. Here for a subset S ⊆ V , γ (S) is the mean value of γ (G, S) over all v ∈ S and for a partition G P v P P = {S1,S2}, γG(P) is the mean value ( S∈P v∈S γv(S))/n.

∗ Network 1 − γfG GCCO GCCR P rojected Davis Southern Women 0.6811 0.7928 0.4872 0.9284 Norwegian Directors (.0651, .8093, .4735) 0.0114 0.0965 0.6805 US Supreme Court 0.5853 0.9002 0.7319 0.7419 Scotland (.2426, .3723, .18) 0.2622 0.2714 0.3547 St. Louis Crime (.0633, .806, .7009) 0.0325 0.0512 0.5809 CEO’s and clubs 0.678 0.5389 0.3218 0.9259 Authors and Papers (.1759, .6643, .9257) 0.1243 0.1696 0.2721

∗ Table B.5: Global clustering values for some two-mode networks. Here γfG is the mean ∗ value of γev over all v ∈ S (the three values in parentheses indicate values when, for 0 0 ∗ nodes for which me (k, k ) = Mf(k, k ), the corresponding γev values are treated as zero, or one, or are excluded in computing the mean, respectively). GCCO is calculated as in [1], GCCR is calculated as in [9], and the value for P rojected is the one-mode clustering coefficient as in (B.3) for the corresponding projected network.

Graphical comparison of local clustering coefficients against (weighted) degree for four weighted networks, are provided in Figure B.13. The US Airport dataset (see [59]) consists of the the 500 most active US airports, where edges represent flights be- tween those airports in 2002 and tie strength is given by the number of seats available on those flights. For display purposes coefficients have been binned and averaged, for similar degree. The Madrid Train Bombing dataset (see [60]) is a network of 64 indi- viduals involved in the bombings of Madrid commuter trains on March 11, 2004; tie

77 strength here represents strength of connection. The Beach dataset (see [61]) maps the social affiliations of 47 people within the windsurfing community on a southern California beach, with tie strength representing perceived closeness between individ- uals. The Kangaroo network (see [62]) is comprised of 17 kangaroos observed in New South Wales, where tie strength represents observed physical proximity. Note that

∗ results for 1−γv are similar to those for the geometric mean as in (B.30) (see Theorem B.2), but with a distinctly differing interpretation, and a tendency towards slightly larger values.

78 Figure B.13: Comparison of local clustering coefficients against (weighted) degree for four weighted networks. Where appropriate, a log-scale has been used for degree. Clustering coefficients are computed as a function of vertex strengths, for Barrat’s coefficient with arithmetic mean (◦), Barrat’s coefficient with geometric mean (4), the coefficient of Zhang and Horvath [10] (+), the coefficient of Onnela et al [11] (2) ∗ and 1 − γv , as in (B.26) (∗). Note that in each case (undefined) coefficient values for nodes with only one neighbour have been excluded.

Five networks with natural node subsets of interest are considered in Table B.6. Plots of the karate [12] and adolescent health [13] networks are given in Figures

B.14 and B.15, respectively. Note the distinct contrast between γG(S) values for varying subsets S in the Adolescent Health Network. It may be noted that (with

79 P γG = ( v∈V γv)/n) in the case of the Karate network γG > γG(S) for the sets S ∈ P, considered, while the opposite inequality holds in the case of each of the partitions of the Adolescent Health Network. Other networks considered in Table B.6 are the network of dolphins as studied by Lusseau [63] (see also [64]), the Amazon political books network of Krebs [65] and a Macaque brain network (including the visual and sensorimotor cortices) [66].

Network |V | γG Subsets |S| γG(S) Karate 34 0.9753 Faction 1 16 0.8299 Faction 2 18 0.9408 Dolphins 62 1.1258 Pod 1 42 1.1972 Pod 2 20 0.9534 Political Books 105 1.2742 Conservative 49 1.3438 Liberal 43 1.2758 Neutral 13 1.8846 Macaque 45 1.2689 Visual 30 1.2700 Sensorimotor 15 1.1749 Adolescent Health Network (16) 778 1.4829 White 476 1.6600 Black 221 1.7458 Other 81 3.0828 Adolescent Health Network (16) Male 391 2.0372 Female 378 2.0662 Adolescent Health Network (16) Grades 7-8 296 1.6104 Grades 9-12 474 1.5976

Table B.6: Global and subset clustering coefficients for some multi-faction networks.

80 13

18

22 4 8 5 2 14 11 H 10 7 3 31 15 6 20 9 17 19 12 29 A 33 21 32 16 28 23 24 30 25 27 26

Figure B.14: The 34-node and 78-edge two-faction karate social network of Zachary [12]. The nodes represent members of a karate club and edges are determined ac- cording to interactions outside the club. A conflict arose within the group leading to allegiances as indicated.

Figure B.15: A network of friendship choices in a school [13]. Top left is partitioned by race; top right is partitioned by gender and bottom is partitioned by grade (7–8 and 9–12).

81 B.6 Conclusion

We have herein proposed a method to measure cohesion in networks for binary one- mode, weighted one-mode, two-mode, and more generally any undirected network wherein a particular subset of nodes is of interest. To our knowledge this is the first such approach directly applicable in all the above scenarios. In particular, we are unaware of any previous approaches to evaluate clustering for all types of nodal subsets.

Note that the approach presented directly extends for application to directed networks. A distance function for pairs of nodes is required for full application of (B.4), (B.16), and (B.37); in the absence of some path connectedness assumptions, one could employ shortest path distance for the underlying undirected graph. It would be of interest to further consider applicability in the directed case, with particular attention to the application of random walks pairs from a sociological perspective; this is ongoing work.

82 Bibliography

[1] T. Opsahl, Triadic closure in two-mode networks: Redefining the global and local clustering coefficients, Social Networks 35 (2) (2013) 159–167.

[2] C. Seierstad, T. Opsahl, For the few not the many? The effects of affirmative action on presence, prominence, and social capital of women directors in Norway, Scandinavian Journal of Management 27 (1) (2011) 44–54, Data Accessed: 2016- 07-1 .

[3] P. Doreian, V. Batagelj, A. Ferligoj, Generalized blockmodeling of two-mode network data, Social Networks 26 (1) (2004) 29–53.

[4] J. Scott, M. Hughes, The anatomy of Scottish capital: Scottish companies and Scottish capital, 1900-1979, McGill-Queen’s Press-MQUP, 1980.

[5] L. C. Freeman, Rosenfeld, White - St. Louis Crime, Data Accessed: 2016-07-1 .

[6] J. Galaskiewicz, Social Organization of an Urban Grants Economy, Aca- demic Press, 1985, Data Accessed: 2016-07-1 .

[7] S. Wasserman, K. Faust, Social network analysis: Methods and applications, Vol. 8, Cambridge University Press, 1994.

[8] W. Imrich, S. Klavzar, Product graphs, Wiley, 2000, Data Accessed: 2016-07-1 .

83 [9] G. Robins, M. Alexander, Small worlds among interlocking directors: Network structure and distance in bipartite graphs, Computational & Mathematical Or- ganization Theory 10 (1) (2004) 69–94.

[10] B. Zhang, S. Horvath, et al., A general framework for weighted gene co-expression network analysis, Statistical applications in genetics and molecular biology 4 (1) (2005) 1128.

[11] J.-P. Onnela, J. Saram¨aki,J. Kert´esz,K. Kaski, Intensity and coherence of motifs in weighted complex networks, Physical Review E 71 (6) (2005) 065103.

[12] W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research (1977) 452–473 Data Accessed: 2016-07-1 .

[13] J. Moody, Peer influence groups: identifying dense clusters in large net- works, Social Networks 23 (4) (2001) 261–283, Data Accessed: 2016-07-1 .

[14] D. J. Watts, S. H. Strogatz, Collective dynamics of ’small-world’ networks, Na- ture 393 (6684) (1998) 440–442.

[15] M. E. Newman, S. H. Strogatz, D. J. Watts, Random graphs with arbitrary degree distributions and their applications, Physical Review E 64 (2) (2001) 026118.

[16] A. Barrat, M. Barthelemy, R. Pastor-Satorras, A. Vespignani, The architecture of complex weighted networks, Proceedings of the National Academy of Sciences of the United States of America 101 (11) (2004) 3747–3752.

[17] T. Opsahl, P. Panzarasa, Clustering in weighted networks, Social Networks 31 (2) (2009) 155–163.

84 [18] J. Saram¨aki,M. Kivel¨a,J.-P. Onnela, K. Kaski, J. Kertesz, Generalizations of the clustering coefficient to weighted complex networks, Physical Review E 75 (2) (2007) 027105.

[19] G. Simmel, K. H. Wolff, The sociology of Georg Simmel, Vol. 92892, Simon and Schuster, 1950.

[20] M. S. Granovetter, The strength of weak ties, American journal of sociology 78 (6) (1973) 1360–1380.

[21] R. S. Burt, Structural holes: The social structure of competition, Harvard uni- versity press, 1992.

[22] J. S. Coleman, Social capital in the creation of human capital, American journal of sociology 94 (1988) S95–S120.

[23] F. Heider, Attitudes and cognitive organization, The Journal of psychology 21 (1) (1946) 107–112.

[24] D. Cartwright, F. Harary, Structural balance: a generalization of heider’s theory., Psychological review 63 (5) (1956) 277.

[25] P. W. Holland, S. Leinhardt, Transitivity in structural models of small groups, Comparative Group Studies 2 (2) (1971) 107–124.

[26] S. L. Feld, The focused organization of social ties, American journal of sociology 86 (5) (1981) 1015–1035.

[27] G. Kossinets, D. J. Watts, Origins of homophily in an evolving social network 1, American journal of sociology 115 (2) (2009) 405–450.

[28] A. Jain, K. Nandakumar, A. Ross, Score normalization in multimodal biometric systems, Pattern Recognition 38 (12) (2005) 2270–2285.

85 [29] S. Aksoy, R. M. Haralick, Feature normalization and likelihood-based similarity measures for image retrieval, Pattern Recognition Letters 22 (5) (2001) 563–582.

[30] V. Latora, V. Nicosia, P. Panzarasa, Social cohesion, structural holes, and a tale of two measures, Journal of Statistical Physics 151 (3-4) (2013) 745–764.

[31] B. Phan, K. Engø-Monsen, Ø. D. Fjeldstad, Considering clustering measures: Third ties, means, and triplets, Social Networks 35 (3) (2013) 300–308.

[32] M. E. J. Newman, Analysis of weighted networks, Phys. Rev. E 70 (2004) 056131.

[33]M. A.´ Serrano, M. Bogun´a,A. Vespignani, Extracting the multiscale backbone of complex weighted networks, Proceedings of the National Academy of Sciences 106 (16) (2009) 6483–6488.

[34] T. Zhou, J. Ren, M. Medo, Y.-C. Zhang, Bipartite network projection and per- sonal recommendation, Physical Review E 76 (4) (2007) 046115.

[35] M. Barth´elemy, A. Barrat, R. Pastor-Satorras, A. Vespignani, Characterization and modeling of weighted networks, Physica A: Statistical Mechanics and its Applications 346 (1) (2005) 34–43.

[36] T. Opsahl, F. Agneessens, J. Skvoretz, Node centrality in weighted networks: Generalizing degree and shortest paths, Social Networks 32 (3) (2010) 245–251.

[37] S. H. Yook, H. Jeong, A.-L. Barab´asi,Y. Tu, Weighted evolving networks, Phys. Rev. Lett. 86 (2001) 5835–5838. URL http://link.aps.org/doi/10.1103/PhysRevLett.86.5835

[38] M. E. Newman, Scientific collaboration networks. ii. shortest paths, weighted networks, and centrality, Physical Review E 64 (1) (2001) 016132.

86 [39] M. E. Newman, The structure of scientific collaboration networks, Proceedings of the National Academy of Sciences 98 (2) (2001) 404–409.

[40] M. E. Newman, Coauthorship networks and patterns of scientific collaboration, Proceedings of the National Academy of Sciences 101 (suppl 1) (2004) 5200–5205.

[41] Y.-H. Eom, H.-H. Jo, Generalized friendship paradox in complex networks: The case of scientific collaboration, Scientific Reports 4 (2014) 4603.

[42] N. Alon, I. Benjamini, E. Lubetzky, S. Sodin, Non-backtracking random walks mix faster, Communications in Contemporary Mathematics 9 (04) (2007) 585– 603.

[43] E. Lubetzky, A. Sly, Cutoff phenomena for random walks on random regular graphs, Duke Mathematical Journal 153 (3) (2010) 475–510.

[44] N. Alon, M. Capalbo, Optimal universal graphs with deterministic embedding, in: Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, 2008, pp. 373–378.

[45] C.-H. Lee, X. Xu, D. Y. Eun, Beyond random walk and metropolis-hastings samplers: why you should not backtrack for unbiased graph sampling, in: ACM SIGMETRICS Performance Evaluation Review, Vol. 40, ACM, 2012, pp. 319– 330.

[46] L. Lov´asz,Random walks on graphs, Combinatorics, Paul erdos is eighty 2 (1993) 1–46.

[47] D. Aldous, J. Fill, Reversible markov chains and random walks on graphs (2002).

[48] H. Zhou, R. Lipowsky, Network brownian motion: A new method to measure vertex-vertex proximity and to identify communities and subcommunities, in:

87 Computational Science-ICCS 2004, Springer, 2004, pp. 1062–1069.

[49] P. Pons, M. Latapy, Computing communities in large networks using random walks, in: Computer and Information Sciences-ISCIS 2005, Springer, 2005, pp. 284–293.

[50] A. Davis, B. B. Gardner, M. R. Gardner, W. L. Warner, Deep South: A Sociological Anthropological Study of Caste and Class, University of Chicago Press, 1941, Data Accessed: 2016-07-1 .

[51] T. Schank, D. Wagner, Approximating clustering coefficient and transitivity, J. Graph Algorithms Appl. 9 (2) (2005) 265–275 (electronic).

[52] U. Brandes, T. Erlebach, Network analysis: methodological foundations, Vol. 3418, Springer Science & Business Media, 2005.

[53] M. Kaiser, Mean clustering coefficients: the role of isolated nodes and leafs on clustering measures for small-world networks, New Journal of Physics 10 (8) (2008) 083042.

[54] M. Latapy, C. Magnien, N. Del Vecchio, Basic notions for the analysis of large two-mode networks, Social networks 30 (1) (2008) 31–48.

[55] P. G. Lind, M. C. Gonz´alez,H. J. Herrmann, Cycles and clustering in bipartite networks, Physical Review E 72 (5) (2005) 056127.

[56] P. Zhang, J. Wang, X. Li, M. Li, Z. Di, Y. Fan, Clustering coefficient and com- munity structure of bipartite networks, Physica A: Statistical Mechanics and its Applications 387 (27) (2008) 6869–6875.

88 [57] P. G. Lind, H. J. Herrmann, New approaches to model and study social networks, New Journal of Physics 9 (7) (2007) 228.

[58] L. C. Freeman, Finding social groups: A meta-analysis of the southern women data, in: R. Breiger, K. Carley, P. Pattison (Eds.), Dynamic Social Network Modeling and Analysis, The National Academy Press, Washington D.C., 2003.

[59] V. Colizza, R. Pastor-Satorras, A. Vespignani, Reaction–diffusion pro- cesses and metapopulation models in heterogeneous networks, Na- ture Physics 3 (4) (2007) 276–282, Data Accessed: 2017-05-30 .

[60] B. Hayes, Computing science: Connecting the dots, Ameri- can Scientist 94 (5) (2006) 400–404, Data Accessed: 2017-05-30 .

[61] L. C. Freeman, S. C. Freeman, A. G. Michaelson, On human social intelligence, Journal of Social and Biological Structures 11 (4) (1988) 415–425, Data Accessed: 2017-05-30 .

[62] T. Grant, Dominance and association among members of a captive and a free-ranging group of grey kangaroos (macropus giganteus), An- imal Behaviour 21 (3) (1973) 449–456, Data Accessed: 2017-05-30 .

[63] D. Lusseau, K. Schneider, O. J. Boisseau, P. Haase, E. Slooten, S. M. Dawson, The bottlenose dolphin community of doubtful sound features a large proportion of long-lasting associations, Behavioral Ecol- ogy and Sociobiology 54 (4) (2003) 396–405, Data Accessed: 2016-07-1 .

89 [64] D. Lusseau, M. E. Newman, Identifying the role that animals play in their social networks, Proceedings of the Royal Society of London B: Biological Sciences 271 (Suppl 6) (2004) S477–S481.

[65] V. Krebs, Unpublished (http://www.orgnet.com), Data Accessed: 2016-07-1 .

[66] L. N´egyessy, T. Nepusz, L. Kocsis, F. Bazs´o,Prediction of the main cortical areas and connections involved in the tactile function of the visual cortex by network analysis, European Journal of Neuroscience 23 (7) (2006) 1919–1930, Data Accessed: 2016-07-1 .

B.7 Appendix

In this appendix we prove Theorem B.3 regarding computationally appropriate for-

0 0 mulae for me (k, k ) and Mf(k, k ).

Proof of Theorem B.3. First, let Y = dG(W1,W2), with W1 and W2 as in (B.41) and define α : V → [0, 1] and ξ : V → [0, 1] via

α(w) = P(X2 = w|X0 = v), (B.67) and

α(w) ξ(w) = , (B.68) 1 − α(v)

Then by (B.41)

X 2 P(Y = 0) = ξ (w), (B.69) w∈N2(v)

90 and

X ξ(w) = 1. (B.70)

w∈N2(v)

Suppose that

N(v) = {u1, u2, . . . , uk} and N2(v) = {w1, w2, . . . , wk0 }, (B.71) and let ci = d(ui) for 1 ≤ i ≤ k.

∗ ∗ 0 For (a), without loss of generality, assume that u1 = u and w1 = w c1 = k + 1 and ci = 2 for 2 ≤ i ≤ k. Then

1  1 k − 1 1 kk0 + k − k0 + 1 α(w∗) = α(v) = + = (B.72) k k0 + 1 2 k 2(k0 + 1) and for 2 ≤ i ≤ k0

1 1 α(w ) = . (B.73) i k k0 + 1

Thus,

α(w∗) kk0 + k − k0 + 1 ξ(w∗) = = (B.74) 1 − α(v) kk0 + k + k0 − 1 and for 2 ≤ i ≤ k0

α(w ) 2 ξ(w ) = i = . (B.75) i 1 − α(v) kk0 + k + k0 − 1

Combining (B.74) and (B.75) and simplifying gives

k0 X 2 P(Y = 0) = ξ (wi) i=1

kk0 + k − k0 + 12  2 2 = + (k0 − 1) . kk0 + k + k0 − 1 kk0 + k + k0 − 1

(B.76)

91 0 Since, dG(wi, wj) ∈ {0, 2} for all 1 ≤ i, j ≤ k , we have

4(kk02 − k − k0 + 1) m(k, k0) = 2(1 − (Y = 0)) = 2 , (B.77) e P (kk0 + k + k0 − 1)2 and the result follows.

To prove (b), assume nodes u1, u2, ··· , ur have degree p+2 and nodes ur+1, ··· , uk have degree p + 1. For 1 ≤ i ≤ k, define the set Γi

def Γi = {w ∈ N2(v):(w, ui) ∈ E}. (B.78)

We then have

   1 r · 1 + (k − r) · 1 . w = v  k p+2 p+1 α(w) = (B.79) 1/(k (p + 2)) w ∈ ∪1≤i≤rΓi   1/(k (p + 1)) w ∈ ∪r+1≤i≤kΓi, and hence

( p+1 α(w) kp2+2kp+r w ∈ ∪1≤i≤rΓi ξ(w) = = p+2 (B.80) 1 − α(v) kp2+2kp+r . w ∈ ∪r+1≤i≤kΓi

Thus employing (B.69) gives

k0 2 X  p + 1  (Y = 0) = ξ2(w ) = r · (p + 1) · P i kp2 + 2kp + r i=1

 p + 2 2 +(k0 − r · (p + 1)) · kp2 + 2kp + r

(k0 − 2r)p2 + (4k0 − 5r)p − 3r + 4k0 = . (B.81) (kp2 + 2kp + r)2

Now, for 1 ≤ i ≤ k0, let

X ai = P (XT ∈ Γi) = ξ(w), (B.82)

w∈Γi

92 i.e. ai is the probability that (XT , ui) ∈ E, and note that for 1 ≤ i ≤ r

p + 1 a = (p + 1) · , (B.83) i kp2 + 2kp + r while for r + 1 ≤ i ≤ k,

p + 2 a = p · . (B.84) i kp2 + 2kp + r

0 We have that Y = 4 if and only if XT and XT 0 share no common neighbours in N(v). Hence

X P(Y = 4) = ai · aj 1≤i,j≤k i6=j

= r(r − 1)a1 + (k − r)(k − r − 1)ak + 2r(k − r)a1ak.

(B.85)

Since

P(Y = 2) = 1 − P(Y = 4) − P(Y = 0), (B.86) employing (B.81) and (B.85), and inserting k0 = p · k + r gives

0 Mf(k, k ) = 4P(Y = 4) + 2P(Y = 2)

= 4P(Y = 4) + 2(1 − P(Y = 4) − P(Y = 0))

= 2 + 2P(Y = 4) − 2P(Y = 0) (B.87) (4k − 2)p2 + (8k − 6)p + 4r − 4 = , (B.88) kp2 + 2kp + r and the proof is complete.

93 Curriculum Vitae Hongyi Jiang

BORN: March 6th 1993, Nanchang, China UNDERGRADUATE STUDY: Sichuan University Chengdu, China B.S., Mathematics, June 2015 GRADUATE STUDY: Wake Forest University Winston-Salem, North Carolina M.A., Statistics, August 2017

Honors and Awards

1. CanaDAM 2017 Student Travel Award

2. Outstanding Master Student, Department of Mathematics and Statistics, WFU, 2016-17

3. Member, Pi Mu Epsilon (National Mathematics Honor Society; April 2016)

4. Teaching Assistantship in 2016 granted by Wake Forest University

5. Tuition Scholarship in 2015 granted by Wake Forest University

6. Honor of School Excellent Student in 2011

Journal Articles

[1] K. S. Berenhaut, H. Jiang. The friendship paradox for weighted and directed networks, in revision for Probability in Engineering and Information Sciences

94 [2] K. S. Berenhaut, H. Jiang, K. M. McNab and E. J. Krizay The degree-wise effect of a second step for a random walk on a graph. Submitted to Journal of Applied Probability.

[3] K. S. Berenhaut, R. Kotsonis and H. Jiang, A new look at clustering coefficients with generalization to weighted and multi-faction networks. Revision submitted to Social Networks

Presentation

“A new look at the friendship paradox – weighted and directed networks, connec- tivity and activity”, CanadAM, Toronto, Canada, June 2017.

95