Computational problems Directed acyclic graph




1 computational problems

1.1 topological sorting , recognition
1.2 construction cyclic graphs
1.3 transitive closure , transitive reduction
1.4 closure problem
1.5 path algorithms





computational problems
topological sorting , recognition

topological sorting algorithmic problem of finding topological ordering of given dag. can solved in linear time. kahn s algorithm topological sorting builds vertex ordering directly. maintains list of vertices have no incoming edges other vertices have not been included in partially constructed topological ordering; list consists of vertices no incoming edges @ all. then, repeatedly adds 1 vertex list end of partially constructed topological ordering, , checks whether neighbors should added list. algorithm terminates when vertices have been processed in way. alternatively, topological ordering may constructed reversing postorder numbering of depth-first search graph traversal.


it possible check whether given directed graph dag in linear time, either attempting find topological ordering , testing each edge whether resulting ordering valid or alternatively, topological sorting algorithms, verifying algorithm orders vertices without meeting error condition.


construction cyclic graphs

any undirected graph may made dag choosing total order vertices , directing every edge earlier endpoint in order later endpoint. resulting orientation of edges called acyclic orientation. different total orders may lead same acyclic orientation, n-vertex graph can have fewer n! acyclic orientations. number of acyclic orientations equal |χ(−1)|, χ chromatic polynomial of given graph.



the yellow directed acyclic graph condensation of blue directed graph. formed contracting each connected component of blue graph single yellow vertex.


any directed graph may made dag removing feedback vertex set or feedback arc set, set of vertices or edges (respectively) touches cycles. however, smallest such set np-hard find. arbitrary directed graph may transformed dag, called condensation, contracting each of connected components single supervertex. when graph acyclic, smallest feedback vertex sets , feedback arc sets empty, , condensation graph itself.


transitive closure , transitive reduction

the transitive closure of given dag, n vertices , m edges, may constructed in time o(mn) using either breadth-first search or depth-first search test reachability each vertex. alternatively, can solved in time o(n) ω < 2.373 exponent fast matrix multiplication algorithms; theoretical improvement on o(mn) bound dense graphs.


in of these transitive closure algorithms, possible distinguish pairs of vertices reachable @ least 1 path of length 2 or more pairs can connected length-one path. transitive reduction consists of edges form length-one paths paths connecting endpoints. therefore, transitive reduction can constructed in same asymptotic time bounds transitive closure.


closure problem

the closure problem takes input directed acyclic graph weights on vertices , seeks minimum (or maximum) weight of closure, set of vertices no outgoing edges. (the problem may formulated directed graphs without assumption of acyclicity, no greater generality, because in case equivalent same problem on condensation of graph.) may solved in polynomial time using reduction maximum flow problem.


path algorithms

some algorithms become simpler when used on dags instead of general graphs, based on principle of topological ordering. example, possible find shortest paths , longest paths given starting vertex in dags in linear time processing vertices in topological order, , calculating path length each vertex minimum or maximum length obtained via of incoming edges. in contrast, arbitrary graphs shortest path may require slower algorithms such dijkstra s algorithm or bellman–ford algorithm, , longest paths in arbitrary graphs np-hard find.








Comments

Popular posts from this blog

Memorial Series Board Lutfuddaulah Oriental Research Institute

Weak verbs Proto-Germanic grammar

History Anthrax