# A Fast and Exact Greedy Algorithm for the Core–Periphery Problem

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Related Work

#### 1.2. Notation

## 2. Identifying a Core–Periphery Bipartition

#### 2.1. A Greedy Algorithm for Problem (2)

- the overall weight of the edges in the subgraph induced by S is $e(S)={\sum}_{i,j\in S}{a}_{ij}$
- the overall weight of the edges having exactly one node in S is $\partial (S)={\sum}_{i\in S}{\sum}_{j\notin S}{a}_{ij}$.

- For $i=1,\dots ,n$ compute the degrees ${d}_{i}={\sum}_{j}{a}_{ij}$ and reorder the nodes in non-increasing order by degree, as in Formula (3).
- For $k=1,\dots ,n$ let ${\sigma}_{k}=k(k-1)-2{\sum}_{i=1}^{k}{d}_{i}$.

Algorithm 1: Computing an optimal solution of Problem (2) |

Input: symmetric adjacency matrix $A=({a}_{ij})$ of size nOutput: integer ${k}^{\ast}$, core set ${S}^{\ast}$Compute a permutation $\pi $ of $\{1,\dots ,n\}$ such that ${d}_{\pi (1)}\ge {d}_{\pi (2)}\ge \dots \ge {d}_{\pi (n)}$ $k\leftarrow 1$ ${k}^{\ast}\leftarrow k$ Define the core set ${S}^{\ast}=\{\pi (1),\dots ,\pi ({k}^{\ast})\}$ |

**Theorem**

**1.**

**Proof.**

**Remark**

**1.**

**Corollary**

**1.**

**Proof.**

- If ${d}_{{k}^{\ast}}>{d}_{{k}^{\ast}+1}$ and ${d}_{{k}^{\ast}+1}<{k}^{\ast}$ then ${S}^{\ast}=\{1,\dots ,{k}^{\ast}\}$ is the unique optimal solution.
- If ${d}_{{k}^{\ast}}>{d}_{{k}^{\ast}+1}$ and there exists an integer $h\ge 1$ such that ${k}^{\ast}={d}_{{k}^{\ast}+1}=\dots ={d}_{{k}^{\ast}+h}$ then both ${S}^{\ast}=\{1,\dots ,{k}^{\ast}\}$ and ${S}^{\ast}\cup \{{k}^{\ast}+i\}$ are optimal solutions, for every $i=1,\dots ,h$.
- If there exists an integer $h\ge 1$ such that ${d}_{{k}^{\ast}}=\dots ={d}_{{k}^{\ast}+h}$ then the problem is solved by any set made by either ${k}^{\ast}$ or ${k}^{\ast}+1$ vertices whose degree is not smaller than ${d}_{{k}^{\ast}}$ and containing all the vertices whose degree is greater than ${d}_{{k}^{\ast}}$.

**Example**

**1.**

**Remark**

**2.**

- 1.
- If the matrix A is given in a sparse format or, equivalently, the graph G is represented by an adjacency list, the degrees ${d}_{1},\dots ,{d}_{n}$ can be computed in $\mathcal{O}(m)$ operations where m is the number of edges in G. In any case, that cost is not larger than $\mathcal{O}({n}^{2})$.
- 2.
- Standard sorting algorithms can reorder the numbers ${d}_{i}$ in non-increasing order in $\mathcal{O}(nlogn)$ operations, in the worst case.
- 3.
- The computation of the integer ${k}^{\ast}$ in Equation (5) requires no more than $\mathcal{O}(n)$ operations.

#### 2.2. A Symmetry Property

## 3. Allowing Loops and Directed Edges

#### 3.1. Allowing Loops

- Following the same arguments considered in the loopless case, the expression of $z(S)$ becomes$$z(S)={\left|S\right|}^{2}+v-2\phantom{\rule{0.166667em}{0ex}}\mathrm{vol}(S),\phantom{\rule{2.em}{0ex}}v=\sum _{i,j}{a}_{ij}.$$
- The optimal value of $z(S)$ under the constraint $\left|S\right|=k$ is given by ${z}_{k}={k}^{2}+v-2({d}_{1}+\cdots +{d}_{k})$, and the index ${k}^{\ast}$ characterizing the (least) cardinality of a core is$$\begin{array}{cc}\hfill {k}^{\ast}& =max\{k\in \{1,\dots ,n\}:{d}_{k}>k-1/2\}\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& =min\{k\in \{1,\dots ,n-1\}:{d}_{k+1}\le k+1/2\}.\hfill \end{array}$$

#### 3.2. Directed Graphs

