Minimum mean weight cycle

Last updated

In graph theory, a minimum mean weight cycle is a cycle whose average weight (total weight divided by length) is smallest among all cycles in the graph. [1] An analogous problem is the maximum mean weight cycle. These problems have applications to embedded systems [2] and logic chip design. [3]

Contents

Definitions

Let G = (V,E) be a directed graph in which each edge has a weight (positive or negative). The weight of any path or cycle p = (e1,...,ek), is the sum of weights of the edges: w(p) = w(e1) + ... + w(ek). The mean weight of p is the weight of p divided by the number of edges in it: w(p)/len(p).[ citation needed ]

The minimum cycle mean weight in G is the minimum, over all directed cycles p in G, of w(p)/len(p). A minimum mean weight cycle is any cycle with the minimum mean weight.[ citation needed ]

Algorithms

Lawler presented an algorithm for computing a minimum mean weight cycle using O(log |V|) calls to an algorithm for solving the negative cycle problem. [4] There exists such an algorithm that runs in time O(|V||E|), so the total runtime of Lawler's algorithm is O(|E||V|log |V|).

Karp's algorithm

Karp [1] presented a characterization of the minimum cycle mean weight, and presented an algorithm that runs in time O(|V||E|). An analogous algorithm can be used for finding a maximum mean weight cycle.

Let G be any directed graph, and let s be a fixed vertex in G. For every nonnegative integer k and every vertex v in G, define Hk(v) as the maximum cost of a path of length k from s to v; if no such path exists, then Hk(v) = minus infinity.

The main lemma says that the maximum mean cycle weight of G equals

(*)

Proof. It is sufficient to prove the lemma for the case in which the maximum mean cycle weight equals 0. This is because adding a constant weight to each edge adds the same constant both to the maximum mean cycle cost and to the expression in (*).

Suppose the maximum mean cycle weight is 0. Then there is a cycle with cost exactly 0, but no cycles with a positive cost.

We first prove that (*) is at most 0. As G has no positive-cost cycles, for every node v, there is a maximum-cost path of length smaller than n from s to v. Let kv be the length of this maximum-cost path. Then Hkv(v) >= Hn(v), so the expression inside the min in (*) is at most 0 when k = kv. As kv <= n-1, the minimum in (*) is at most 0. As this holds for every node v, the maximum in (*) is at most 0 too.

