Proofs: Clique percolation method
These are the human proofs of Clique percolation method, at full length.
The clique percolation method outputs the k-clique communities full
This proof shows: correctness, termination.
Let be a simple undirected graph and . Let be the list of line L1, which holds each -clique of exactly once. A face of a -clique is a set with , so has exactly faces, each of size . Let be the equivalence relation on the cliques generated by adjacency, where and are adjacent when .
Termination. The list is finite, each clique has faces, and each UNION and each lookup in ends. Line L8 runs over the finitely many classes. So the algorithm stops.
Lemma 1 (faces and adjacency). Two distinct -cliques and are adjacent if and only if they have a common face.
Proof. If , let . Then for the one , so is a face of , and in the same way a face of . Conversely, a common face has , so , and with gives .
Write when the indices and are in the same set of the union-find at the end.
Lemma 2 (the union-find classes). For all indices , if and only if .
Proof. Each union joins equivalent cliques. Line L7 calls UNION only when is a face of and was stored for a clique with the face (line L7 stores only for a face of ). The two indices differ, since a clique has distinct faces and is handled once, so by Lemma 1 the two cliques are adjacent. The relation is the smallest equivalence that contains the pairs joined by UNION, and each such pair is in , which is an equivalence. So implies .
Adjacent cliques are joined. Let and be adjacent, with the common face by Lemma 1. The first index handled at line L4 among those whose clique has the face stores , and never changes after that, since line L7 stores only for a face not in . Every later index with the face meets and is joined with . So . Since is generated by adjacency and is an equivalence, implies .
Theorem. CPM outputs, for each class of , the set , once, and nothing else.
Proof. By Lemma 2, the map sends the classes of the union-find onto the classes of , one to one, since lists each clique once. Line L8 visits each class of the union-find once, and line L9 outputs , which is the union of the cliques of the matching class of . Every class of is the image of one class , so every -clique community is output, and each output is one of them.