A general purpose algorithm for counting simple cycles and simple paths of any length (original) (raw)
Related papers
Approximate cycles count in undirected graphs
International Journal of Computational Intelligence Systems, 2013
In social networks, counting the number of different cycle sizes can be used to measure the entropy of the network that represents its robustness. The exact algorithms to compute cycles in a graph can generate exact results but they are not guaranteed to run in a polynomial time. We present an approximation algorithm for counting the number of cycles in an undirected graph. The algorithm is regression-based and guaranteed to run in a polynomial time. A set of experiments are conducted to compare the results of our approximate algorithm with the results of an exact algorithm based on the Donald-Johnson backtracking algorithm.
A message-passing algorithm for counting short cycles in a graph
IEEE Information Theory Workshop 2010 (ITW 2010), 2010
A message-passing algorithm for counting short cycles in a graph is presented. For bipartite graphs, which are of particular interest in coding, the algorithm is capable of counting cycles of length g, g + 2,. .. , 2g − 2, where g is the girth of the graph. For a general (non-bipartite) graph, cycles of length g, g + 1,. .. , 2g − 1 can be counted. The algorithm is based on performing integer additions and subtractions in the nodes of the graph and passing extrinsic messages to adjacent nodes. The complexity of the proposed algorithm grows as O(g|E| 2), where |E| is the number of edges in the graph. For sparse graphs, the proposed algorithm significantly outperforms the existing algorithms in terms of computational complexity and memory requirements. Index Terms Counting cycles in a graph, bipartite graph, girth, short cycles, low-density parity-check (LDPC) codes.
Algorithms to count paths and cycles
Information Processing Letters, 1994
We use results for Hamiltonian cycles and paths to deduce 0(2"poly(n)) time and O(poly(n)) space algorithms to count: (1) cycles on a single vertex, (2) all cycles, (3) paths between a given pair of vertices, and (4) all paths in a graph with IZ vertices.
On the Number of Cycles in a Graph
Open Journal of Discrete Mathematics
In this paper, we obtain explicit formulae for the number of 7-cycles and the total number of cycles of lengths 6 and 7 which contain a specific vertex v i in a simple graph G, in terms of the adjacency matrix and with the help of combinatorics.
The complexity of node counting on undirected graphs
1998
Abstract We analyze the complexity of Node Counting, a graph-traversal method. On many graphs arising in control problems in Artificial Intelligence, Node Counting performs as efficiently as other methods which are known to be of polynomial complexity in the number of states (eg, Learning Real-Time A* method). We show that complexity of Node Counting on undirected graphs is �� (npn), which is not polynomial in the number of states. This solves an open problem from the literature.
The number of n-cycles in a graph
Applied Mathematics and Computation, 2007
Recently, Chang and Fu [Y.C. Chang, H.L. Fu, The number of 6-cycles in a graph, Bull. Inst. Combin. Appl. 39 (2003) 27–30] derived an exact expression, based on powers of the adjacency matrix, for the number of 6-cycles in a graph. Here, I demonstrate a method for obtaining the number of n-cycles in a graph from the immanants of the adjacency matrix. The method is applicable to cycles of all sizes and to sets of disjoint cycles of any sizes, and the cycles in the set need not be the same size.
Once again: Finding simple cycles in graphs
1997
We present a randomized algorithm that computes a simple cycle of length k in general graphs, where k is a xed integer, in O(maxfm; n logng) expected time. This algorithm can be derandomized with only a small loss in e ciency, yielding a deterministic algorithm for this task which runs in O(maxfm log n; n log ng) worst-case time. We show that the randomized algorithm may be parallelized. These algorithms improve upon previous results of many authors. Furthermore, we answer the question of AYZ 94], whether deciding if a given graph contains a triangle is as di cult as boolean multiplication of two n by n matrices, in the negative.
An algorithm for counting short cycles in bipartite graphs
IEEE Transactions on Information Theory, 2006
) be a bipartite graph with disjoint vertex sets and , edge set , and girth . This correspondence presents an algorithm for counting the number of cycles of length + 2 and + 4 incident upon every vertex in . The proposed cycle counting algorithm consists of integer matrix operations and its complexity grows as ( ) where = max( ).
Efficient Enumeration of All Chordless Cycles in Graphs
In a finite undirected simple graph, a {\it chordless cycle} is an induced subgraph which is a cycle. We propose two algorithms to enumerate all chordless cycles of such a graph. Compared to other similar algorithms, the proposed algorithms have the advantage of finding each chordless cycle only once. To ensure this, we introduced the concepts of vertex labeling and initial valid vertex triplet. To guarantee that the expansion of a given chordless path will always lead to a chordless cycle, we use a breadth-first search in a subgraph obtained by the elimination of many of the vertices from the original graph. The resulting algorithm has time complexity mathcalO(n+m)\mathcal{O}(n + m)mathcalO(n+m) in the output size, where nnn is the number of vertices and mmm is the number of edges.