FindKClan
Details

- 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.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Find a largest 2-clan in a graph:

https://wolfram.com/xid/0puvb41dwu-co2cc7

https://wolfram.com/xid/0puvb41dwu-gd1l6


https://wolfram.com/xid/0puvb41dwu-b7463e


https://wolfram.com/xid/0puvb41dwu-fsbe1v

https://wolfram.com/xid/0puvb41dwu-ch2v1f

Scope (14)Survey of the scope of standard use cases
Specification (8)
FindKClan works with undirected graphs:

https://wolfram.com/xid/0puvb41dwu-jt6j3


https://wolfram.com/xid/0puvb41dwu-gf7u2v


https://wolfram.com/xid/0puvb41dwu-15kl6n


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


https://wolfram.com/xid/0puvb41dwu-c4jban


https://wolfram.com/xid/0puvb41dwu-ugqya

Use rules to specify the graph:

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

FindKClan works with large graphs:

https://wolfram.com/xid/0puvb41dwu-lkg873

https://wolfram.com/xid/0puvb41dwu-eap0s9

Enumeration (6)
A 2-clan containing exactly 4 vertices:

https://wolfram.com/xid/0puvb41dwu-eygfi

A 2-clan containing at most 4 vertices:

https://wolfram.com/xid/0puvb41dwu-cvu45g

A 2-clan containing between 3 and 5 vertices:

https://wolfram.com/xid/0puvb41dwu-qrclv

A largest 2-clan that includes a given vertex:

https://wolfram.com/xid/0puvb41dwu-ibhxh8


https://wolfram.com/xid/0puvb41dwu-n7v6gc

FindKClan gives an empty list if there is no clan:

https://wolfram.com/xid/0puvb41dwu-bmmbtb

Applications (1)Sample problems that can be solved with this function
Properties & Relations (8)Properties of the function, and connections to other functions
Compute k-clans using FindKClique:

https://wolfram.com/xid/0puvb41dwu-ebwdq5

https://wolfram.com/xid/0puvb41dwu-giqa0o


https://wolfram.com/xid/0puvb41dwu-041vz


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

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


https://wolfram.com/xid/0puvb41dwu-em7dv9

A complete graph is a maximum k-clan:

https://wolfram.com/xid/0puvb41dwu-bwz5yn


https://wolfram.com/xid/0puvb41dwu-brgzyy

A star graph is a maximum 2-clan:

https://wolfram.com/xid/0puvb41dwu-bxp7of


https://wolfram.com/xid/0puvb41dwu-hj3f9m

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

https://wolfram.com/xid/0puvb41dwu-jbgjkc

https://wolfram.com/xid/0puvb41dwu-uk5iu


https://wolfram.com/xid/0puvb41dwu-uv465

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

https://wolfram.com/xid/0puvb41dwu-e39ewp

https://wolfram.com/xid/0puvb41dwu-eprqgz


https://wolfram.com/xid/0puvb41dwu-bxe7fd


https://wolfram.com/xid/0puvb41dwu-d5tv18

https://wolfram.com/xid/0puvb41dwu-dg6sqm


https://wolfram.com/xid/0puvb41dwu-lnjyak

The converse is not always true:

https://wolfram.com/xid/0puvb41dwu-fcosz


https://wolfram.com/xid/0puvb41dwu-b4ps8u

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

https://wolfram.com/xid/0puvb41dwu-h5fwg

https://wolfram.com/xid/0puvb41dwu-cos5jm

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

https://wolfram.com/xid/0puvb41dwu-62th8


https://wolfram.com/xid/0puvb41dwu-sd5jt


https://wolfram.com/xid/0puvb41dwu-cwvztx

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