- k_truss(G, k)[source]#
Returns the k-truss of
The k-truss is the maximal induced subgraph of
Gwhich contains at least three vertices where every edge is incident to at least
- GNetworkX graph
An undirected graph
The order of the truss
- HNetworkX graph
The k-truss subgraph
The k-truss is not defined for graphs with self loops, directed graphs and multigraphs.
A k-clique is a (k-2)-truss and a k-truss is a (k+1)-core.
Not implemented for digraphs or graphs with parallel edges or self loops.
Graph, node, and edge attributes are copied to the subgraph.
K-trusses were originally defined in  which states that the k-truss is the maximal induced subgraph where each edge belongs to at least
k-2triangles. A more recent paper, , uses a slightly different definition requiring that each edge belong to at least
ktriangles. This implementation uses the original definition of
Bounds and Algorithms for k-truss. Paul Burkhardt, Vance Faber, David G. Harris, 2018. https://arxiv.org/abs/1806.05523v2
Trusses: Cohesive Subgraphs for Social Network Analysis. Jonathan Cohen, 2005.