Abstract
We study the following fundamental realization problem of directed acyclic graphs (dags). Given a sequence \(S:={a_1 \choose b_1},\dots,{a_n \choose b_n}\) with \(a_i,b_i\in \mathbb{Z}_0^+\), does there exist a dag (no parallel arcs allowed) with labeled vertex set V: = {v 1,…,v n } such that for all v i ∈ V indegree and outdegree of v i match exactly the given numbers a i and b i , respectively? Recently this decision problem has been shown to be NP-complete by Nichterlein [1]. However, we can show that several important classes of sequences are efficiently solvable. In previous work [2], we have proved that yes-instances always have a special kind of topological order which allows us to reduce the number of possible topological orderings in most cases drastically. This leads to an exact exponential-time algorithm which significantly improves upon a straightforward approach. Moreover, a combination of this exponential-time algorithm with a special strategy gives a linear-time algorithm. Interestingly, in systematic experiments we observed that we could solve a huge majority of all instances by the linear-time heuristic. This motivates us to develop characteristics like dag density and “distance to provably easy sequences” which can give us an indicator how easy or difficult a given sequence can be realized.
Furthermore, we propose a randomized algorithm which exploits our structural insight on topological sortings and uses a number of reduction rules. We compare this algorithm with other straightforward randomized algorithms and observe that it clearly outperforms all other variants. Another striking observation is that our simple linear-time algorithm solves a set of real-world instances from different domains, namely ordered binary decision diagrams (OBDDs), train and flight schedules, as well as instances derived from food-web networks without any exception.
Keywords
- Success Probability
- Degree Sequence
- Reduction Rule
- Topological Order
- Binary Decision Diagram
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This work was supported by the DFG Focus Program Algorithm Engineering, grant MU 1482/4-2.
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Nichterlein, A.: Realizing degree sequences for directed acyclic graphs is hard. CoRR abs/1110.1510v1 (2011)
Berger, A., Müller-Hannemann, M.: Dag Realizations of Directed Degree Sequences. In: Owe, O., Steffen, M., Telle, J.A. (eds.) FCT 2011. LNCS, vol. 6914, pp. 264–275. Springer, Heidelberg (2011); full version available as Technical Report 2011/5, Martin-Luther-Universität Halle-Wittenberg, Department of Computer Science
Kleitman, D.J., Wang, D.L.: Algorithms for constructing graphs and digraphs with given valences and factors. Discrete Mathematics 6, 79–88 (1973)
Tutte, W.: The factors of graphs. Canadian J. of Mathematics 4, 314–328 (1952)
Berger, A.: Directed degree sequences. PhD thesis, Department of Computer Science, Martin-Luther-Universität Halle-Wittenberg, urn:nbn:de:gbv:3:4-6768 (2011)
Batagelj, V.: Pajek datasets: Food webs (2004), http://vlado.fmf.uni-lj.si/pub/networks/data/bio/foodweb/foodweb.htm
Durstenfeld, R.: Algorithm 235: Random permutation. Commun. ACM 7, 420 (1964)
Valiant, L.G.: The complexity of computing the permanent. Theoretical Computer Science 8, 189–201 (1979)
Jerrum, M., Sinclair, A., Vigoda, E.: A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. Journal of the ACM 51, 671–697 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Berger, A., Müller-Hannemann, M. (2012). How to Attack the NP-Complete Dag Realization Problem in Practice. In: Klasing, R. (eds) Experimental Algorithms. SEA 2012. Lecture Notes in Computer Science, vol 7276. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30850-5_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-30850-5_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-30849-9
Online ISBN: 978-3-642-30850-5
eBook Packages: Computer ScienceComputer Science (R0)
