DeepAI AI Chat
Log In Sign Up

Simple and efficient four-cycle counting on sparse graphs

03/10/2023
by   Paul Burkhardt, et al.
National Security Agency
0

We consider the problem of counting 4-cycles (C_4) in a general undirected graph G of n vertices and m edges (in bipartite graphs, 4-cycles are also often referred to as butterflies). There have been a number of previous algorithms for this problem; some of these are based on fast matrix multiplication, which is attractive theoretically but not practical, and some of these are based on randomized hash tables. We develop a new simpler algorithm for counting C_4 requiring O(mδ̅(G)) time and O(n) space, where δ̅(G) ≤ O(√(m)) is the average degeneracy parameter introduced by Burkhardt, Faber Harris (2020). It has several practical improvements over previous algorithms; for example, it is fully deterministic, does not require any sorting of the adjacency list of the input graph, and avoids any expensive arithmetic in its inner loops. To the best of our knowledge, all previous efficient algorithms for C_4 counting have required Ω(m) space. The algorithm can also be adapted to count 4-cycles incident to each vertex and edge.

READ FULL TEXT

page 1

page 2

page 3

page 4

12/24/2019

Counting the geodesic cycles of a given length

Assume that X is a connected regular undirected graph of finite order n....
02/19/2023

On Existence of Must-Include Paths and Cycles in Undirected Graphs

Given an undirected graph G=(V,E) and vertices s,t,w_1,w_2∈ V, we study ...
08/03/2023

Another Hamiltonian Cycle in Bipartite Pfaffian Graphs

We present a linear-time algorithm that, given as input (i) a bipartite ...
05/21/2021

Finding All Bounded-Length Simple Cycles in a Directed Graph

A new efficient algorithm is presented for finding all simple cycles tha...
06/07/2023

Synthesising Recursive Functions for First-Order Model Counting: Challenges, Progress, and Conjectures

First-order model counting (FOMC) is a computational problem that asks t...
01/16/2020

Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours

New algorithms for generating closed knight's tours are obtained by gene...