Skip to content

Commit acce4e3

Browse files
committed
Include MaximumClique heuristic (for now)
1 parent b3be665 commit acce4e3

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

content/graph/MaximalCliques.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
* Source: https://en.wikipedia.org/wiki/Bron%E2%80%93Kerbosch_algorithm
66
* Description: Runs a callback for all maximal cliques in a graph (given as a
77
* symmetric bitset matrix; self-edges not allowed). Callback is given a bitset
8-
* representing the maximal clique. Possible optimization: on the top-most
9-
* recursion level, ignore 'cands', and go through nodes in order of increasing
10-
* degree, where degrees go down as nodes are removed.
8+
* representing the maximal clique.
119
* Time: O(3^{n/3}), much faster for sparse graphs
1210
* Status: fuzz-tested
1311
*/
1412
#pragma once
13+
/// Possible optimization: on the top-most
14+
/// recursion level, ignore 'cands', and go through nodes in order of increasing
15+
/// degree, where degrees go down as nodes are removed.
16+
/// (mostly irrelevant given MaximumClique)
1517

1618
typedef bitset<128> B;
1719
template<class F>

content/graph/MaximumClique.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Date: 2019-05-10
44
* License: GPL3+
55
* Source: https://en.wikipedia.org/wiki/MaxCliqueDyn_maximum_clique_algorithm, https://gitlab.com/janezkonc/mcqd/blob/master/mcqd.h
6-
* Description: Finds a maximum clique of a graph (given as symmetric bitset
6+
* Description: Quickly finds a maximum clique of a graph (given as symmetric bitset
77
* matrix; self-edges not allowed). Can be used to find a maximum independent
88
* set by finding a clique of the complement graph.
99
* Time: Runs in about 1s for n=155 and worst case random graphs (p=.90). Runs

content/graph/chapter.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ \section{DFS algorithms}
3030

3131
\section{Heuristics}
3232
\kactlimport{MaximalCliques.h}
33-
% \kactlimport{MaximumClique.h}
33+
\kactlimport{MaximumClique.h}
3434
\kactlimport{MaximumIndependentSet.h}
3535

3636
\section{Trees}
@@ -41,4 +41,4 @@ \section{Trees}
4141
\kactlimport{LinkCutTree.h}
4242
\kactlimport{DirectedMST.h}
4343
\kactlimport{MatrixTree.h}
44-
\hardcolumnbreak
44+
\columnbreak

kactl.pdf

5.15 KB
Binary file not shown.

0 commit comments

Comments
 (0)