## 4. Examples

#### 4.1. Two Real-World Networks

#### 4.2. Equitable Graphs

**Corollary**

**2.**

**Proof.**

- If ${d}^{(1)}\le {n}_{1}$ then$${d}_{{d}^{(1)}}={d}^{(1)}>{d}^{(1)}-1,\phantom{\rule{2.em}{0ex}}{d}_{{d}^{(1)}+1}\le {d}_{{d}^{(1)}}={d}^{(1)}.$$Owing to Equations (5) and (6) we have ${k}^{\ast}={d}^{(1)}\le {n}_{1}$ and consequently ${S}^{\ast}\subseteq {V}_{1}$. To prove that every other optimal solution is included in ${V}_{1}$ it remains to show that if ${k}^{\ast}={n}_{1}$ then no optimal solution can have ${k}^{\ast}+1$ nodes. By Corollary 1 an optimal solution with cardinality ${k}^{\ast}+1$ exists if and only if ${d}_{{k}^{\ast}+1}={k}^{\ast}$, but if ${k}^{\ast}={n}_{1}$ then ${d}_{{k}^{\ast}+1}<{d}^{(1)}={k}^{\ast}$ and we are done.
- If ${n}_{1}\le {d}^{(1)}$ then ${d}_{{n}_{1}}={d}^{(1)}>{n}_{1}-1$. Hence ${k}^{\ast}\ge {n}_{1}$ and ${V}_{1}\subseteq {S}^{\ast}$. □

**Remark**

**3.**

- In the first case we have ${d}_{{n}_{1}-1}={n}_{1}-1>{n}_{1}-2$ while ${d}_{{n}_{1}}={n}_{1}-1<{n}_{1}$. Hence ${k}^{\ast}={n}_{1}-1$ and the set ${S}^{\ast}$ identified by our algorithm is ${V}_{1}$ except one node. However, since ${d}_{{n}_{1}}={k}^{\ast}$, from Corollary 1 we obtain that also ${V}_{1}$ is a solution of Problem (2).
- In the second case we have ${d}_{{n}_{1}}=n-1>{n}_{1}-1$ while ${d}_{{n}_{1}+1}={n}_{1}\le {n}_{1}$. Also in this case ${k}^{\ast}={n}_{1}$ and ${V}_{1}$ is a core. However, we also have ${d}_{{n}_{1}+1}={n}_{1}$. Hence by Corollary 1 any set having the form ${V}_{1}\cup \left\{i\right\}$ with $i\in {V}_{2}$ is also a solution of Problem (2).

#### 4.3. Power-Law Networks

**Corollary**

**3.**

