5

An irreducible kernel is the term used in Handbook of Theoretical Computer Science (HTCS), Volume A "Algorithms and Complexity" in the chapter on graph algorithms. Given a directed graph $G=(V,E)$, an irreducible kernel is a graph $G'=(V,E')$ where $E'$ is a subset of $E$, and both $G$ and $G'$ have the same reachability (i.e. their transitive closures are the same), and removing any edge from $E'$ would not satisfy this condition, i.e. $E'$ is minimal (although not necessarily the minimum size possible).

A minimum equivalent graph is similar, except it also has the fewest number of edges among all such graphs. Both of these concepts are similar to a transitive reduction, but not the same because a transitive reduction is allowed to have edges that are not in $E$. That said, [1] proves that for every DAG, it has a unique irreducible kernel, which is also its unique minimum equivalent graph and its unique transitive reduction, and thus there is no benefit in the transitive reduction to using edges not in the original graph (there is a difference between minimum equivalent graph and transitive reduction for some graphs with cycles, but not for DAGs).

HTCS says that there is an algorithm to calculate an irreducible kernel of a directed acyclic graph in $O(V*e)$ time, where $V$ is the number of vertices, and $e$ is the number of edges in the irreducible kernel, i.e. the output of the algorithm. The reference given for this is the following paper, which I have not been able to find an on line source for yet (links or other sources welcome -- I can ask at a research library soon if nothing turns up).

Noltemeier, H., "Reduction of directed graphs to irreducible kernels", Discussion paper 7505, Lehrstuhl f. Mathematische Verfahrensforschung u. Datenverarbeitung (Operations Research & Data Processing), Univ. Göttingen, Gottingen, 1975.

Does anyone know what this algorithm is? It surprises me a little that it includes the number of edges in the output graph, since that would mean it should run in $O(n^2)$ time given an input graph with $O(n^2)$ edges that represents a total order, e.g. all nodes are assigned integers from 1 up to $n$, and there is an edge from node $i$ to $j$ if $i < j$. That doesn't seem impossible, mind you, simply surprising.

[1] Aho, Garey, and Ullman, "The Transitive Reduction of a Directed Graph", 1972 https://epubs.siam.org/doi/10.1137/0201008

andy_fingerhut
  • 218
  • 1
  • 7

1 Answers1

3

I do not know about their algorithm, but the problem is easy to solve in $\mathcal{O}(V \cdot e)$ time. The idea is to just do a DFS from every node to find vertices that can reach it. Normally this takes $\mathcal{O}(E)$ time, but we can use the irreducible kernel we have already built to do it in $\mathcal{O}(e)$ time.

First note that $e \geq n-1$ if the graph is connected. If it is not, solve the connected components individually.

Start by doing topological sort on the vertices, with vertices with indegree zero first. Loop vertices first-to-last. When at vertex $i$, first mark all vertices as unreachable. Then loop vertices from $i-1$ to $1$. At every vertex $j$, if $j$ is unreachable and has an edge to $i$ in the input graph, add the edge $(j, i)$ to the irreducible kernel and mark $j$ reachable. Then if $j$ is reachable, loop all edges $(t, j)$ in our kernel, and mark $t$ reachable.

The topological sort takes $\mathcal{O}(V + E)$ time, and the DFS takes $\mathcal{O}(E + V \cdot e)$ time, so since $e = \mathcal{\Omega}(V)$, the running time is $\mathcal{O}(V \cdot e)$.

The produced DAG has the same reachability as the original graph, as we use a subset of the original edges, and only skip adding the edge $(j, i)$ if $i$ is reachable from $j$ even without it.

Assume some edge $(j, i)$ can be deleted while maintaining reachability. But by the way we did the DFS, $i$ was not reachable from $j$ without the edge (note that any path between them can only visit vertices between them in the topological order). Hence the produced DAG is indeed irreducible.

Antti Röyskö
  • 1,131
  • 7
  • 8