We now prove that (*) is at least 0. G has a zero-cost cycle; let w be some node in that cycle. Let P0 be a maximum-cost path from s to w. For every t >= 1, let Pt be a concatenation of P0 with t copies of the cycle; as the cost of Pt equals the cost of P0, it is also a maximum-cost path from s to w.  Every prefix of a maximum-cost path is also a maximum-cost path from s to its endpoint. When t is sufficiently large, Pt has a prefix of length n; it is a maximum-cost path from s to some node w'. Then Hn(w') >= Hk(w') for all k, so the expression inside the min in (*) is at least 0 for all k, so the minimum in (*) is at least 0. Taking v=w' in the maximum shows that the maximum in (*) is at least 0 too.

Therefore, when the maximum mean cycle cost is 0, (*) equals 0, which is sufficient to complete the proof.

It is possible to compute Hk using dynamic programming in time O(|E||V|); then it is possible to find the maximum mean cycle weight using (*). The cycle itself can be found as follows:

Chaturvedi and McConnell [5] identified an error in Karp's algorithm for constructing a cycle attaining the minimum mean weight. They presented a corrected algorithm.

Newer algorithms

Dasdan and Gupta study maximum mean weight cycle, and present an algorithm that is provably always faster than Karp's algorithm. [2]

Albrecht, Korte, Schietke and Vygen [3] relate the problem of maximum mean weight cycle to the minimum balance problem: find a potential function [ disambiguation needed ] such that the "slacks" of all edges are optimally balanced. Both problems can be solved by a parametric shortest path algorithm. They show that parametric shortest path can be used for solving more general variants of these problems, with constraints that are relevant to optimizing the clock schedule of a logic chip.

See also

Related Research Articles

<span class="mw-page-title-main">Travelling salesman problem</span> NP-hard problem in combinatorial optimization

In the theory of computational complexity, the travelling salesman problem (TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" It is an NP-hard problem in combinatorial optimization, important in theoretical computer science and operations research.

<span class="mw-page-title-main">Minimum spanning tree</span> Least-weight tree connecting graph vertices

A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. That is, it is a spanning tree whose sum of edge weights is as small as possible. More generally, any edge-weighted undirected graph has a minimum spanning forest, which is a union of the minimum spanning trees for its connected components.

<span class="mw-page-title-main">Shortest path problem</span> Computational problem of graph theory

In graph theory, the shortest path problem is the problem of finding a path between two vertices in a graph such that the sum of the weights of its constituent edges is minimized.

<span class="mw-page-title-main">Dijkstra's algorithm</span> Algorithm for finding shortest paths

Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a weighted graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.

<span class="mw-page-title-main">Bellman–Ford algorithm</span> Algorithm for finding the shortest paths in graphs

The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers. The algorithm was first proposed by Alfonso Shimbel, but is instead named after Richard Bellman and Lester Ford Jr., who published it in 1958 and 1956, respectively. Edward F. Moore also published a variation of the algorithm in 1959, and for this reason it is also sometimes called the Bellman–Ford–Moore algorithm.

In computer science, the Floyd–Warshall algorithm is an algorithm for finding shortest paths in a directed weighted graph with positive or negative edge weights. A single execution of the algorithm will find the lengths of shortest paths between all pairs of vertices. Although it does not return details of the paths themselves, it is possible to reconstruct the paths with simple modifications to the algorithm. Versions of the algorithm can also be used for finding the transitive closure of a relation , or widest paths between all pairs of vertices in a weighted graph.

In computer science, the Edmonds–Karp algorithm is an implementation of the Ford–Fulkerson method for computing the maximum flow in a flow network in time. The algorithm was first published by Yefim Dinitz in 1970, and independently published by Jack Edmonds and Richard Karp in 1972. Dinitz's algorithm includes additional techniques that reduce the running time to .

<span class="mw-page-title-main">Maximum flow problem</span> Computational problem in graph theory

In optimization theory, maximum flow problems involve finding a feasible flow through a flow network that obtains the maximum possible flow rate.

The Bottleneck traveling salesman problem is a problem in discrete or combinatorial optimization. The problem is to find the Hamiltonian cycle in a weighted graph which minimizes the weight of the highest-weight edge of the cycle. It was first formulated by Gilmore & Gomory (1964) with some additional constraints, and in its full generality by Garfinkel & Gilbert (1978).

<span class="mw-page-title-main">Steiner tree problem</span> On short connecting networks with added vertices

In combinatorial mathematics, the Steiner tree problem, or minimum Steiner tree problem, named after Jakob Steiner, is an umbrella term for a class of problems in combinatorial optimization. While Steiner tree problems may be formulated in a number of settings, they all require an optimal interconnect for a given set of objects and a predefined objective function. One well-known variant, which is often used synonymously with the term Steiner tree problem, is the Steiner tree problem in graphs. Given an undirected graph with non-negative edge weights and a subset of vertices, usually referred to as terminals, the Steiner tree problem in graphs requires a tree of minimum weight that contains all terminals and minimizes the total weight of its edges. Further well-known variants are the Euclidean Steiner tree problem and the rectilinear minimum Steiner tree problem.

In the mathematical discipline of graph theory, a matching or independent edge set in an undirected graph is a set of edges without common vertices. In other words, a subset of the edges is a matching if each vertex appears in at most one edge of that matching. Finding a matching in a bipartite graph can be treated as a network flow problem.

<span class="mw-page-title-main">Flow network</span> Directed graph where edges have a capacity

In graph theory, a flow network is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations research, a directed graph is called a network, the vertices are called nodes and the edges are called arcs. A flow must satisfy the restriction that the amount of flow into a node equals the amount of flow out of it, unless it is a source, which has only outgoing flow, or sink, which has only incoming flow. A network can be used to model traffic in a computer network, circulation with demands, fluids in pipes, currents in an electrical circuit, or anything similar in which something travels through a network of nodes.

In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u,v) from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. Precisely, a topological sort is a graph traversal in which each node v is visited only after all its dependencies are visited. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. Topological sorting has many applications, especially in ranking problems such as feedback arc set. Topological sorting is also possible when the DAG has disconnected components.

Johnson's algorithm is a way to find the shortest paths between all pairs of vertices in an edge-weighted directed graph. It allows some of the edge weights to be negative numbers, but no negative-weight cycles may exist. It works by using the Bellman–Ford algorithm to compute a transformation of the input graph that removes all negative weights, allowing Dijkstra's algorithm to be used on the transformed graph. It is named after Donald B. Johnson, who first published the technique in 1977.

In graph theory, a cut is a partition of the vertices of a graph into two disjoint subsets. Any cut determines a cut-set, the set of edges that have one endpoint in each subset of the partition. These edges are said to cross the cut. In a connected graph, each cut-set determines a unique cut, and in some cases cuts are identified with their cut-sets rather than with their vertex partitions.

The minimum-cost flow problem (MCFP) is an optimization and decision problem to find the cheapest possible way of sending a certain amount of flow through a flow network. A typical application of this problem involves finding the best delivery route from a factory to a warehouse where the road network has some capacity and cost associated. The minimum cost flow problem is one of the most fundamental among all flow and circulation problems because most other such problems can be cast as a minimum cost flow problem and also that it can be solved efficiently using the network simplex algorithm.

The circulation problem and its variants are a generalisation of network flow problems, with the added constraint of a lower bound on edge flows, and with flow conservation also being required for the source and sink. In variants of the problem, there are multiple commodities flowing through the network, and a cost on the flow.

Capacitated minimum spanning tree is a minimal cost spanning tree of a graph that has a designated root node and satisfies the capacity constraint . The capacity constraint ensures that all subtrees incident on the root node have no more than nodes. If the tree nodes have weights, then the capacity constraint may be interpreted as follows: the sum of weights in any subtree should be no greater than . The edges connecting the subgraphs to the root node are called gates. Finding the optimal solution is NP-hard.

In theoretical computer science and network routing, Suurballe's algorithm is an algorithm for finding two disjoint paths in a nonnegatively-weighted directed graph, so that both paths connect the same pair of vertices and have minimum total length. The algorithm was conceived by John W. Suurballe and published in 1974. The main idea of Suurballe's algorithm is to use Dijkstra's algorithm to find one path, to modify the weights of the graph edges, and then to run Dijkstra's algorithm a second time. The output of the algorithm is formed by combining these two paths, discarding edges that are traversed in opposite directions by the paths, and using the remaining edges to form the two paths to return as the output. The modification to the weights is similar to the weight modification in Johnson's algorithm, and preserves the non-negativity of the weights while allowing the second instance of Dijkstra's algorithm to find the correct second path.

In mathematics, a minimum bottleneck spanning tree (MBST) in an undirected graph is a spanning tree in which the most expensive edge is as cheap as possible. A bottleneck edge is the highest weighted edge in a spanning tree. A spanning tree is a minimum bottleneck spanning tree if the graph does not contain a spanning tree with a smaller bottleneck edge weight. For a directed graph, a similar problem is known as Minimum Bottleneck Spanning Arborescence (MBSA).

References

  1. 1 2 Karp, Richard M. (1978-01-01). "A characterization of the minimum cycle mean in a digraph". Discrete Mathematics. 23 (3): 309–311. doi:10.1016/0012-365X(78)90011-0. ISSN   0012-365X.
  2. 1 2 Dasdan, A.; Gupta, R.K. (1998). "Faster maximum and minimum mean cycle algorithms for system-performance analysis". IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems. 17 (10): 889–899. doi:10.1109/43.728912.
  3. 1 2 Albrecht, Christoph; Korte, Bernhard; Schietke, Jürgen; Vygen, Jens (2002-11-15). "Maximum mean weight cycle in a digraph and minimizing cycle time of a logic chip". Discrete Applied Mathematics. 123 (1): 103–127. doi:10.1016/S0166-218X(01)00339-0. ISSN   0166-218X.
  4. v. Golitschek, M. (1982-02-01). "Optimal cycles in doubly weighted graphs and approximation of bivariate functions by univariate ones". Numerische Mathematik. 39 (1): 65–84. doi:10.1007/BF01399312. ISSN   0945-3245.
  5. Chaturvedi, Mmanu; McConnell, Ross M. (2017-11-01). "A note on finding minimum mean cycle". Information Processing Letters. 127: 21–22. doi:10.1016/j.ipl.2017.06.007. ISSN   0020-0190.