K-cores, step by step
The k-core decomposition peels a network from the outside in. Peeling is not a single pass: every node you remove takes a neighbor away from others, and some of them fall below the bar too. Step through a small example to see it.
What to watch for
The k-core is what is left after you repeatedly remove every node with fewer than k neighbors. "Repeatedly" is the important word.
A common shortcut is to remove the degree-1 nodes once and call the rest the 2-core. In this example that would keep M, Q and R inside: M starts with 3 neighbors, but once N and O are gone it has only 1 left. You only know the 2-core when no node can be removed any more; everything removed on the way is the 1-shell.
The same happens for every k, which is why a node's core number is not its degree. H, I and J start with 3 neighbors and still end in the 2-shell, while C, with 5, shares the 3-core with A, B and D.
Each node is touched once per neighbor it loses, so the whole decomposition runs in time linear in the number of edges, which is what lets LaNet-vi draw graphs with millions of them.
Download as GIF for slidesFrom the toy example to the picture
The last step arranges the shells as LaNet-vi does: one ring per shell, the maximum core at the center, colors from magenta to red. The gallery shows the same idea on real networks, and I am here finds your own network in the Internet's k-core decomposition.
Method: J. I. Alvarez-Hamelin, L. Dall'Asta, A. Barrat and A. Vespignani, Large scale networks fingerprinting and visualization using the k-core decomposition (NIPS 2005). The linear-time peeling algorithm is due to V. Batagelj and M. Zaveršnik, An O(m) algorithm for cores decomposition of networks (2003).