• Nenhum resultado encontrado

Exploração do comportamento de um algoritmo combinatório para o particionamento de grafos núcleo-periferia

N/A
N/A
Protected

Academic year: 2021

Share "Exploração do comportamento de um algoritmo combinatório para o particionamento de grafos núcleo-periferia"

Copied!
38
0
0

Texto

(1)

UNIVERSIDADE TECNOL ´

OGICA FEDERAL DO PARAN ´

A

DEPARTAMENTO ACADˆ

EMICO DE INFORM ´

ATICA

CURSO DE BACHARELADO EM SISTEMAS DE INFORMAC

¸ ˜

AO

TRABALHO DE CONCLUS ˜

AO DE CURSO

AN EXPLORATION ON THE BEHAVIOUR OF A

COMBINATORIAL ALGORITHM FOR CORE-PERIPHERY

GRAPH PARTITIONING

HENRIQUE ANTUNES RODRIGUEZ

CURITIBA 2018

(2)

An Exploration on the Behaviour of a Combinatorial Algorithm for

Core-Periphery Graph Partitioning

Henrique Antunes Rodriguez

henriquerodriguez@alunos.utfpr.edu.br

June 29, 2018

Trabalho de conclus˜ao de curso apresentado como requisito parcial para a obten¸c˜ao do grau de Bacharel em Sistemas de Informa¸c˜ao atrav´es da Universidade Tecnol´ogica Federal do Paran´a

Orientador: prof. Dr. Gustavo A. Gim´enez-Lugo

CURITIBA 2018

(3)

Ministério da Educação

UNIVERSIDADE TECNOLÓGICA FEDERAL DO PARANÁ Câmpus Curitiba

Diretoria de Graduação e Educação Profissional Departamento Acadêmico de Informática

Coordenação do Curso de Bacharelado em Sistemas de Informação

TERMO DE APROVAÇÃO

AN EXPLORATION ON THE BEHAVIOUR OF A COMBINATORIAL

ALGORITHM FOR CORE-PERIPHERY GRAPH PARTITIONING

por

“Henrique Antunes Rodriguez”

Este Trabalho de Conclusão de Curso foi apresentado como requisito parcial à obtenção do grau de Bacharel em Sistemas de Informação na Universidade Tecnológica Federal do Paraná - UTFPR - Câmpus Curitiba. O aluno fo i arguido pelos membros da Banca de Avaliação abaixo assinados. Após deliberação a Banca de Avaliação considerou o trabalho ________________________________________.

________________________________

Gustavo Alberto Giménez-Lugo

(Presidente - UTFPR/Curitiba)

________________________________

<Prof. Ricardo Dutra da Silva>

(Avaliador(a) 1 – UTFPR/Curitiba)

________________________________ <Prof. Leonardo Geovany Da Silva Zanin>

(Avaliador 2(a) - UTFPR/Curitiba)

________________________________

<Profa. Leyza E. Baldo Dorini>

(Professora Responsável pelo TCC – UTFPR/Curitiba)

_____________________________

<Prof. Leonelo Dell Anhol Almeida>

(Coordenador do curso de Bacharelado em Sistemas de Informação – UTFPR/Curitiba)

(4)

ABSTRACT

Most real life large-scale networks present a topological structure that can be partitioned into two sub-structures, the Core and the Periphery. When such a partitioning is achieved, an analysis of the behaviour of the core can be extrapolated to obtain an understanding of the behaviour of the entire network. Due to their reliability, spectral algorithms have so far dominated the field of study when it comes to identifying the core of a network; however, spectral algorithms perform very complex computations, which are computationally expensive, and educationally complicated. This study is an exploration into the way an algorithm, based on a non-spectral approach, would perform when tested on a set of graphs with varied structures, attempting to determine whether it could be a viable, simple, and fast alternative to the complex and costly algorithms currently dominating this subject.

(5)

RESUMO

