How to attack the NP-Complete dag realization problem in practice
SEA'12 Proceedings of the 11th international conference on Experimental Algorithms
CiE'12 Proceedings of the 8th Turing Centenary conference on Computability in Europe: how the world computes
Hi-index | 0.00 |
We consider the following graph realization problem. Given a sequence S : = (a1 b1),..., (an bn) with ai, bi ∈ Z0+, does there exist an acyclic digraph (a dag, no parallel arcs allowed) G = (V, A) with labeled vertex set V := {v1, . . ., vn} such that for all vi ∈ V indegree and outdegree of vi match exactly the given numbers ai and bi, respectively? The complexity status of this problem is open, while a generalization, the f-factor dag problem can be shown to be NP-complete. In this paper, we prove that an important class of sequences, the so-called opposed sequences, admit an O(n+m) realization algorithm, where n and m = Σi=1n ai = Σi=1n bi denote the number of vertices and arcs, respectively. For an opposed sequence it is possible to order all non-source and non-sink tuples such that ai ≤ ai+1 and bi ≥ bi+1. Our second contribution is a realization algorithm for general sequences which significantly improves upon a naive exponential-time algorithm. We also investigate a special and fast realization strategy "lexmax", which fails in general, but succeeds in more than 97% of all sequences with 9 tuples.