**Proof.**

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Decelle, A.; Krzakala, F.; Moore, C.; Zdeborová, L. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Phys. Rev. E
**2011**, 84, 066106. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Fasino, D.; Tudisco, F. The expected adjacency and modularity matrices in the degree corrected stochastic block model. Spec. Matrices
**2018**, 6, 110–121. [Google Scholar] [CrossRef] - Karrer, B.; Newman, M.E.J. Stochastic blockmodels and community structure in networks. Phys. Rev. E
**2011**, 83, 016107. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Barabási, A.L. Network Science; Cambridge University Press: Cambridge, UK, 2016. [Google Scholar]
- Fasino, D.; Tudisco, F. A modularity based spectral method for simultaneous community and anti-community detection. Linear Algebra Appl.
**2018**, 542, 605–623. [Google Scholar] [CrossRef] [Green Version] - Rombach, P.; Porter, M.A.; Fowler, J.H.; Mucha, P.J. Core-periphery structure in networks (revisited). SIAM Rev.
**2017**, 59, 619–646. [Google Scholar] [CrossRef] - Borgatti, S.P.; Everett, M.G. Models of core/periphery structures. Soc. Net.
**1999**, 21, 375–395. [Google Scholar] [CrossRef] - Csermely, P.; London, A.; Wu, L.Y.; Uzzi, B. Structure and dynamics of core/periphery networks. J. Complex Netw.
**2013**, 1, 93–123. [Google Scholar] [CrossRef] [Green Version] - Holme, P. Core-periphery organization of complex networks. Phys. Rev. E
**2005**, 72, 046111. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Tudisco, F.; Higham, D.J. A nonlinear spectral method for core-periphery detection in networks. SIAM J. Math. Data Sci.
**2019**, 2, 269–292. [Google Scholar] [CrossRef] - Della Rossa, F.; Dercole, F.; Piccardi, C. Profling core-periphery network structure by random walkers. Sci. Rep.
**2013**, 3, 1467. [Google Scholar] [CrossRef] [PubMed] [Green Version] - In’t Veld, D.; Van Lelyveld, I. Finding the core: Network structure in interbank markets. J. Bank. Financ.
**2014**, 49, 27–40. [Google Scholar] [CrossRef] - Brusco, M. An exact algorithm for a core/periphery bipartitioning problem. Soc. Netw.
**2011**, 33, 12–19. [Google Scholar] [CrossRef] - Cucuringu, M.; Rombach, P.; Lee, S.H.; Porter, M.A. Detection of core-periphery structure in networks using spectral methods and geodesic paths. Eur. J. Appl. Math.
**2016**, 27, 846–887. [Google Scholar] [CrossRef] [Green Version] - Kojaku, S.; Masuda, N. Finding multiple core-periphery pairs in networks. Phys. Rev. E
**2017**, 96, 052313. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Ma, A.; Mondragón, R.J. Rich-cores in networks. PLoS ONE
**2015**, 10, e0119678. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Chung, F.; Lu, L. Complex Graphs and Networks; Number 107 in CBMS; American Mathematical Society: Providence, RI, USA, 2004. [Google Scholar]
- Batagelj, V.; Mrvar, A. Pajek-program for large network analysis. Connections
**1998**, 21, 47–57. Available online: http://mrvar.fdv.uni-lj.si/pajek/ (accessed on 6 December 2019). - Zachary, W.W. An information flow model for conflict and fission in small groups. J. Anthropol. Res.
**1977**, 33, 452–473. [Google Scholar] [CrossRef] [Green Version] - Godsil, C.D. Compact graphs and equitable partitions. Linear Algebra Appl.
**1997**, 255, 259–266. [Google Scholar] [CrossRef] [Green Version] - Newman, M.E.J.; Martin, T. Equitable random graphs. Phys. Rev. E
**2014**, 90, 052824. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Fasino, D.; Tonetto, A.; Tudisco, F. Generating large scale-free networks with the Chung–Lu random graph model. ArXiv
**2019**, arXiv:1910.11341. [Google Scholar]

**Figure 1.**Examples of 2-block models for various mesoscale structures in undirected graphs. Shaded areas represent densities of non-zero entries in idealized adjacency matrices. (

**a**) A block model with two communities. (

**b**) A block model with two anti-communities. (

**c,d**) The two prototypical core–periphery block models introduced in [7].

**Figure 2.**Core–periphery bipartition of the network USAir97. (

**a**) The adjacency matrix, reordered according to the node numbering in Formula (3); entries in the core block are shown in yellow. (

**b**) A graphical layout of the network. Core nodes are shown in yellow. (

**c**) The subgraph induced by core nodes.

**Figure 3.**Core–periphery bipartition of the network Zachary. (

**a**) The adjacency matrix, reordered according to the node numbering in Formula (3); entries in the core block are shown in yellow. (

**b**) A graphical layout of the network. Core nodes are shown in yellow. Node numbering as in the original graph. (

**c**) The subgraph induced by core nodes.

**Figure 4.**Core–periphery bipartition of two equitable graphs with $n=30$ and three blocks. The partition matrices are $P(4)$ (

**a**,

**b**) and $P(9)$ (

**c**,

**d**), respectively, where $P(a)$ is given in Equation (10). Yellow dots correspond to core nodes, according to Algorithm 1.

**Figure 5.**Core sizes in power-law networks generated by the Chung–Lu random graph model. Horizontal axes: size n of a power-law network with average degree 3. Vertical axes: number of nodes in the corresponding core. Each cross represents a random network. Solid lines show the $\mathcal{O}({n}^{1/\gamma})$ behavior. (

**a**) $\gamma =2.1$; (

**b**) $\gamma =2.5$; (

**c**) $\gamma =2.9$.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Fasino, D.; Rinaldi, F.
A Fast and Exact Greedy Algorithm for the Core–Periphery Problem. *Symmetry* **2020**, *12*, 94.
https://doi.org/10.3390/sym12010094

**AMA Style**

Fasino D, Rinaldi F.
A Fast and Exact Greedy Algorithm for the Core–Periphery Problem. *Symmetry*. 2020; 12(1):94.
https://doi.org/10.3390/sym12010094

**Chicago/Turabian Style**

Fasino, Dario, and Franca Rinaldi.
2020. "A Fast and Exact Greedy Algorithm for the Core–Periphery Problem" *Symmetry* 12, no. 1: 94.
https://doi.org/10.3390/sym12010094