WOLFRAM

gives the k-core components of the underlying simple graph of g.

KCoreComponents[g,k,"In"]

gives the k-core components with vertex in-degrees at least k.

KCoreComponents[g,k,"Out"]

gives the k-core components with vertex out-degrees at least k.

KCoreComponents[{vw,},]

uses rules vw to specify the graph g.

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 all

Basic Examples  (2)Summary of the most common use cases

Find the 3-core components of a graph:

Out[2]=2

Show the 3-core components:

Out[3]=3

Find the 4-core components in a social network:

Out[2]=2

Scope  (10)Survey of the scope of standard use cases

KCoreComponents works with undirected graphs:

Out[1]=1

Directed graphs:

Out[1]=1

Multigraphs:

Out[1]=1

Mixed graphs:

Out[1]=1

KCoreComponents finds core components of any size:

Out[1]=1

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

Out[1]=1

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

Out[1]=1

Use rules to specify the graph:

Out[1]=1

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

Out[1]=1

KCoreComponents works with large graphs:

Out[2]=2

Applications  (3)Sample problems that can be solved with this function

Highlight the k-cores of a graph:

Out[2]=2

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

Out[2]=2

Trees and forests are 1-degenerate graphs:

Out[3]=3
Out[4]=4

The BarabasiAlbert model with k edges added at each step is k-degenerate:

Out[5]=5
Out[6]=6

A social network:

Group actors:

Out[2]=2

Highlight groups:

Out[3]=3

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:

First iteration:

Out[5]=5

Second iteration:

Out[6]=6

No more vertices are removed by further iteration:

Out[7]=7

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

Out[8]=8

The obtained k-cores of undirected graphs are connected:

Out[2]=2
Out[3]=3

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

Out[2]=2
Out[3]=3
Out[4]=4

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

Out[1]=1
Out[2]=2

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

Out[3]=3
Out[4]=4
Out[5]=5

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

Out[2]=2
Out[3]=3

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

Out[2]=2
Out[3]=3

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

Out[2]=2
Out[4]=4

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

Out[2]=2
Out[4]=4

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

Out[5]=5
Out[7]=7
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).

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 ]}

@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 ]}

@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 ]}