On contrasting vertex contraction with relaxation-based approaches for negative cost cycle detection

In this paper, we present a comprehensive empirical analysis of the Vertex Contraction (VC) algorithm for the problem of checking whether a directed graph with positive and negative costs on its edges has a negative cost cycle (NCCD). VC was first presented in [K. Subramani, L. Kovalchick, Contraction versus relaxation: a comparison of two approaches for the negative cost cycle detection problem, in: P.M.A. Sloot et al. (Ed.), Proceedings of the third international conference on computational science (ICCS), Lecture notes in computer science, vol. 2659, Springer-Verlag, 2003, pp. 377-387] and is the only known purely greedy strategy for the NCCD problem. In [K. Subramani, L. Kovalchick, Contraction versus relaxation: a comparison of two approaches for the negative cost cycle detection problem, in: P.M.A. Sloot et al. (Ed.), Proceedings of the third international conference on computational science (ICCS), Lecture notes in computer science, vol. 2659, Springer-Verlag, 2003, pp. 377-387], we compared the performance profiles of a naive implementation of VC and the ''standard'' Bellman-Ford (BF) algorithm for negative cost cycle detection; we observed that VC performed an order of magnitude better than the BF algorithm. Our experiments were conducted on a range of randomly generated inputs over multiple classes of networks and the results conclusively demonstrated the superiority of VC over a naive implementation of BF. Our observations are surprising given that VC is asymptotically inferior to BF on sparse networks. This paper continues the study of contrasting greedy and dynamic programming (relaxation-based) approaches for the NCCD problem, by comparing sophisticated variants of VC with sophisticated implementations of the BF algorithm. Variants of VC are obtained by employing different heuristics to determine the vertex contraction sequence, in precisely the same manner as variants of BF are obtained by employing different heuristics to determine the edge relaxation sequence. Our experiments indicate that on most classes of networks, there is at least one VC variant with a performance profile that is comparable to the more sophisticated BF implementations. Our results are most surprising for the case of planar networks, where a variant of VC performs almost as well as the best relaxation-based algorithm. One of the principal conclusions of our work is that a simple, greedy approach involving vertex contraction is a good choice on sparse networks. On a more fundamental note, we establish that the selection of an algorithm for the NCCD problem should involve an analysis of the input and the architecture of the computing machine, in order to maximize performance.

[1]  K. Subramani,et al.  An Analysis of Zero-Clairvoyant Scheduling , 2002, TACAS.

[2]  Maria Grazia Scutellà,et al.  Dual algorithms for the shortest path tree problem , 1996, Networks.

[3]  K. Subramani,et al.  Parametric Scheduling - Algorithms and Complexity , 2001, HiPC.

[4]  Satish Rao,et al.  Planar graphs, negative weight edges, shortest paths, and near linear time , 2001, Proceedings 2001 IEEE International Conference on Cluster Computing.

[5]  I. Anderson,et al.  Graphs and Networks , 1981, The Mathematical Gazette.

[6]  Andrew V. Goldberg,et al.  Scaling algorithms for the shortest paths problem , 1995, SODA '93.

[7]  Kurt Mehlhorn,et al.  LEDA: a platform for combinatorial and geometric computing , 1997, CACM.

[8]  William J. Cook,et al.  Combinatorial optimization , 1997 .

[9]  Kurt Mehlhorn,et al.  The LEDA Platform of Combinatorial and Geometric Computing , 1997, ICALP.

[10]  R. Backhouse,et al.  Regular Algebra Applied to Path-finding Problems , 1975 .

[11]  Kwei-Jay Lin,et al.  Scheduling Real-Time Computations with Separation Constraints , 1992, Inf. Process. Lett..

[12]  Robert E. Tarjan,et al.  A Unified Approach to Path Problems , 1981, JACM.

[13]  Andrew V. Goldberg,et al.  Negative-Cycle Detection Algorithms , 1996, ESA.

[14]  Paul G. Spirakis,et al.  A Very Fast, Practical Algorithm for Finding a Negative Cycle in a Digraph , 1986, ICALP.

[15]  Pavol Návrat Review of "Algorithm design: foundations, analysis and internet examples" by Michael T. Goodrich and Roberto Tamassia. John Wiley & Sons, Inc. 2001. , 2004, SIGA.

[16]  Michael T. Goodrich,et al.  Algorithm Design: Foundations, Analysis, and Internet Examples , 2001 .

[17]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[18]  Ravindra K. Ahuja,et al.  Network Flows: Theory, Algorithms, and Applications , 1993 .

[19]  B. Carré An Algebra for Network Routing Problems , 1971 .

[20]  K. Subramani,et al.  A Specification Framework for Real-Time Scheduling , 2002, SOFSEM.

[21]  U. Pape,et al.  Implementation and efficiency of Moore-algorithms for the shortest route problem , 1974, Math. Program..

[22]  Maria Grazia Scutellà,et al.  Dual Algorithms for the Shortest Path Tree Problem , 1996 .

[23]  Andrew V. Goldberg,et al.  Shortest Path Algorithms: Engineering Aspects , 2001, ISAAC.

[24]  Andrew V. Goldberg,et al.  Shortest paths algorithms: Theory and experimental evaluation , 1994, SODA '94.

[25]  K. Subramani,et al.  Contraction versus Relaxation: A Comparison of Two Approaches for the Negative Cost Cycle Detection Problem , 2003, International Conference on Computational Science.

[26]  Rina Dechter,et al.  Temporal Constraint Networks , 1989, Artif. Intell..

[27]  Swastik Kopparty,et al.  TO PLANAR GRAPHS , 2010 .

[28]  Robert E. Tarjan,et al.  Fast Algorithms for Solving Path Problems , 1981, JACM.

[29]  Jack Edmonds,et al.  An introduction to matching , 1967 .

[30]  Stefano Pallottino,et al.  Shortest-path methods: Complexity, interrelations and new propositions , 1984, Networks.

[31]  A. Goldberg,et al.  A heuristic improvement of the Bellman-Ford algorithm , 1993 .

[32]  Harold N. Gabow,et al.  Data structures for weighted matching and nearest common ancestors with linking , 1990, SODA '90.

[33]  Ingemar J. Cox,et al.  "Ratio regions": a technique for image segmentation , 1996, Proceedings of 13th International Conference on Pattern Recognition.