Detecting short directed cycles using rectangular matrix multiplication and dynamic programming

  • Authors:
  • Raphael Yuster;Uri Zwick

  • Affiliations:
  • University of Haifa at Oranim, Tivon, Israel;Tel Aviv University, Tel Aviv, Israel

  • Venue:
  • SODA '04 Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present several new algorithms for detecting short fixed length cycles in digraphs. The new algorithms utilize fast rectangular matrix multiplication algorithms together with a dynamic programming approach similar to the one used in the solution of the classical chain matrix product problem. The new algorithms are instantiations of a generic algorithm that we present for finding a directed Ck, i.e., a directed cycle of length k, in a digraph, for any fixed k ≥ 3. This algorithm partitions the prospective Ck's in the input digraph G = (V,E) into O(logk V) classes, according to the degrees of their vertices. For each cycle class we determine, in O(Eck log V) time, whether G contains a Ck from that class, where ck = ck(ω) is a constant that depends only on !, the exponent of square matrix multiplication. The search for cycles from a given class is guided by the solution of a small dynamic programming problem. The total running time of the obtained deterministic algorithm is therefore O(Eck logk+1 V).For C3, we get c3 = 2ω/(ω + 1) C4 we get c4 = (4ω - 1)/(2ω + 1) O(E(4ω-1)/(2ω+1)) = o(E1.48) time algorithm. This improves upon an O(E3/2) time algorithm of [AYZ97].For C5 we get c5 = 3ω/(ω + 2) O(E3ω/(ω+2) log6 V) = o(E1.63) improves upon an O(E5/3) time algorithm of [AYZ97].Determining ck for k ≥ 6 is a difficult task. We conjecture that ck = (k + 1)ω/(2ω + k - 1), for every odd k. The values of ck for even k ≥ 6 seem to exhibit a much more complicated dependence on ω.