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

作者:

Highlights:

摘要

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.

论文关键词:

论文评审过程:Available online 9 June 2005.

论文官网地址:https://doi.org/10.1016/j.amc.2005.04.005