KCoreComponents
✖
KCoreComponents
Details

- A k-core component is a maximal weakly connected subgraph in which all vertices have degree at least k.
- KCoreComponents returns a list of components {c1,c2,…}, where each component ci is given as a list of vertices.
- For a directed graph g, KCoreComponents[g,k] gives the k-core components of the underlying undirected simple graph of g.
- KCoreComponents works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Find the 3-core components of a graph:

https://wolfram.com/xid/0ywuc1asntar-b26eb7

https://wolfram.com/xid/0ywuc1asntar-jnuttl


https://wolfram.com/xid/0ywuc1asntar-x33u6

Find the 4-core components in a social network:

https://wolfram.com/xid/0ywuc1asntar-i8ys3s

https://wolfram.com/xid/0ywuc1asntar-bofdft

Scope (10)Survey of the scope of standard use cases
KCoreComponents works with undirected graphs:

https://wolfram.com/xid/0ywuc1asntar-bv2jib


https://wolfram.com/xid/0ywuc1asntar-b4ybz0


https://wolfram.com/xid/0ywuc1asntar-djehuq


https://wolfram.com/xid/0ywuc1asntar-czvddh

KCoreComponents finds core components of any size:

https://wolfram.com/xid/0ywuc1asntar-2jfqc

Find k-core components with vertex in-degrees at least k:

https://wolfram.com/xid/0ywuc1asntar-dutfr4

Find k-core components with vertex out-degrees at least k:

https://wolfram.com/xid/0ywuc1asntar-gr8kj0

Use rules to specify the graph:

https://wolfram.com/xid/0ywuc1asntar-t96r7

KCoreComponents gives an empty list if there is no k-core:

https://wolfram.com/xid/0ywuc1asntar-gqw14k

KCoreComponents works with large graphs:

https://wolfram.com/xid/0ywuc1asntar-y605q8

https://wolfram.com/xid/0ywuc1asntar-rdadr

Applications (3)Sample problems that can be solved with this function
Highlight the k-cores of a graph:

https://wolfram.com/xid/0ywuc1asntar-etupyc

https://wolfram.com/xid/0ywuc1asntar-dcimw6

Find the degeneracy of a graph g, being the largest k such that g has a k-core:

https://wolfram.com/xid/0ywuc1asntar-45cp1o

https://wolfram.com/xid/0ywuc1asntar-5daysf

Trees and forests are 1-degenerate graphs:

https://wolfram.com/xid/0ywuc1asntar-h1llma


https://wolfram.com/xid/0ywuc1asntar-g0js8k

The Barabasi–Albert model with k edges added at each step is k-degenerate:

https://wolfram.com/xid/0ywuc1asntar-eavg8q


https://wolfram.com/xid/0ywuc1asntar-ki1xzp


https://wolfram.com/xid/0ywuc1asntar-cmlbzy

https://wolfram.com/xid/0ywuc1asntar-mh0acz


https://wolfram.com/xid/0ywuc1asntar-eugq8

Properties & Relations (8)Properties of the function, and connections to other functions
Find k-core components by repeatedly removing vertices of out-degree less than k:

https://wolfram.com/xid/0ywuc1asntar-8evpm7

https://wolfram.com/xid/0ywuc1asntar-s7fsx2

https://wolfram.com/xid/0ywuc1asntar-vjzb8e

https://wolfram.com/xid/0ywuc1asntar-db9mxn

https://wolfram.com/xid/0ywuc1asntar-5x7xt5


https://wolfram.com/xid/0ywuc1asntar-i6v07e

No more vertices are removed by further iteration:

https://wolfram.com/xid/0ywuc1asntar-yfdtq2

Use ConnectedComponents to obtain the components of the k-core:

https://wolfram.com/xid/0ywuc1asntar-rer7xc

The obtained k-cores of undirected graphs are connected:

https://wolfram.com/xid/0ywuc1asntar-nys1go

https://wolfram.com/xid/0ywuc1asntar-saorci


https://wolfram.com/xid/0ywuc1asntar-kksg0h

A vertex in a k-core component ci has at least k neighbors in ci:

https://wolfram.com/xid/0ywuc1asntar-jhlksp

https://wolfram.com/xid/0ywuc1asntar-la7oi9


https://wolfram.com/xid/0ywuc1asntar-g72l24


https://wolfram.com/xid/0ywuc1asntar-fhbuub

For an undirected graph, the vertex in-degree and out-degree are equal to the vertex degree:

https://wolfram.com/xid/0ywuc1asntar-qaga4


https://wolfram.com/xid/0ywuc1asntar-m13mg

The k-core vertex in-degree and out-degree components are equal to the k-core components:

https://wolfram.com/xid/0ywuc1asntar-b7tef


https://wolfram.com/xid/0ywuc1asntar-cmw7wt


https://wolfram.com/xid/0ywuc1asntar-buftm0

The maximum clique of size is contained in a
-core component:

https://wolfram.com/xid/0ywuc1asntar-bkiavs

https://wolfram.com/xid/0ywuc1asntar-bge618


https://wolfram.com/xid/0ywuc1asntar-xi3ik

A k-core component is contained in a (k-1)-core component:

https://wolfram.com/xid/0ywuc1asntar-mpj5t7

https://wolfram.com/xid/0ywuc1asntar-gk1hgd


https://wolfram.com/xid/0ywuc1asntar-b8sofq

The adjacency matrix of a k-core component has at least k nonzero entries in each row:

https://wolfram.com/xid/0ywuc1asntar-ctqp1j

https://wolfram.com/xid/0ywuc1asntar-eiscnm


https://wolfram.com/xid/0ywuc1asntar-eoh9xz


https://wolfram.com/xid/0ywuc1asntar-cb5vqh

The adjacency matrix of a k-core in-degree component has at least k nonzero entries in each column:

https://wolfram.com/xid/0ywuc1asntar-gz6v0n

https://wolfram.com/xid/0ywuc1asntar-iabe27


https://wolfram.com/xid/0ywuc1asntar-x4c9b


https://wolfram.com/xid/0ywuc1asntar-hyx1hr

The adjacency matrix of a k-core out-degree component has at least k nonzero entries in each row:

https://wolfram.com/xid/0ywuc1asntar-dlrr3l


https://wolfram.com/xid/0ywuc1asntar-by0dx0


https://wolfram.com/xid/0ywuc1asntar-k9qsee

Wolfram Research (2010), KCoreComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/KCoreComponents.html (updated 2015).
Text
Wolfram Research (2010), KCoreComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/KCoreComponents.html (updated 2015).
Wolfram Research (2010), KCoreComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/KCoreComponents.html (updated 2015).
CMS
Wolfram Language. 2010. "KCoreComponents." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KCoreComponents.html.
Wolfram Language. 2010. "KCoreComponents." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KCoreComponents.html.
APA
Wolfram Language. (2010). KCoreComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KCoreComponents.html
Wolfram Language. (2010). KCoreComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KCoreComponents.html
BibTeX
@misc{reference.wolfram_2025_kcorecomponents, author="Wolfram Research", title="{KCoreComponents}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KCoreComponents.html}", note=[Accessed: 30-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_kcorecomponents, organization={Wolfram Research}, title={KCoreComponents}, year={2015}, url={https://reference.wolfram.com/language/ref/KCoreComponents.html}, note=[Accessed: 30-May-2025
]}