finds a largest k-clan in the graph g.


finds a k-clan containing at most n vertices.


finds a k-clan containing exactly n vertices.


finds a k-clan containing between nmin and nmax vertices.


finds at most s k-clans.


finds k-clans that include the vertex v only.


uses rules vw to specify the graph g.


  • A k-clan is a k-clique where the diameter of the corresponding subgraph is at most k.
  • FindKClan returns a list of k-clans.
  • FindKClan will return an empty list if there is no k-clan.
  • FindKClan[,k,nspec,All] finds all the k-clans.
  • FindKClan works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Background & Context

  • FindKClan finds one or more k-clans in a graph, returning them as a list of vertices. Here, a k-clan is a k-clique such that the graph diameter (i.e. the length of the longest possible path between two vertices) of the subgraph induced by the vertices is at most k. k-clans are used in project selection, pattern matching, finance, and network analysis.
  • In contrast, FindKClique can be used to find k-cliques of different subgraph diameter, from 1 to the largest possible size (in general n for a graph on n vertices). FindKClique can be used to find a single k-clique of specified subgraph diameter, a specified number of cliques, or all.
  • 1-clans are cliques. All k-clans are k-clubs and k-cliques, but the converse is not always true. Related functions include FindClique, FindKClique, FindKClub, and FindKPlex.


open allclose all

Basic Examples  (2)

Find a largest 2-clan in a graph:

Show the 2-clan:

Find all 4-clans:

Scope  (14)

Specification  (8)

FindKClan works with undirected graphs:

Directed graphs:


Mixed graphs:

Find a largest 2-clan:

Find k-clans for arbitrary k:

Use rules to specify the graph:

FindKClan works with large graphs:

Enumeration  (6)

A 2-clan containing exactly 4 vertices:

A 2-clan containing at most 4 vertices:

A 2-clan containing between 3 and 5 vertices:

A largest 2-clan that includes a given vertex:

Find all 2-clans in a graph:

FindKClan gives an empty list if there is no clan:

Applications  (1)

Highlight all 2-clans of size 5:

Properties & Relations  (8)

Compute k-clans using FindKClique:

All 2-clans:

A 1-clan is a clique:

A complete graph is a maximum k-clan:

A star graph is a maximum 2-clan:

The (k-1)-clan is contained in a k-clique:

All k-clans are k-cliques. The converse is not always true:

All k-clans are k-clubs:

The converse is not always true:

Find a largest 2-clan that includes a given vertex:

Compare with 2-clique, 2-club, and 2-plex:

Introduced in 2012
Updated in 2014