Find the
-Core Components of a Graph
Find the
-Core Components of a Graph
Graphs can be hierarchically decomposed into their
-cores by using KCoreComponents.
g = [image];coordRules = Thread[VertexList[g] -> (VertexCoordinates /. AbsoluteOptions[g, VertexCoordinates])];showCores[cores_] := Show[Append[Graphics /@ Table[Join[{Hue[1 - k / (Length[cores] + 1), .3, .7], Thickness[0.14], CapForm["Round"]}, Line[(List@@#) /. coordRules]& /@ EdgeList[Subgraph[g, Join@@cores[[k]]]]], {k, 1, Length[cores]}], HighlightGraph[g, {}, VertexStyle -> EdgeForm[{White, Opacity[1]}], EdgeStyle -> Directive[Thick, Opacity[1], White]]], ImageSize -> 500];showCores[Table[KCoreComponents[g, k], {k, 1, 3}]]