1

Given a DAG, it has a number of 'source' nodes - nodes whose in-degree is zero. Each source node has a set of nodes reachable from it.

I would like to partition the source nodes into $k$ disjoint partitions, where $k$ is a fixed parameter, such that there is minimal overlap between the reachable nodes of different sets.

If a node is reachable from $x \le k$ partitions, it should count as $x -1$ overlaps.

The context is dividing modules with dependencies between typechecking processes, to minimize duplication of work between processes

Ari Fordsham
  • 123
  • 6

1 Answers1

0

I suppose that all $k$ subsets should be non-empty. (Otherwise all vertices belonging to the same subset is the simplest way to solve the problem optimally.) This problem is $\mathrm{NP}$-hard for arbitrary $k$. Let's reduce minimum $k$-cut problem to this one. The $k$-cut problem is known to be $\mathrm{NP}$-hard for unweighted graph and arbitrary $k$ (i. e., when $k$ is a part of input).

Given an undirected unweighted graph $G = (V, E)$, a $k$-cut in $G$ is a set of edges $E'$ which when deleted, separate the graph into exactly $k$ non-empty components. The minimum $k$-cut problem for unweighted graph is to find a $k$-cut of minimum cardinality.

So given an undirected graph $G$ we build a directed graph $D$ in the following way. Every vertex of the graph $G$ becomes a vertex of the graph $D$. Every edge $\{\,u, v\,\}$ of the graph $G$ becomes a vertex $w$ and two arcs $(u, w)$ and $(v, w)$ in the graph $D$. Now all vertices with non-zero in-degree in $D$ are vertices of $G$. Partitioning these vertices into $k$ disjoint non-empty subsets and counting the number of vertices reachable from two different subsets is the same as partitioning vertices of $G$ into $k$ disjoint non-empty subset and counting number of edges between different subsets. This number of edges is exactly the cardinality of $k$-cut. Therefore as soon as we minimize the number of vertices of $D$ reachable from two different subsets we minimize the cardinality of $k$-cut in $G$. Observation that this reduction is polynomial finishes the proof.

So you have to either find additional properties of the graph structure to have chance for polynomial algorithm or consider exponential-time algorithms (or prove that $\mathrm{P} = \mathrm{NP}$)

Ari Fordsham
  • 123
  • 6
Smylic
  • 1,043
  • 5
  • 15