A maioria das redes reais de larga escala apresenta uma estrutura topol´ogica que pode ser particionada em duas subestruturas, o N´ucleo e a Periferia. Quando tal particionamento ´e realizado, uma an´alise do comportamento do n´ucleo pode ser extrapolada para se obter uma compreens˜ao do comportamento de toda a rede. Devido `a sua confiabilidade, os algoritmos espectrais at´e o momento dominam o campo de estudo quando se trata de identificar o n´ucleo de uma rede; entretanto, os algoritmos espectrais executam c´alculos muito complexos, que s˜ao computacionalmente caros e educacionalmente complicados. Este estudo ´e uma explora¸c˜ao da maneira como um algoritmo, baseado em uma abordagem n˜ao-espectral, se comporta quando testado em um conjunto de grafos com estruturas variadas, tentando determinar se ele poderia ser uma alternativa vi´avel, simples e r´apida aos complexos e caros algoritmos atualmente dominando este assunto.

(6)

List of Figures

1 Example of a Network with the Core-Periphery Structure . . . 10

2 Freeman’s Star . . . 10

3 Example of a Graph mapped into a version of the Freeman’s Star . . . 11

4 A network with the Rich-club structure[1]. . . 11

5 A network with the Nested structure[1] . . . 12

6 A network with the Bow-tie structure. Adapted from [2] . . . 12

7 A network with the Onion structure[1] . . . 13

8 Example of Mesh-Graph Equivalence . . . 15

9 Pseudocode for the Coordinate Nested Disection algorithm. . . 16

10 Pseudocode for the Recursive Inertial Bisection algorithm. . . 16

11 Pseudocode for the Space-filling Curves algorithm. . . 17

12 Pseudocode for the Levelized Nested Disection algorithm. . . 17

13 Pseudocode for the Bubble Framework algorithm. . . 18

14 Pseudocode for the Kernigham-Lin refinement algorithm. . . 19

15 Pseudocode for the Fiduccia-Mattheyses refinement algorithm. . . 19

16 Pseudocode for the Recursive Spectral Bisection algorithm. . . 20

17 Algorithm 1 . . . 22

18 Algorithm 2 . . . 23

19 Multilevel Paradigm[3] . . . 24

20 Freeman’s Star . . . 24

21 Code for the 3BS Algorithm part 1 . . . 35

22 Code for the 3BS Algorithm part 1 . . . 36

(7)

List of Tables

1 Proposed Algorithms and Modifications . . . 25

2 List of Graphs . . . 26

3 Results of the experiments . . . 28

4 Comparative analysis of Core Connectivity and Periphery Connectivity . . . 29

(8)

Contents

1 Introduction 8

1.1 Objective . . . 8

1.1.1 Contributions . . . 8

1.2 Structure of the Text . . . 8

2 Graph Partitioning 8 2.1 K-way partitioning . . . 9

2.2 Core-Periphery . . . 9

2.3 Alternative Graph Partitioning Models . . . 12

2.4 Algorithmic Approaches . . . 15

3 Proposal and Experiments 21 3.1 Proposed Algorithms . . . 21 3.2 Summarized Algorithms . . . 24 3.3 Experiments . . . 24 4 Result Analysis 27 5 Discussion 28 5.1 Future Works . . . 30 A Code 35

(9)

1

Introduction

Most real life large-scale networks present a topological structure that can be partitioned into two sub-structures. The first, composed of the more densely interconnected nodes, is called the core, while the more sparse unconnected nodes form the periphery. Though there are other partitions which can be applied to a network[4, 5, 6], the core-periphery partition - formally defined by Borgatti and Everett[7] - is the most interesting to the study of more sizeable real life networks. Because in such a partition, the behaviour of the entire network is determined by the behaviour of the core[5], finding and studying a network’s core is a more efficient way of understanding how the network behaves, due to its large size.

Using core-periphery partitioning, this study has the objective of analyzing the results and performance of a simple core detection algorithm inspired by algorithmic approaches to K-way partitioning, developed as part of this study. This algorithm will be tested on a set of graphs from the well known Walshaw Benchmark[8] for graph partitioning, as well as a second set of selected graphs from other well-established graph databases (GEPHI[9], Stanford[10], and PAJEK[11]. A comparative analysis will be made between the results obtained for two sets of graphs, which present different structural characteristics; the Walshaw graphs exhibits characteristics of the Erd¨os-R´enyi model of random graphs1, while the second set of graphs

exhibits characteristics of the Barab´asi-Albert model of scale-free networks2.

1.1

Objective

The study aims to examine the Graph Partitioning problem, particularly on the context of core detection, through experiments performed on graphs obtained from well-known databases; and providing an examination on the influence of certain structural qualities on the result and performance of a core detection algorithm; attempting to answer the question: How does a core-detection algorithm based on a combinatorial approach perform on differently structured graphs?

1.1.1 Contributions

On the course of the development of the study, a few intermediary results will be attained, in order to achieve the main objective.

• Developing new algorithms and heuristics for core detection;

• Testing the core detection algorithms developed on well-known graphs;

1.2

Structure of the Text

Section 2 provides some background information on the graph partitioning problem, with its different forms, and algorithmic approaches to solving them, which served as inspiration to the development of the algorithm developed for the experiments in this study; this algorithm is presented in Section 3, along with a blueprint of the experiments performed. Section 4 presents a detailed analysis of the results of the aformentioned experiments; and Section 5 provides an overview of the project and future works.

2

Graph Partitioning

In general terms, graph partitioning can be described as dividing a graph G = (V,E) into 2 or more subgraphs G’ = (V’,E’). Those subgraphs are called partitions of G, and are obtained by spliting the set of

1The Erd¨os-R´enyi model of random grahps describes graphs where the distribuition of links is random, in such a way that

most of the nodes have similar degree, making for a very spread structure.

2The Barab´asi-Albert model of scale-free networks describes graphs where the distribuition of links is skewed, in such a

way that most of the nodes with highest degree tend to accumulate more neighbours as the network grows, making for a very centralized structure, especially notable for the presence of hubs.

(10)

vertices V into smaller subsets (V1, V2, ..., Vn), to which the corresponding subsets of edges (E1, E2, ..., En)

are formed by the edges that link vertices within their corresponding set of vertices. Any edges that link vertices in different subsets of V are said to have been ”cut” by the partitioning process, and the minimization of this ”edge-cut” is the most common metric used to assess the quality of a partition[12].

There are different ways to partition a graph, depending on the intention of the partitioning; the 2 most notable ones being K-way partitioning, which aims to partition a graph into k similarly weighted partitions, and will be explored on Section 2.1.1; and the Core-Periphery partitioning, which partitions a graph into 2 partitions (core and periphery), based on particular characteristics of the nodes, and will be explored on Section 2.1.2.

2.1

K-way partitioning

K-way is the more traditional type of graph partitioning. It is an NP-Complete Problem [13], and is defined as the ”partitioning of the set of vertices V into k disjoint subsets”[14] in a balanced way. The k-way partitioning uses as an input a weighted, undirected graph, it’s goal is to partition this graph as evenly as possible. In it’s standart model (Static), the k-way partitioning does so by using the following 2 main metrics: • Edge-cut. When a graph is partitioned, the edges which link vertices in different partitions are said to have been ”cut”. The sum of the weight of the edges that have been cut constitutes the value of the partitioning P’s edge-cut, denoted by EC(P). The standart model for k-way partitioning aims to minimize the value of EC(P).

• Load-Imbalance. Each partition in a k-way partitioning is assigned a weight w, calculated through a sum of the weight wn of all it’s n vertices. The load-imbalance of a partitioning P is denoted by LI(P),

and is defined as the ratio of the highest partition weight divided by the average partition weight [14]. It is designed to keep the partitions balanced amongst themselves.

The output of a k-way partitioning algorithm will be a vector P[i], which stores the number of the partition to which each vertex i is assigned. This is called a partitioning-vector, and represents a partitioning. The calculations to obtain P[i] consider a small positive number ε, using the constraint that LI(P) ≤ 1+ε, so that ε represents the maximum load-imbalance acceptable for the partitioning. Such algorithm also aims to minimize the value of EC(P).

2.2

Core-Periphery

Despite it’s prevalence in a number of very different fields [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], the notion of a core-periphery structure in networks was not formally defined until 1999 [7]. The term was previously used by authors in different ways, to describe different, yet similar, concepts; ”a set that cannot be subdivided into exclusive cohesive subsets, to which each individual in the network belongs to, to a certain degree”[26]; a two-class partition of nodes -core and periphery-, in which each individual belongs, discretely, to either one or the other [27]; a mapping of points into an Euclidian space, with a group of internally closely connected points occuring near the center, and sparse unconnected points around the outskirts [20]. These last two are noticeably more similar to one another than they are to the first view; namely, they present clealy defined core and periphery subsets. They are all similar, however, in that all three of these views consider a network to have no more than one core. These concepts serve as the basis for Borgatti and Everett’s formal definition of two models of core-periphery structure:

• Discrete Model. Used to describe the interpretation of a core-periphery structure in which the graph is discretely divided into two clearly defined subsets; the core, comprised of nodes highly connected to each other; and the periphery, comprised of nodes sparsely connected to the core and disconected amongst themselves. Figure 1(a) shows a graph which strictly follows this structure; perceptible on the graph’s adjacency matrix (Figure1(b)) shows the split between the two subsets; namely, vertices 1-4,

(11)

highly connected amongst themselves (top left), forming the core, are sparsely connected to vertices 5-10 (top right and bottom left), which bear no connection to each other (bottom right), forming the periphery.

Figure 1: Example of a Network with the Core-Periphery Structure

The maximally centralized graph of Freeman[28], the simple star (Figure 2) is an ideal version of the core-periphery structure. Note how the central node is connected to all other nodes, which are not connected to each other, forming a perfect core-periphery structure. Figure 3a shows how a graph with a perfect core-periphery structure can be mapped into a version of Freeman’s maximally centralized graph by collapsing a cluster. The adjacency matrix of the graph (Figure 3b) shows a detectable structure, the core/core and core/periphery submatrices are 1-blocks3, while the periphery/periphery submatrix is a 0-block4.

Figure 2: Freeman’s Star

This structure is highly unlikely to appear in any real world networks; whose 1-blocks do not tend to have pefect density, and 0-blocks tend to contain a few edges; but a generalization of it, called a pattern matrix ∆ can be used to test the degree to which a partitioning on a graph G adheres to the core-periphery structure. The ∆ matrix is defined by δij = {1, if ci = CORE or cj = CORE, 0

otherwise}, and the matrix in Figure 3b is also an example of pattern matrix.

Borgatti and Everett [7] initially proposed a combinatorial approach to detecting core-periphery strustures in networks, using a robust genetic algorithm to test possible combinations of vertices as the core.

3A 1-block is a submatrix in which all the values are 1 4A 0-block is a submatrix in which all the values are 0

(12)

Figure 3: Example of a Graph mapped into a version of the Freeman’s Star

• Continuous Model. It could be argued that having the discretization of exactly two classes of nodes is too constrictive, and that to define certain networks, a three-class partition -core, semiperiphery, and periphery- would be more adequate, and some world system theorists proposed partitions with even more classes [7]. While that concern is valid, specifying what exact number of classes would be optimal to adequatly describe the structure of a given network could be as difficult as finding the partition itself, since the difficulty of this problem increases exponentially with the number of classes [7]. As a solution to this issue, Borgatti and Everett propose, in the same 1999 article [7], a non-discrete model, which associates to each vertex a measure of coreness, defined as the vertice’s distance to the centroid of a single point cloud, in an Euclidean representation. In this model, the pattern matrix ∆ is defined by δij = ci cj, where C is the coreness vector.

Since the formalization of the term, other core-periphery network structures have been observed and defined. Below is a short summary of some of them.

1. Rich-Club Network Structures. Rich-Clubs refer to the group of top X% nodes of largest degree that are highly connected amongst themselves, forming a rich core of the network (Fig. 4 - nodes 1, 2, 22, and 23). The concept of rich-club was introduced by Zhou and Mondrag´on [29], along with the definition of a topological rich-club coefficient, Φ(k), representing the number of edges connecting the vertices of higher than k degree, proportionally to the number of possible edges between them, which measures the probability of two such nodes to be connected. They later defined [30] the rich-club structure as being the coefficient Φ measured across various levels of k;

(13)

2. Nested Network Structures. The concept of nestedness in a network originates from ecological systems, where networks are used to represent interactions between species. The nested structure (Fig. 5) is observed in an ecological network when the set of species in species-poor sites is a subset of the species in a species-rich site, meaning the interactions in said network are dominated by the less specialist species, the ones present in all sites.[1]

Figure 5: A network with the Nested structure[1]

3. Bow-tie Network Structures. Refering to a core-periphery structure exclusive to directed networks, the Bow-tie structure (Fig. 6) is composed of a highly intertwined core, whose vertices usually have a high in-degree, as well as a high out-degree; and through which most shortest paths in the network will go. Connected to this core, there are two distinct fan components; a fan-in component of incoming edges originated from the source nodes; and an outgoing component of edges fanning out towards the sink nodes[1]. The distinct shape of this structure is reminiscent of a bow-tie.

Figure 6: A network with the Bow-tie structure. Adapted from [2]

4. Onion Network Structures. While scale-free networks following the Barab´asi-Albert model[31] are highly resistant to random failures, the highly centralized, hub-dependent structure of such networs leaves them extremely vulnerable to malicious attacks. It was with the objective of fixing that vulnerability that Schneider et al. [32] developed a random edge-swap algorithm, designed to reassign edges after successive simulated attacks, with increasingly harmful strategies, on an originally scale-free structured network. The network obtained (Fig. 7) at the end of this re-structuring contained a higly connected core of vertices, hierarchically surrounded by rings, loosely connected to each other, of vertices with decreasing degree. This structure, reminiscent of an onion, added a redundancy not present on scale-free networks, which improved on its capacity to withstand targeted attacks, whilst maintaining its robustness against random failures[1].

2.3

Alternative Graph Partitioning Models

Flaws in the standart graph partitioning model have been pointed out by a number of researchers, ranging from major issues with the edge-cut metric[12], to simple limitations to the range of problems which this model can express[33]. In this section will be presented some of the alternative graph partitioning models proposed to address those flaws.

• Bipartite Graph Model. As we know, undirected graphs, such as the ones used by the standart model, can be represented in the form of a square, symmetrical matrix, called an adjacency matrix ;

(14)

Figure 7: A network with the Onion structure[1]

thus, the result of a standart partitioning of a graph is equivalent to a partitioning of the corresponding adjacency matrix. The problem with the standart model, as identified by Hendrickson and Kolda [12, 33], is it can only encode square symmetrical matrices, a very specific case of the matrix partitioning problem. Aiming to address this shortcoming of the Standart graph partitioning model, they proposed the bipartite graph model in [33], a generalization of the standart model, capable of partitioning non-square and nonsymmetric matrices.

A graph G=(V,E) is bipartite if it can be partitioned into 2 subsets G1 and G2 in a way that cuts every single edge in E; there are no edges connecting two elements within the same subset[34, 35]. A graph with this property is useful to represent datasets in which there are two distinct groups of vertices, and can be used to represent non-square, nonsymmetric matrices.

The rows and columns in the matrix are two distinctly different groups, represented in the graph by the set of vertices on the left, representing the rows, and the ones on the right representing the columns. Since the two different groups often represent two different computational operations [12], the bipartite graph partitioning model uses two separate metrics for load-imbalance, one for the rows, and another for the columns.

The bipartite graph partitioning model, as defined by Hendricks and Kolda[33] follows three criteria: 1. Minimize Edge-cut;

2. (possibly infinite) Bound for Load-imbalance of ”row-vertices”; and 3. (possibly infinite) Bound for Load-imbalance of ”column-vertices”.

• Hypergraph Model. As the Bipartite graph partitioning model was developed to address the limita-tions in expressiveness of the standart model, the hypergraph model proposed by C¸ ataly¨urek, Aykanat, Pinar, and Pinar[36, 37, 38] addresses the edge-cut metric problem. As identified by Hendrickson and Kolda[12], the edge-cut metric does not perfectly represent communication volume in a scenario such as parallel computing, an issue that is fixed by the hypergrah partitioning model.

A hypergraph G=(V,H) consists of a set of vertices V, and a set of hyperedges H, such that each hy-peredge is a subset of vertices (it is worth noting that regular graphs are a subcase of hypergraphs, in which each hyperedge contains exactly 2 vertices); the hyperedge connects all the vertices it contains. The hypergraph partitioning model uses the concept of hyperedges to improve on the edge-cut metric. Essentially, given a partitioning P, if a vertex v1 in Partition P1 is connected to two vertices in parti-tion P2, the hypergraph model merges those two edges into one hyperedge; the explanaparti-tion being that, despite being used by two vertices in P2, the information contained in V1 only has to be communicated to P2 once. The new metric minimized by this partitioning then becomes the number of hyperedges cut by the partitioning, a metric known as the boundary-cut.

The hypergraph model is shown to be uniformly superior to the standart model[12] for minimizing communication volume, due to it’s boundary cut metric. It can also express unsymmetric problems as well as the bipartite model, although the latter is still more powerful for multi-phase operations. • Multi-constraint partitioning. Though the bipartite graph partitioning model partially addresses

(15)

which works as more of an augmentation rather than a standalone model [12], was developed to address that exact scenario. This model assigns a vector of weights to each vertex, according to the vertex’s workload in each computational phase. When modelling the graph for this partitioning model, it helps to think of it as a multilevel graph; each level represents a computational phase, all vertices represented in all levels (using a weight of 0 if the vertex is not relevant to that computational phase); all the levels are projected onto one graph, containing all the edges from all the levels (so as to represent communi-cations in all phases), and mantaining the vertex weights on vectors.

This model, as originally proposed by Karypis and Kumar[39], aims to minimize the edge-cut metric, though it may as easily be applied using the boundary-cut metric. The key to this model is that it uses the weight vectors to control the load-imbalance in each computational phase, essentially having multiple load-imbalance constraints.

• Multi-objective partitioning. Follows the same basic idea as the multi-constraint model; the differ-ence being that, while the latter has one objective (minimizing the edge-cut) and multiple constraints (mantaining the load-imbalance for each computational phase), this multi-objective partitioning aims to minimize edge-cut in each computational phase, while having only one load-imbalance constraint to control for.

The multi-objective partitioning, introduced by Schloegel, Karypis and Kumar [40], employs vectors in a simmilar way to which the multi-constraint partitioning does; in this model, however, the weight vectors are applied to edges, instead of vertices; each position of the edge’s weight vector representing it’s communication volume at each computational phase, and the aim of the model is to minimize the edge-cut for each computational phase, while controlling for load-imbalance. This model is useful to represent multi-phase computations in which different communication patterns are observed for each phase[12].

Due to the way in which this model is defined, it can only use the edge-cut metric for optimization, not the more efficient boundary-cut. This model can be combined with the multi-constraint partitioning to produce an even more complex model.

• Adaptive graph partitioning. Much like the Multi-constraint and the Multi-objective partitionings, this Adaptive graph partitioning considers multi-phase computations. It is also known as repartitioning, because, unlike the previous methods, it partitions the graph again for every phase of computation; that means that some vertices will move from one partition to another between phases. Since some of the vertices will migrate between partitions, this model must also consider the size of each vertex, which represents it’s redistribution cost, and is not necessarily related to the vertice’s weight.

An algorithm that follows this model will attempt to minimize not only the edge-cut within each partitioning, but also the total size of redistribution between phases, all while mantaining an acceptable level of load-imbalance[3].

• Skewed partitioning. Similarly to the multi-constraint model, skewed partitioning works as more of an augmentation that can be applied to other models rather than a complete model by itself. In this model, each vertex is assigned a preference vector, in which each position represents it’s degree of desire to be in each partition; that degree is considered when calculating the partitioning. This model can be useful in a number of situations, such as parallel computing; vertices may have a stronger desire to be assigned to processors that are phisically closer to the location where they are stored, in order to reduce congesting the network. Another, more intuitive application for this model is pairing it with adaptive graph partitioning model; since in that model we have a repartitioning of the graph for every phase of the computation, and we want to minimize the redistribution size, it is intuitive to assign stronger desires to remain in the same partition to the more sizeable vertices, in order to minimize the redistribution cost.

(16)

2.4

Algorithmic Approaches

In this section will be discussed some algorithmic approaches to the graph partitioning problem. To preface these algorithms, we must first define an alternate way of representing data, a mesh, a discrete representa-tion of a space of a computarepresenta-tion, divided into different elements. There are two possible graphs that can be extracted from a mesh, depending on whether the computations are performed on the nodes or the elements of the mesh; the node graph nG = (V,E), representing computations mainly performed on the nodes, is constructed by creating a vertex vi ∈ V for each element of the mesh, and adding a (vi, vj) edge to E iff there

is an edge on the mesh connecting the two corresponding nodes i and j (Figure 8(b)); if the computations are performed mostly on the elements of the mesh, the resulting graph dG = (V,E), called the dual of the node graph is constructed by creating a vertex vi ∈ V for every element of the mesh, and adding an edge

(vi, vj) ∈ E if the mesh elements corresponding to vi and vj are adjacent in the mesh(Figure 8(c))[3]. Mesh

nodes also contain coordinate information; there are techniques[41] used to designate coordinates to elements of a mesh derived from a graph, although they will not be discussed further, seeing as they are not applicable in the context of this study.

Figure 8: Example of Mesh-Graph Equivalence[3]. (a) represents a mesh, each triangle is denominated an element of the mesh; (b) represents the node graph of the mesh; and (c) represents the dual of the node graph.

• Geometric Approach. Geometric Partitioning techniques[41, 42, 43, 44, 45, 46, 47, 48] compute partitionings in the mesh, rather than in the graph itself, reason why they are often called mesh parti-tioning schemes. These algorithms’ calculations are based exclusively upon the coordinate information of the mesh nodes. Since the geometric coordinates of the nodes are the only factor observed, the edge-cut metric is not utilized; these algorithms favour, instead, minimizing similar metrics, such as the number of mesh elements in each partition that are adjacent to elements in other partitions. Ge-ometric partitioning algorithms are very fast, but the fact that they do not take connectivity of the elements into account makes for low quality partitionings; since these algorithms are so fast, however, it is a regular practice to obtain multiple partitionings, by performing multiple trials so that the best partitioning can be chosen[3]. Below are some examples of Geometric Partitioning techniques:

– Coordinate Nested Disection (CND). The CND (Fig. 9) is a recursive algorithm, it calculates the center-of-mass of each mesh element, projects them onto it’s longest dimension cartesian axys, producing an ordered list of the mesh elements; this list is bisected, and each subdomain obtained is recursively bisected again, using the same technique, reason why this algorithm is also known as Recursive Coordinate Bisection. Due to the nature of bisection, this recursive algorithm can only produce 2n-way partitionings (2-way, 4-way, 8-way, etc.). The CND presents the typical characteristics of a geometric technique, high speed, and low-quality partitionings; moreover, the resulting partitionings can be described simply by the splitters used to bisect each iteration (the values of x or y that represent the point where the separator is), requiring little memory to store the results, though, since it can only bisect meshes along one of it’s axes, if the geometry of the mesh is too complicated, this algorithm may produce partitioning that contain disconnected subdomains[3].

(17)

Figure 9: Pseudocode for the Coordinate Nested Disection algorithm. The algorithm starts by calculating the centers-of-mass of every mesh element, and projecting them onto the longest coordinate axys. It then uses their relative position to the axys to order the mesh elements into a list, and bisects the mesh by splitting that ordered list in half.

– Recursive Inertial Bisection (RIB). The RIB (Fig. 10) algorithm was developed to address one of the CND’s deficiencies, the constraint of only being able do bisect the mesh along the x-axys or the y-x-axys. If a mesh is oriented at an angle with the coordinate axes, the quality of a CND partitioning may be further impaired. To solve this issue, the RIB computes the principal inertia axys of the mesh, utilizing it’s elements’ centers-of-mass; if the mesh is at an angle with the coordinate axes, that inertia axys will align with the overall orientation of the mesh. The sequence of the algorithm then follows the same logic as the CND, except the centers-of-mass of the mesh elements are projected onto the inertia axys in order to generate the list of elements to be bisected; each subdomain goes through the same process of bisection recursively[3].

Figure 10: Pseudocode for the Recursive Inertial Bisection algorithm. The algorithm starts by calculating the centers-of-mass of every mesh element, and the inertial axys of the mesh. It then projects them onto the inertial axys, and uses their relative position to the axys to order the mesh elements into a list, which is then split in two to separate the elements in two partitions.

– Space-filling Curve Techniques. The Space-filling curve techniques (Fig. 11) follow the same general idea as the CND and RIB; order the mesh elements and partition the list. Where it differs from those techniques, however, is the method utilized to create this ordered list of elements; while the CND and RIB do so by projecting the centers-of-mass of the mesh elements onto the coordinate axes and inertia axys, respectivelly, this technique orders the mesh elements according to their center-of-mass’ position along a space-filling curve. A space-filling curve is a continuous curve that completely fills up a higher dimmensional space, such as a mesh. This algorithm uses one of several such curves that have been proven to fill the space in a locality-preserving way; it follows the curve, ordering the mesh elements, and splits the ordered list into k different subdomains. This scheme generates subdomains of elements that are likely to be in close proximity, since the ordering of the elements follows a continuous curve. This technique, while still fast, often produces partitionings of higher quality than the ones produced by CND and RIB[3].

• Combinatorial. While the geometrical partitioning techniques we’ve seen so far utilized only coor-dinate information, these combinatorial techniques [49, 50, 51, 52, 53, 54, 55] are only concerned with

(18)

Figure 11: Pseudocode for the Space-filling Curves algorithm. The algorithm starts by calculating the centers-of-mass of every mesh element, it produces a space-filling curve and orders the mesh elements into a list according to their relative position to the curve. This list is then split in half to separate the elements in two partitions.

adjacency information of the graph vertices; as a result, combinatorial techniques generate partition-ings with more highly connected partitions, though the vertices may not be as close geographically. Combinatorial algorithms tend to be slower than the geometrical ones, but on the other hand, produce much higher-quality partitionings. Below are some examples of combinatorial partitioning algorithms. – Levelized Nested Dissection (LND). The LND algorithm was created on the simple principle that, for a partitioning to be good, it needs to cut as few edges as possible, and the easiest way to do so is to make sure that neighbouring vertices stay in the same partition. The idea of the algorithm is very simple; start with a subdomain containing only one vertex, known as the seed vertex, and expand this subdomain with each iteration by adding the vertex adjacent to the subdomain that improves edge-cut the most, in a similar way to a breadth-first search algorithm; the algorithm terminates once half the vertices have been added to the subdomain. Presuming the input graph is fully connected, the LND algorithm will result in at least one connected subdomain. It is trivial to see that, in order to keep both connected subdomains - the best outcome -, it is more advantegeous to have the seed vertex be as peripheric as possible. In order to obtain a good seed vertex, an algorithm similar to the LND is used; it starts out with a set of one random vertex, numbered 0, and expands the set with each iteration by adding all neighbouring vertices to the set, assigning numbers to the added vertices which represent the distance to the starting vertex. This algorithm only stops when the entire graph is covered, and chooses a seed for the LND algorithm by picking the vertex with the highest number, the one furthest away from starting seed, which will most likely be the most peripheric one. The LND algorithm is comparable to geometric methods in speed, producing comparable to higher quality partitionings and, like those methods, is often used with multiple trials, since it can sometimes produce low quality results[3].

Figure 12: Pseudocode for the Levelized Nested Disection algorithm. The algorithm starts by selecting a seed vertex; that vertex is labeled zero, and inserted into a subdomain d. While the size of this subdomain is smaller than half the size of the graph, vertices on the neighbourhood of d are added to the subdomain and labeled with their distance to the seed vertex. Once the subdomain covers half the graph the algorithm stops, the labelled vertices are on one partition, and the unlabelled ones in the other.

(19)

– Bubble Framework. The graph growing through breadth-first search idea of the LND method can be applied to k-way partitioning as well, without the need for recursion. The Bubble framework, introduced in [56] is capable of partitioning a graph into k > 2 well shaped blocks[57]. The first step is the selection of k seed nodes evenly distributed around the graph; followed by growing the k subdomains from these seed graphs, using the same technique as the LND algorithm, ordered so that the smallest subdomain is always the one to have a new vertex added to it. The third and final step is to compute new seed nodes, by choosing the node within each subdomain that minimizes the sum distance to all other nodes in that subdomain. These new seed vertices are used as input for a recursive iteration of the second and third steps, stoping when either seed nodes stop changing, or partition quality stabilizes.

Figure 13: Pseudocode for the Bubble Framework algorithm. The algorithm starts by selecting a number (k) of seed vertices S; those vertices are inserted into k subdomains D1− k. These subdomains are grown by

repeatedly adding a vertex to the smallest subdomain, until the entire graph is covered. The algorithm then finds the centers of each subdomain, and uses those vertices as seed vertices for a new pass. This is repeated until the seed vertices stop changing between the passes, and the subdomains obtained are the k partitions of the graph.

– Kernigham-Lin / Fiduccia-Mattheyses Algorithm (KL/FM). Unlike the ones we’ve seen so far, the KL and FM are repartitioning algorithms (see Adative Graph Partitioning Section 2.3.1); its objective being to improve on a preexisting partitioning, though they can be applied as partitioning algorithms by simply creating a random partitioning on the graph to use as an input. Both the KL and the FM algorithms to explore the same method of refining partitionings; given a graph G bisected into two sets G1and G2, find two subsets X and Y - of equal size, in order to maintain the

Load-imbalance -, from G1 and G2 respectively, such that swapping these two subsets brings the

largest reduction in edge-cut[3].The idea is simple, however, since the problem of finding optimal subsets X and Y is as hard as the graph partitioning problem itself, the best way to treat it, developed by Kernigham and Lin[50], was to create a greedy algorithm, known as the Kernigham-Lin, or KL refinement.

KL refinement (Fig. 14) is a recursive method that takes as input a graph G, bisected into G1

and G2 and, with each iteration, selects a sequence of pairs of vertices, one from each subset,

and swaps them; these pairings are selected based on the best impact on the edge-cut, even if negative, and once a vertex has been swaped, it can no longer be touched in that iteration. The algorithm stores its best state with each iteration, and at the of it, returns to that state and uses it as input for the next iteration. The algorithm converges to a near-optimum partitioning within a few iterations[50].

The Fiduccia-Mattheyses, or FM refinement (Fig. 15), is presented in [49] as an improvement on the KL algorithm. It takes advantage of the somewhat looseness of Load-imbalance constraint, by moving only one vertex at a time. The algorithm follows the same recursive structure as the KL algorithm, with the same input of a graph G bisected into G1 and G2. The algorithm calculates,

for each vertex, the impact of swapping it do the other set (swap-impact ); for each subset, the FM algorithm generates a prioritized queue of vertices, ordered by swap-impact. Looking at the top element on each queue, the algorithm picks the one with best swap-impact, swaps it, then recalculates the swap-impact of every other vertex; if the swapping of the chosen element would

(20)

Figure 14: Pseudocode for the Kernigham-Lin refinement algorithm. With every pass of the algorithm, it goes through all pairs of swapable vertices vi and vj, one from each domain; picks the pair with the highest

swap value, even if this is negative; swaps them; and removes them from the pool of swapable vertices. Once no more vertices can be swaped, the algorithm returns to the state that most improved the edge-cut of the partitioning.

infringe on the preset load-imbalance constraint, the top element of the other queue is swaped instead. Like in the KL algorithm, once a vertex has been swaped, it can no longer be considered in that iteration, and the algorithm returns to it’s best state at the end of each iteration.

The swaping of vertices that have a negative impact on edge-cut might seem counterintuitive, but that allows the KL/FM algorithm to explore further possibilities, and avoid local optimums. That ability, however, is limited by the load-imbalance constraint, the algorithm performs best when this constraint is relaxed; so the more restrictive the load-imbalance constraint, the more the quality of the partitioning is dependent on the quality of the input bisection, making it so the quality of the partitioning is improved by a more relaxed constraint.

Figure 15: Pseudocode for the Fiduccia-Mattheyses refinement algorithm. The algorithm starts by going through all vertices in each subdomain S1 and S2, calculating their swap value, and putting them in a priority queue for each subdomain PQ1 and PQ2, the priority queues are ordered by swap value. with each pass of the algorithm, it looks at the tops of each queue and, if both can be moved while maintaining the balance constraint, moves the one with the highest gain; otherwise, it moves the one that can maintin the balance constraint. After a vertx is moved, it is removed from the respective priority queue, the swap values of its neighbours are recaltulated, and the priority queues are reordered. Once no more vertices can be swaped, the algorithm returns to the state that most improved the edge-cut of the partitioning.

• Spectral. Spectral partitioning algorithms[58, 59, 4] frame the partitioning problem as the optimization of a quadratic function, solved through the discrete Laplacian of the graph. The Laplacian matrix LG

(21)

vertex i, from the graph’s adjacency matrix A - LG = A − DG. The major distinction between the

Spectral method to combinatorial and geometric techniques is those use only local information, such as a vertice’s neighbours, to compute a partitioning, while the spectral method uses global information, derived from computing eigenvectors, this means the spectral method may find qualitatively different separators[58].

– Recursive Spectral Bisection (RSB). Since the Laplacian’s largest eigenvalue is zero, and it’s cor-responding eigenvector is composed of all ones[3], the RSB (Fig. 16) focuses on the second largest eigenvalue, which is of much more interest. Fiedler[60, 61] studied this eigenvalue’s λ2properties,

and those of it’s corresponding eigenvector, known as the Fiedler vector. Fiedler called λ2 the

algebraic connectivity, due to it’s relation to both vertex and edge connectivity of a graph[58]; particularly, the Fiedler vector gives a measure of distance between the vertices of a graph. By calculating the Fiedler vector of the Laplacian, and using it to calculate this measure of distance for each vertex, the algorithm can then generate a queue, ordered by these values, which is then bisected to obtain the partitioning. This spectral bisection algorithm can be applied recursively in order to obtain k-way partitionings;

Figure 16: Pseudocode for the Recursive Spectral Bisection algorithm. The algorithm starts by calculating the eigenvector of the second eigenvalue of the Laplacian obtained from the graph’s adjacency matrix, known as the Fiedler vector; it then finds the median of the Fiedles vector, and for every value in it, assigns the corresponding vertex to either subdomain S1 or S2, depending on whether the value is higher or lower than the median.

Recursive Spectral Quadrisection and Octasection RSQ/RSO. Proposed by Hendrickson and Le-land [59], the RSQ and RSO algorithms are augmentations on the RSB algorithm. The spectral method allows for multiple such augmentations; by using more than one eigenvector, the RSQ (two eigenvectors) and RSO (three eigenvectors) algorithms are able to create 4-way and 8-way partitionings, respectively. Since the computation of the eigenvectors - which is usualy done using improvement methods, such as the Lanczos algorithm[62] - dominates the computational complex-ity of this method, the recursive calculating of the Fiedler vector that happens with every iteration of the RSB algorithm makes its cost very high. The calculations of the second and third eigenvec-tors used in the RSQ and RSO are less costly, usualy requiring only few additional iterations of the Lanczos algorithm, which makes one iteration of the RSQ more efficient computationaly than two iterations of the RSB[59].

The spectral partitioning method is considerably slower when compared to combinatorial and geometric techniques, due to the high computational complexity of calculating the Fiedler vector ; it does, however, result in higher quality partitionings.

• Multilevel Methods. Based on the multilevel paradigm, multilevel methods [63, 64, 65, 66, 67, 68, 69, 70] consist of three phases:

1. Graph Coarsening. In this phase, the original graph is recursively deconstructed by collapsing a few selected edges with every iteration; these edges are often selected by way of a matching algorithm,

(22)

and the use of a heavy-edge matching is shown to produce the best results[63]. Alternativelly, Abou-Rjeili and Karypis [14] introduce an algorithm that allows groups of nodes to be contracted, instead of just pairs; this approach was shown to greatly improve partition quality for power-law graphs;

2. Initial partitioning. The final result of the first phase is a much simpler graph, with fewer edges, and reduced total edge weight. In the second phase any number of partitioning algorithms can be used to partition the coarsened graph, resulting in an overall better partitioning, due to the simplicity of the graph; and

3. Refinement or Uncoarsening. The final step is recursively uncoarsening the partitioned graph by expanding the collapsed edges, applying a refinement algorithm such as the KL/RM with each iteration, resulting in a partitioning of the original graph.

The aplication in this method augments the KL/FM types of algorithms’ capacity to avoid local minima, by allowing it to move collapsed clusters of highly connected vertices between subdomains, one of the biggest limitations of that algorithm.

– Multilevel Recursive Spectral Bisection (MRSB). Barnard and Simon [66] propose a multilevel scheme that uses random matching in the coarsening phase; RSB was used at the partitioning phase; and Rayleigh Quotient Iteration [71, 72] to approximate the Fiedler vector for the finer graphs during the uncoarsening phase.

– Multilevel Recursive Bisection (MRB or MLRB). Karypis and Kumar [63] studied the aplication of the multilevel paradigm, testing the applicability of different coarsening heuristics and refinement techniques, and showing that the algorithm used in the partitioning phase has minimal to no impact on the quality of the final partitioning. They presented a scheme that uses the heavy-edge heuristic for matching in the coarsening phase, a Greedy Graph Growing algorithm (GGGP) in the partitioning phase, and a Boundary Kernigham-Lin refinement algorithm in the uncoarsening phase.

– Multilevel k-way Partitioning. Presented by Marypis and Kumar [67], this scheme uses an even more efficient variaton of the heavy-edge heuristic in the coarsening phase, which results in even smaller total edge-weight for the coarsened graphs; it uses the MLRB to obtain the initial par-titioning; and a modified version of the KL refinement, called Global Kernigham-Lin Refinement (GKLR), for the uncoarsening phase.

3

Proposal and Experiments

According to [3], there are four main algorithmic approaches to graph partitioning; these approaches, as seen on Section 2.1.4, are (1)Geometric, (2)Combinatorial, (3)Spectral, and (4)Multilevel. Algorithms were designed, following approaches 1, 2, and 4, in the interest of establishing a wide base for this study; these approaches were selected for their relative computational simplicity, compared to the spectral approach, as well as to provide some variety, seeing as spectral algorithms tend to dominate the studies into core detection. These algorithms will be described and analyzed, in this section, along with the outlines of the experiments performed; this section also contains a table detailing the modifications proposed by each algorithm, and the reasoning behind such modifications.

3.1

Proposed Algorithms

Algorithm 1: The first algorithm designed for this study follows the geometric approach. The algorithm itself is extremely straightforward, as those that follow this approach tend to be. It was based on the CND algorithm, and is essentially an adaptation of that algorithm designed for core-periphery partitioning. It follows these simple steps (Illustrated in Figure 17:

(23)

• Projects the vertices onto the y-axis, and selects the middle portion; • Matches the 2 groups selected and defines the core as the intersection;

Figure 17: Algorithm 1

This algorithm’s resemblance to the CND algorithm are clear; while CND projects the vertices into the longest axis and bisects them into 2 equally-sized partitions, percentually, 50-50; this algorithm trisects the projected vertices, in order to identify a middle portion. This algorithm further builds upon the original CND algorithm, by once again projecting the vertices onto the other axis, and once more trisecting it, in order to identify the middle portions of the graph relative to both axes. By computing the intersection of both middle parts, the algorithm obtains the middle quadrant of a 3 by 3 section of the sample space, which can be likened to the geometrical center, or core, of the graph.

Adhering to the trend of algorithms that follow the geometric approach, this algorithm is light (O(n)), and

consecutive trials may be performed at a low processing cost, so as to obtain the best possible partitioning. Seeing as the size of the partitions in this case is not constricted to a 50-50, or 33-33-33 division of vertices, consecutive trials can manipulate the percentage of the trisections, in order to further improve the likely quality of partitionings.

Algorithm 2 - 3BS (3 Breadth-first Search): The 3BS algorithm is inspired by the Levelized Nested Disection algorithm; it takes the idea of using breadth-frist search to identify an advantageous seed vertex from which to start growing a solution and applies it to constructing a pseudo measure of centrality through which the most central vertex in the graph. The algorithm (illustrated by Figure 18) follows this sequence:

• Select a Random seed vertex s0;

• Perform a Breadth-first Search in order to find the furthest node from s0 (s1);

• Perform another BFS from s1, in order to find the furthest node from s1 (s2) (store the distance data); • Perform a third BFS from s2 (store the distance data);

• Use the distance data from the two BFS’s to find the middle of the smallest path between s1 and s2, vertex c;

(24)

Figure 18: Algorithm 2

Starting from a random vertex, the 3BS algorithm performs the first breadth-first search to identify one of the most peripheric nodes (s1) of the graph. From this node, which we will call seed 1, a second breadth-first search is performed, and a second seed vertex (seed 2) is identified as the furthest one from seed 1. The result of this second breadth-first search are stored in an array, seeing as the distance calculated for each vertex in the search correspond to the minimum distance between that vertex and seed 1. Finally, a third and last breadth-first search is performed from seed 2, the results of which are stored in a second array, giving us the minimum distance between each vertex and s2.

From the 2 arrays constructed from the breadth-first searches we can extrapolate a pseudo measure of centrality; by obtaining the smallest sum of the corresponding positions in each array (minimum distance from seed 1 + minimum distance from seed 2) we can identify all vertices belonging to the shortest path between the two seed vertices; by analyzing the absolute value of the difference between each corresponding position in the 2 arrays we are able to identify vertices that are equidistant from seeds 1 and 2. If we narrow this difference search to just the vertices belonging to the shortest path, we can identify what is the middle of the shortest path between the 2 seed vertices. Since the 2 seed vertices should be as far apart as possible in the graph, this method gives us a rough approximation of betweenness centrality.

In a graph which presents a core-periphery structure, the vertex identified as the middle of the shortest path between the 2 furthest vertices can be safely assumed to belong to the core; therefore, the vertex c identified by the algorithm will be used as the core-seed from which the core will be grown. Since the vertices of the core in a core-periphery structure must be highly interconnected, the core-seed vertex will be connected to most other nodes of the core; in fact, assuming a perfect core-periphery structure, that is, on in which the subgraph formed by the vertices in the core is a complete one, then the core-seed vertex will be connected to all core vertices, and a subgraph formed simply by the core-seed and its neighbouring vertices could be taken as a good extrapolation of the core; therefore, the core will be grown by simply picking the neighbourhood of c.

Algorithm 3: This algorithm is based on the multilevel paradigm, which always consists of the same 3 steps (illustrated by Figure 19):

1. Graph Coarsening - Deconstructs the original graph by collapsing edge, or in some cases, groups of vertices;

2. Initial Partitioning - Solves the partitioning problem in the much simplified hypergraph resulting from step 1;

3. Refinement - Recursively uncoarsens the partitioned graph, ending in a partitioning of the original graph;

(25)

Figure 19: Multilevel Paradigm[3]

Seeing as the algorithm follows the same sequence as all multilevel algorithms, heuristics are suggested for each step. For this algorithm, the proposed heuristic for the coarsening phase is collapsing triangles, with the objective of removing cycles, and ultimately reaching a hypergraph with a structure like that of the Freeman’s Star (Figure 20), which is the perfect prototype of a core-periphery structure. For the initial partitioning phase, assuming the success of the coarsening phase, the hypergraph which will be partitioned will have a structure similar to that of the Freeman’s Star, which can also be thought of as a tree; the partitioning algorithm simply selects the hypernode with the highest degree in the hypergraph, which represents the root of the tree, or the center of the Freeman’s Star. Seeing as there is no balancing to be done in a core-periphery partitioning, the uncoarsening of the hypergraph is done by just exploding the previously collapsed triangles, mantaining the vertices which formed the hypernode in the original coarsened hypergraph.

Figure 20: Freeman’s Star

3.2

Summarized Algorithms

Table 1 summarizes the proposed algorithms and heuristics, as well as the modifications from the original inspiring algorithms, detailing the goal for each modification in identifying a graph’s core.

3.3

Experiments

For the experiments in this study, one of the proposed algorithms was selected to be implemented and tested on a set of graphs, listed on table 2. Most of the graphs were selected from the Walshaw Benchmark[8], a well known, well established database entirely devoted to graph partitioning, albeit directed towards k-way

(26)

Table 1: Proposed Algorithms and Modifications Algorithm Original Algorithm Proposed Modification and

Heuristics

Goal of Modification Algorithm 1 Coordinate Nested

Bisection

Projecting the vertices onto both axes instead of just one; Trisect-ing the ordered lists of vertices in stead of bisecting them.

Identifies the middle portion of vertices relative to both axes, in order to identify the geometric center, or core, of the graph. Algorithm 2

- 3BS

Localized Nested Disection

Uses the same technique as the LND algorithm to identify two good seed vertices instead of just one; Uses two distance arrays to identify seed vertices for the core.

Identifying two peripherical nodes as far away from each other as possible; Using the distance from the seed vertices to each of the vertices, in order to identify the middle of the shortest path between the two seeds, which should be a central node.

Algorithm 3 General Multilevel Methods

Coarsening Heuristic: Recur-sively collapses triangles until no more triangles can be identi-fied; Initial Partitioning Heuris-tic: Selects the hypernode with the highest degree in the hy-pergraph; Refinement Heuris-tic: Simply uncoarsens the par-titioned hypergraph until reach-ing a partitionreach-ing of the original graph.

Coarsening: Removing cycles from the graph in order to reach a hypergraph with a distinct star structure; Initial Partitioning: The loose connection between periphery nodes means the core nodes should have been coars-ened more frequently, forming a hypernode connected to a large number of periphery nodes, mak-ing it the highest degree hyper-node; Since there is no load to balance in a core-detection algo-rithmm the refinement phase can be virtually ignored, having the graph simply beCND uncoars-ened.

partitioning. To complement the Walshaw benchmark graphs, a number of graphs were chosen from other databases [9, 10, 11] for their different structural properties.

The selection of the algorithm for the experiment phase of this study was done as follows: Algorithm 1 requires coordinate information for the vertices, which the graphs of the Walshaw Benchmark, from which most graphs selected for the experiments in this study were taken, unfortunately do not contain, thus exclud-ing it from the experiments. It was also observed that the first step on Algorithm 3 - recursively collapsexclud-ing triangles until none can be found in the hypergraph - may not achieve the expected result of generating a hypergraph with the more evident structure of a Freeman’s Star; instead resulting in a hypergraph consisting of one or more larger cycles. For those reasons, the proposed algorithm chosen for the experiments performed in this study was the 3BS algorithm, or 3 Breadth-first Search.

The experiments for this study consisted on the implementation of the selected algorithm and consecutive trials of the algorithm on the set of graphs. The low computational complexity of the algorithm chosen for the trials, as well as the short execution time observed during the initial testing and implementation of the algorithm, allow for consecutive runs of the algorithm, in order to obtain the best result. In the early stages

(27)

Table 2: List of Graphs

Graph # of Vertices # of Edges Database

144 144649 1074393 Walshaw Benchmark

3elt 4720 13722 Walshaw Benchmark

4elt 15606 45878 Walshaw Benchmark

598a 110971 741934 Walshaw Benchmark

add20 2395 7462 Walshaw Benchmark

add32 4960 9462 Walshaw Benchmark

auto 448695 3314611 Walshaw Benchmark

bcsstk30 28924 1007284 Walshaw Benchmark

bcsstk32 44609 985046 Walshaw Benchmark

bcsstk33 8738 291583 Walshaw Benchmark

brack2 62631 366559 Walshaw Benchmark

crack 10240 30380 Walshaw Benchmark

cs4 22499 43858 Walshaw Benchmark

cti 16840 48232 Walshaw Benchmark

data 2851 15093 Walshaw Benchmark

fe 4elt2 11143 32818 Walshaw Benchmark

fe ocean 143437 409593 Walshaw Benchmark

fe rotor 99617 662431 Walshaw Benchmark

fe sphere 16386 49152 Walshaw Benchmark

fe tooth 78136 452591 Walshaw Benchmark

finan512 74752 261120 Walshaw Benchmark

m14b 214765 1679018 Walshaw Benchmark

memplus 17758 54196 Walshaw Benchmark

t60k 60005 89440 Walshaw Benchmark

uk 4824 6837 Walshaw Benchmark

vibrobox 12328 165250 Walshaw Benchmark

wave 156317 1059331 Walshaw Benchmark

whitaker3 9800 28989 Walshaw Benchmark

wing 62032 121544 Walshaw Benchmark

wing nodal 10937 75488 Walshaw Benchmark

Airlines 235 1297 Gephi

p2p-Gnutella06 8717 31525 Stanford

p2p-Gnutella04 10876 39994 Stanford

USAir 332 2126 Pajek

CpanAuthors 839 2248 Gephi

of testing the implementation of the algorithm, it was observed that the results tended to stabilize fast, hardly ever producing new results after seven or eight runs. For that reason, the final trials consisted of 10 consecutive runs of the algorithm, with the best result amongst them being determined through maximizing the core connectivity.

Conditions for the trials were as follows:

• Processor: Intel(R) Core(TM) i7-5557U CPU 3.10GHz; • Memory: 16GB RAM;

(28)

4

Result Analysis

The results of the experiments are shown in table 3, which presents the core connectivity and size, and the periphery connectivity, for each of the graphs in the experiments. Seeing as the experiment consisted of 10 consecutive runs of the 3BS algorithm for each graph, the results presented in table 3 reflect those of the best result obtained for each graph in the 10 trials; the execution times are also referring to the particular run in which the results were obtained, as opposed to the total execution time of 10 trials. Column ”Graph” contains the title referencing each of the graphs; Column ”Core Size” contains the number of vertices in the identified core; Column ”Core Connectivity” refers to the degree of connectivity of the core identified by the algorithm, that is to say, out of all possible edges linking 2 core nodes, how many were in fact present in the graph; Column ”Periphery Connectivity” represents the same connectivity measure, but for edges linking 2 periphery nodes; Finally, column ”Execution Time” represents the execution time of the algorithm for the particular run in which this result was obtained, this time is represented in milliseconds due to the very short execution time of the algorithm.

Analyzing the results presented in table 3, starting by the execution time, we can observe an excelent speed for the algorithm, which was expected, seeing as the computational complexity of the algorithm is determined by that of the breadth-first search. It can be observed that, the longest execution time for any graph with under one million edges was 155 milliseconds, or 0.155 second (graph ”598a”), showing just how fast the algorithm really is. The longest execution time, 2.421 seconds, was the only instance in which the algorithm runtime exceded 1 second, and was observed for the largest graph, ”auto”, with over 448 thousand nodes.

As for the actual results obtained by the algorithm, the 2 main metrics observed were Core Connectivity, and Periphery Connectivity; both were calculated by measuring the amount of edges connecting 2 nodes within each partition relative to the maximum possible amount of such edges in that partition, thus obtaining a normalized connectivity value between 0 and 1, which is represented in table 3 rounded to the fifth decimal place. In order for the partitioning to more adequately match the core-periphery structure, Core Connectivity should be maximized, while Periphery Connectivity should be minimized. Table 3 shows a variation in the core connectivity score between 0.00817, or 0.817% (grap ”p2p-Gnutella04”), and 0.5, or 50% (graph ”cs4”), while periphery connectivity for the same two graphs was, respectively, 0.00065, or 0.065%, and 0.00017, or 0.017%.

While a score of 0.817% core connectivity is far from the 100% connectivity of a perfect core-periphery structure, it is worth noting that the graphs from the Walshaw Benchmark share its characteristics with the Erd¨os-R´enyi model of random graphs, which contains more spread edges, and a more descentralized structure, not characterizing a very strong core-periphery structure. It is also true, as can be noted in table 4, that the degrees of connectivity observed in the cores on the experiments are several times larger than the degree of connectivity observed in the peripheries, indicating that the low core connectivity may be caused by the overall low connectivity of the graph.

In order to test that hypothesis, the total graph connectivity was calculated and compared to the core connectivity and periphery connectivity, the results of which can be observed on table 5; in it, we can observe the connectivity of the core is significantly larger than the connectivity of the graph in all trials, confirming that the seemingly low core connectivity was due to the low connectivity of the graphs themselves. These differences show the core identified by the algorithm to have, on average, 1670 times higher connectivity when compared to the graph in its entirety, and 860 times higher than the periphery connectivity; indicating that, despite the seemingly low connectivity of the identified cores, the algorithm actually identified a subset of nodes with internal connectivity far larger than that of the overall graphs, characterizing a core.

(29)

Table 3: Results of the experiments

Graph Core Connectivity Core Size Periphery Connectivity Execution Time

(Milliseconds) 144 0.21905 36 0.0001 330 3elt 0.22105 20 0.00124 18 4elt 0.5 8 0.00038 11 598a 0.13702 65 0.00012 155 add20 0.05646 316 0.00101 4 add32 0.14718 32 0.00075 3 auto 0.14595 62 0.00003 2421 bcsstk30 0.31469 84 0.00241 173 bcsstk32 0.36679 90 0.00099 116 bcsstk33 0.0379 1519 0.00871 104 brack2 0.01662 589 0.00019 66 crack 0.20915 18 0.00058 7 cs4 0.5 5 0.00017 13 cti 0.0157 217 0.00034 13 data 0.05361 182 0.00389 2 fe 4elt2 0.31868 14 0.00053 9 fe ocean 0.03544 80 0.00004 100 fe rotor 0.01223 892 0.00013 116 fe sphere 0.06072 74 0.00037 12 fe tooth 0.06262 147 0.00015 95 finan512 0.01872 304 0.00009 47 m14b 0.14178 52 0.00007 555 memplus 0.36333 25 0.00033 9 t60k 0.07692 26 0.00005 24 uk 0.14286 14 0.00059 1 vibrobox 0.02227 1362 0.00203 27 wave 0.31159 24 0.00009 205 whitaker3 0.16667 28 0.00061 6 wing 0.28571 8 0.00006 40 wing nodal 0.43137 18 0.00126 12 Airlines 0.06332 196 0.00945 7 p2p-Gnutella06 0.0268 82 0.00082 71 p2p-Gnutella04 0.00817 323 0.00065 50 USAir 0.40667 25 0.02531 3 CpanAuthors 0.01343 475 0.00076 2

5

Discussion

Although the results of the experiments confirm some of the expectations, such as the quick runtime of the algorithm and the high connectivity of the identified core relative to the periphery, the unrefined results did not seem to be on par with what was originally anticipated. Despite the seemingly low core connectivity observed in the algorithm’s results, it was observed that the connectivity of the cores identified by the algorithm were several scales larger than that of the peripheries.

It was also not possible to identify any significant distinction between the results observed from the Walshaw Benchmark graphs, which present a similarity to the Erd¨os-R´enyi model of random graphs, and those observed

(30)

Table 4: Comparative analysis of Core Connectivity and Periphery Connectivity Graph Core Connectivity Periphery Connectivity Connectivity Comparison

144 0.21905 0.0001 2190.5 3elt 0.22105 0.00124 178.26613 4elt 0.5 0.00038 1315.78947 598a 0.13702 0.00012 1141.83333 add20 0.05646 0.00101 55.90099 add32 0.14718 0.00075 196.24 auto 0.14595 0.00003 4865 bcsstk30 0.31469 0.00241 130.57676 bcsstk32 0.36679 0.00099 370.49495 bcsstk33 0.0379 0.00871 4.35132 brack2 0.01662 0.00019 87.47368 crack 0.20915 0.00058 360.60345 cs4 0.5 0.00017 2941.17647 cti 0.0157 0.00034 46.17647 data 0.05361 0.00389 13.78149 fe 4elt2 0.31868 0.00053 601.28302 fe ocean 0.03544 0.00004 886 fe rotor 0.01223 0.00013 94.07692 fe sphere 0.06072 0.00037 164.10811 fe tooth 0.06262 0.00015 417.46667 finan512 0.01872 0.00009 208 m14b 0.14178 0.00007 2025.42857 memplus 0.36333 0.00033 1101 t60k 0.07692 0.00005 1538.4 uk 0.14286 0.00059 242.13559 vibrobox 0.02227 0.00203 10.97044 wave 0.31159 0.00009 3462.11111 whitaker3 0.16667 0.00061 273.22951 wing 0.28571 0.00006 4761.83333 wing nodal 0.43137 0.00126 342.35714 Airlines 0.06332 0.00945 6.70053 p2p-Gnutella06 0.0268 0.00082 32.68293 p2p-Gnutella04 0.00817 0.00065 12.56923 USAir 0.40667 0.02531 16.06756 CpanAuthors 0.01343 0.00076 17.67105

from the Gephi, Stanford, and Pajek graphs, which were selected for their concordance with the Barab´ asi-Albert model of scale-free networks. It was originally believed that highly centralized structure of the latter would favour the identification of a core-periphery structure. That was not the case; wheter that is due to an issue with that premise, or by fault of the algorithm, cannot be ascertained at this moment.

This study was concieved as an exploration into the way an algorithm, based on an approach distinct from the dominant algorithms on this discipline, would perform when tested on a set of graphs with varied structures, attempting to determine whether it could be a viable, simple, and fast alternative to the complex and costly algorithms currently dominating this discipline; alas, it appears this is not the case for the 3BS algorithm.

(31)

Table 5: Comparison of Core Connectivity and Periphery Connectivity to Graph Connectivity

Graph Core Connectivity Graph Connectivity Periphery Connectivity

144 0.21905 > 0.00005 < 0.0001 3elt 0.22105 > 0.00062 < 0.00124 4elt 0.5 > 0.00019 < 0.00038 598a 0.13702 > 0.00006 < 0.00012 add20 0.05646 > 0.0013 > 0.00101 add32 0.14718 > 0.00038 < 0.00075 auto 0.14595 > 0.00002 < 0.00003 bcsstk30 0.31469 > 0.0012 < 0.00241 bcsstk32 0.36679 > 0.0005 < 0.00099 bcsstk33 0.0379 > 0.00382 < 0.00871 brack2 0.01662 > 0.00009 < 0.00019 crack 0.20915 > 0.00029 < 0.00058 cs4 0.5 > 0.00009 < 0.00017 cti 0.0157 > 0.00017 < 0.00034 data 0.05361 > 0.00186 < 0.00389 fe 4elt2 0.31868 > 0.00026 < 0.00053 fe ocean 0.03544 > 0.00002 < 0.00004 fe rotor 0.01223 > 0.00007 < 0.00013 fe sphere 0.06072 > 0.00018 < 0.00037 fe tooth 0.06262 > 0.00007 < 0.00015 finan512 0.01872 > 0.00005 < 0.00009 m14b 0.14178 > 0.00004 < 0.00007 memplus 0.36333 > 0.00017 < 0.00033 t60k 0.07692 > 0.00002 < 0.00005 uk 0.14286 > 0.00029 < 0.00059 vibrobox 0.02227 > 0.00109 < 0.00203 wave 0.31159 > 0.00004 < 0.00009 whitaker3 0.16667 > 0.0003 < 0.00061 wing 0.28571 > 0.00003 < 0.00006 wing nodal 0.43137 > 0.00063 < 0.00126 Airlines 0.06332 > 0.02349 > 0.00945 p2p-Gnutella06 0.0268 > 0.00041 < 0.00082 p2p-Gnutella04 0.00817 > 0.00034 < 0.00065 USAir 0.40667 > 0.01929 < 0.02531 CpanAuthors 0.01343 > 0.00319 > 0.00076

5.1

Future Works

Many ideas were proposed on the course of this study, not all of which could be implemented as part of it; those ideas remain as possible seeds for future development and further studies. Aside from the algorithms already detailed on section 3.1, both of which could be analyzed in more depth, and tested on a study with a more adequate set of graphs, there was also an idea for a refinement, or repartitioning algorithm not included in this study due to the fact that it was not fully realized in the earlier stages of the project. A refinement algorithm could build upon, and be used alongside one of the algorithms described in this study, in order to obtain higher quality partitionings. Future works could expand as well in the variety of the graph set upon which the algorithms are tested, possibly accounting for a more distinct set of results.

Referências

Documentos relacionados

Observação: Até as 15 horas do dia anterior poderá ser cancelado a etapa, após consulta a previsão de tempo (condições climáticas, de vento, direção e intervalos de ondas,

Este artigo focaliza a produção de uma gramática cultural de resistência a partir da análise de práticas linguísticas de coletivos culturais da periferia de Fortaleza,

Nesse sentido, elencamos como corpus de investigação relatórios de estágio supervisionado de alunos em formação em um curso de Letras (Língua Inglesa), por meio dos quais

The Rifian groundwaters are inhabited by a relatively rich stygobiontic fauna including a number of taxa related to the ancient Mesozoic history of the Rifian

[r]

Nesta seção, retomamos os conceitos teóricos anteriormente discu- tidos para procedermos à análise das respostas dadas pelos participantes da pesquisa. Como forma de organização

Ao estudar o fenômeno do processo reflexivo de coordenadores em um curso online de formação continuada por meio da abordagem de pesquisa Hermenêutico-Fenomenológica, me

O conjunto de textos agrupados sob esse conceito limiar aborda uma questão bastante complexa e multifacetada em relação aos estudos sobre o processo da escrita e suas tecnologias