Distributed k-Core Decomposition of Dynamic Graphs Paul Jakma University of Glasgow paul@jakma.org Marcin Orczyk ∗ University of Glasgow orczykm@google.com Colin Perkins University of Glasgow csp@csperkins.org Marwan Fayed University of Stirling mmf@cs.stir.ac.uk ABSTRACT The k-core decomposition can be used to reveal structure in a graph. It is straight-forward to implement using a centralised algorithm with complete knowledge of the graph, but no distributed k-core decomposition algorithm has been published. We present a con- tinuous, distributed, k-core decomposition algorithm for dynamic graphs, outline a proof of correctness, and give initial performance results. We briefly describe an application of this distributed k-core algorithm to landmark selection for compact routing. Categories and Subject Descriptors G.2.2 [Graph Theory]: Graph Algorithms Keywords Graph decomposition, distributed algorithm 1. INTRODUCTION Graph decomposition is widely used for analysing the structure of social networks, for network visualisation, in developing new routing algorithms, and in other applications. Many of the networks to be analysed are large and/or geographically distributed. This has led to interest in distributed algorithms for graph decomposition. The k-core decomposition algorithm [1] can reveal a central, well-connected, core of nodes in a graph; the kmax-core or nu- cleus. Previous work [4] has shown that the nucleus of the Internet Autonomous System (AS) graph is appropriate for use as a land- mark set for Thorup-Zwick (TZ) compact routing [5]. However, known algorithms for k-core graph decomposition are centralised and unsuitable for use in a distributed routing protocol (indeed, it is only recently that attention has been given to the k-core decom- position of dynamic graphs [2]). In the following, we outline a distributed algorithm for k-core decomposition of a dynamic graph. We sketch proofs of correctness and convergence, and present initial performance results. The availability of a distributed algorithm for ∗ Current affiliation: Google Inc Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. CoNEXT Student’12, December 10, 2012, Nice, France. Copyright 2012 ACM 978-1-4503-1779-5/12/12 ...$15.00. Figure 1: k-core decomposition of a simple graph k-core decomposition of the AS graph brings us one step closer to a practical TZ compact routing protocol. 2. BACKGROUND The k-core decomposition of a graph produces a sequence of nested subgraphs of gradually increasing cohesion. Each node in the graph is assigned to a sequence of cores, so that in a k-core each node must have at least k other neighbours. The number k in this context is then an indicator of the centrality in the network: nodes within a higher k valued k-core are more central to the network than the nodes outside of that k-core. An example is shown in Figure 1 with the k-cores labelled: all nodes are in the 1-core; a subset of those are in the 2-core; and two disjoint subgraphs form the 3-core. Algorithm 1 Graph-centric k-core algorithm 1: k ← 0 2: G k ← G 3: while |G k | > 0 do 4: while {n ∈ G k : k> |deg(n)|}= ∅ do 5: G k ← G k \{n ∈ G k : k> |deg(n)|} 6: end while 7: G k+1 ← G k 8: k ← k +1 9: end while A k-core of a graph, G, is formally defined as follows: “If H is a subgraph of G, δ (H) will denote the minimum degree of H; each point of H is thus adjacent to at least δ (H) other points of H. If H is a maximal connected (induced) subgraph of G with δ (H) ≥ k, we say that H is a k-core of G.” [3] The k-core decomposition of a graph is the production of all non-empty k-core sub-graphs. That is, the process of finding all k-cores within the graph and determining the k-core membership of each node. A k-core decomposition algorithm for static graphs is shown in Algorithm 1. It starts by assigning all nodes, including disconnected nodes, to the 0 th -core. Then, it continuously removes all 0-degree vertices (and their edges) from the graph until no more such vertices remain; the remaining vertices form the k =1 core. Then, all 1-degree nodes are continuously removed, and so on, until 39