
576 N Negative Cycles in Weighted Digraphs
Open Problems
1. Is there a constant ratio approximation algorithm for
the nni distance on unweighted evolutionary trees or is
the O(log n)-approximation the best possible?
2. Is the linear-cost subtree-transfer distance NP-hard to
compute on weighted evolutionary trees if leaf labels
arenotallowedtobenon-unique?
3. Can one improve the approximation ratio for linear-
cost subtree-transfer distance on weighted evolutionary
trees?
Cross References
Constructing a Galled Phylogenetic Network
Maximum Agreement Subtree (of 2 Binary Trees)
Maximum Agreement Subtree (of 3 or More Trees)
Phylogenetic Tree Construction from a Distance
Matrix
Recommended Reading
1. DasGupta,B.,He,X.,Jiang,T.,Li,M.,Tromp,J.:Onthelinear-
cost subtree-transfer distance. Algorithmica 25(2), 176–195
(1999)
2. DasGupta,B.,He,X.,Jiang,T.,Li,M.,Tromp,J.,Zhang,L.:On
distances between phylogenetic trees, 8th Annual ACM-SIAM
Symposium on Discrete Algorithms, pp. 427–436 (1997)
3. DasGupta, B., He, X., Jiang, T., Li, M., Tromp, J., Wang, L.,
Zhang, L.: Computing Distances between Evolutionary Trees.
In: Du, D.Z., Pardalos, P.M. (eds.) Handbook of Combinatorial
Optimization. Kluwer Academic Publishers, Norwell, 2, 35–76
(1998)
4. DasGupta,B.,He,X.,Jiang,T.,Li,M.,Tromp,J.,Zhang,L.:On
Computing the Nearest Neighbor Interchange Distance. In: Du,
D.Z.,Pardalos,P.M.,Wang,J.(eds.)ProceedingsoftheDIMACS
Workshop on Discrete Problems with Medical Applications, DI-
MACS Series in Discrete Mathematics and Theoretical Com-
puter Science. Am. Math. Soc. 55, 125–143 (2000)
5. Hein, J.: Reconstructing evolution of sequences subject to
recombination using parsimony. Math. Biosci. 98, 185–200
(1990)
6. Hein, J.: A heuristic method to reconstruct the history of se-
quences subject to recombination. J. Mol. Evol. 36, 396–405
(1993)
7. Hein,J.,Jiang,T.,Wang,L.,Zhang,K.:Onthecomplexityof
comparing evolutionary trees. Discret. Appl. Math. 71, 153–
169 (1996)
8. Kuhner, M., Felsenstein, J.: A simulation comparison of phy-
logeny algorithms under equal and unequal evolutionary
rates. Mol. Biol. Evol. 11(3), 459–468 (1994)
9. Moore, G.W., Goodman, M., Barnabas, J.: An iterative approach
from the standpoint of the additive hypothesis to the dendro-
gram problem posed by molecular data sets. J. Theor. Biol. 38,
423–457 (1973)
10. Robinson, D.F.: Comparison of labeled trees with valency three.
J Combinator. Theory Series B 11, 105–119 (1971)
Negative Cycles
in Weighted Digraphs
1994; Kavvadias, Pantziou, Spirakis, Zaroliagis
CHRISTOS ZAROLIAGIS
Computer Engineering & Informatics,
University of Patras, Patras, Greece
Problem Definition
Let G =(V; E)beann-vertex, m-edge directed graph (di-
graph), whose edges are associated with a real-valued cost
function wt : E ! R.Thecost,wt(P), of a path P in G is
the sum of the costs of the edges of P.AsimplepathC
whose starting and ending vertices coincide is called a cy-
cle. If wt(C) < 0, then C is called a negative cycle.Thegoal
of the negative cycle problem is to detect whether there
is such a cycle in a given digraph G with real-valued edge
costs, and if indeed exists to output the cycle.
The negative cycle problem is closely related to the
shortest path problem. In the latter, a minimum cost path
between two vertices s and t is sought. It is easy to see that
an s-t shortest path exists if and only if no s-t path in G
contains a negative cycle [1,13]. It is also well-known that
shortest paths from a given vertex s to all other vertices
form a tree called shortest path tree [1,13].
Key Results
For the case of general digraphs, the best algorithm to
solve the negative cycle problem (or to compute the short-
est path tree, if such a cycle does not exist) is the classi-
cal BellmanFord algorithm that takes O(nm)time(see
e. g., [1]). Alternative methods with the same time com-
plexity are given in [4,7,
12,13]. Moreover, in [11,Chap.7]
an extension of the BellmanFord algorithm is described
which, in addition to detecting and reporting the existing
negative cycles (if any), builds a shortest path tree rooted
a some vertex s reaching those vertices u whose shortest s-
u path does not contain a negative cycle. If edge costs are
integers larger than L (L 2), then a better algorithm
was given in [6]thatrunsinO(m
p
n log L)time,anditis
based on bit scaling.
A simple deterministic algorithm that runs in
O(n
2
log n) expected time with high probability is given
in [10] for a large class of input distributions, where
the edge costs are chosen randomly according to the
endpoint-independent model (this model includes the
common case where all edge costs are chosen indepen-
dently from the same distribution).