A GPU-based parallel algorithm for enumerating all chordless cycles in graphs Walid A. R. Jradi Elisângela S. Dias Diane Castonguay Humberto Longo Hugo A. D. do Nascimento Universidade Federal de Goiás {walid.jradi,elisangela,diane,longo,hadn}@inf.ufg.br November 8, 2021 Abstract In a finite undirected simple graph, a chordless cycle is an induced subgraph which is a cycle. We propose a GPU parallel algorithm for enumerating all chordless cycles of such a graph. The algorithm, implemented in OpenCL, is based on a previous sequential algorithm devel- oped by the current authors for the same problem. It uses a more compact data structure for solution representation which is suitable for the memory-size limitation of a GPU. More- over, for graphs with a sufficiently large amount of chordless cycles, the algorithm presents a significant improvement in execution time that outperforms the sequential method. Keywords: Graphs, Chordless Cycles, Parallel Algorithm, GPU, OpenCL. 1 Introduction Consider a finite undirected simple graph G =(V,E), with n = |V | and m = |E|.A chordless cycle is an induced subgraph that is a cycle, i.e., there is no edge outside the cycle connecting two vertices of it. Sequential and parallel algorithms to the problem of determining if a graph contains a chord- less cycle with k ≥ 4 vertices, for some fixed cycle length k, were proposed by Chandrasekharan et al. [4]. They presented an algorithm, where a cycle C l , l ≥ k can be found in O(m 2 · n k−4 ) time sequentially and in O(log n) time using O(m 2 · n k−4 ) processors in parallel on a CRCW PRAM. However, finding just one cycle of length greater or equal to a fixed value k is easier than enumerating all chordless cycles in a graph G. In general, enumeration is classified as belonging to the class of P -complete problems, whose resolution is comparatively as hard as the resolution of problems in NP -complete class [3, 23]. Although there are sequential algorithms to solve problems in such class, they become impractical as the problem size grows, preventing its utilization and requiring the usage of other approaches, like heuristics and meta-heuristics (trying to find a good enough approximate solution) or parallel computing (aiming the reduction of the algorithm’s execution time). Many sequential algorithms have been proposed for enumerating graph structures such as cycles [1, 7, 13, 14, 16, 17, 24], circuits [2, 20], paths [9, 16], trees [11, 16] and cliques [15, 21]. This kind of tasks is usually hard to deal with, since even a small graph may contain a huge number of such structures. Nevertheless, enumeration is necessary in the resolution process of many practical problems. In particular, the enumeration of chordless cycles is useful in areas like the study of ecological networks with the aim of discovering the predators that compete for the same prey [19]. Usually, a directed food web graph is transformed into a niche overlap graph to represent the competition between species, see [25]. The lack of chordless cycles in the later graph means that the species can be rearranged along a single hierarchy. Another application 1 arXiv:1410.4876v2 [cs.DC] 25 Jun 2015