Inverse problem: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Ntsaousis
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[File:Directed acyclic graph 3.svg|right|frame|An example of a directed acyclic graph]]
My name is Lynette Spitzer. I life in Curitiba (Brazil).<br><br>My web page; [http://hemorrhoidtreatmentfix.com/hemorrhoid-relief hemorrhoid relief]
In [[mathematics]] and [[computer science]], a '''directed acyclic graph''' ('''DAG''' {{IPAc-en|audio=en-us-DAG.ogg|ˈ|d|æ|g}}), is a [[directed graph]] with no [[Cycle_graph#Directed_cycle_graph|directed cycles]]. That is, it is formed by a collection of [[Vertex (graph theory)|vertices]] and [[edge (graph theory)|directed edges]], each edge connecting one vertex to another, such that there is no way to start at some vertex ''v'' and follow a sequence of edges that eventually loops back to ''v'' again.<ref>{{citation|title=Graph theory: an algorithmic approach|first=Nicos|last=Christofides|publisher=Academic Press|year=1975|pages=170–174}}.</ref><ref>{{citation|title=Graphs: Theory and Algorithms|first1=K.|last1=Thulasiraman|first2=M. N. S.|last2=Swamy|publisher=John Wiley and Son|year=1992|isbn=978-0-471-51356-8|contribution=5.7 Acyclic Directed Graphs|page=118}}.</ref><ref>{{citation|title=Digraphs: Theory, Algorithms and Applications|first=Jørgen|last=Bang-Jensen|series=Springer Monographs in Mathematics|edition=2nd|publisher=Springer-Verlag|year=2008|isbn=978-1-84800-997-4|contribution=2.1 Acyclic Digraphs|pages=32–34}}.</ref>
 
DAGs may be used to model many different kinds of information. A collection of tasks that must be ordered into a sequence, subject to constraints that certain tasks must be performed earlier than others, may be represented as a DAG with a vertex for each task and an edge for each constraint; algorithms for [[topological ordering]] may be used to generate a valid sequence. DAGs may also be used to model processes in which data flows in a consistent direction through a network of processors. The [[reachability]] relation in a DAG forms a [[partial order]], and any [[finite partial order]] may be represented by a DAG using reachability. Additionally, DAGs may be used as a space-efficient representation of a collection of sequences with overlapping subsequences.
 
The corresponding concept for [[undirected graph]]s is a [[forest (graph theory)|forest]], an undirected graph without cycles. Choosing an orientation for a forest produces a special kind of directed acyclic graph called a [[polytree]]. However there are many other kinds of directed acyclic graph that are not formed by orienting the edges of an undirected acyclic graph, and every undirected graph has an [[acyclic orientation]], an assignment of a direction for its edges that makes it into a directed acyclic graph.  For this reason it may be more accurate to call directed acyclic graphs '''acyclic directed graphs''' or '''acyclic digraphs'''.
 
==Partial orders and topological ordering==
[[Image:Hasse diagram of powerset of 3.svg|thumb|300px|A [[Hasse diagram]] representing the partial order ⊆ among the subsets of a three-element set.]]
Each directed acyclic graph gives rise to a [[partial order]] ≤ on its vertices, where ''u'' ≤ ''v'' exactly when there exists a directed path from ''u'' to ''v'' in the DAG. However, many different DAGs may give rise to this same [[reachability]] relation: for example, the DAG with two edges ''a'' → ''b'' and ''b'' → ''c'' has the same reachability as the graph with three edges ''a'' → ''b'', ''b'' → ''c'', and ''a'' → ''c''. If ''G'' is a DAG, its [[transitive reduction]] is the graph with the fewest edges that represents the same reachability as ''G'', and its [[transitive closure]] is the graph with the most edges that represents the same reachability.
 
The transitive closure of ''G'' has an edge ''u'' → ''v'' for every related pair ''u''&nbsp;≤&nbsp;''v'' of distinct elements in the reachability relation of ''G'', and may therefore be thought of as a direct translation of the reachability relation ≤ into graph-theoretic terms: every partially ordered set may be translated into a DAG in this way. If a DAG ''G'' represents a partial order ≤, then the transitive reduction of ''G'' is a subgraph of ''G'' with an edge ''u'' → ''v'' for every pair in the [[covering relation]] of ≤; transitive reductions are useful in visualizing the partial orders they represent, because they have fewer edges than other graphs representing the same orders and therefore lead to simpler [[graph drawing]]s. A [[Hasse diagram]] of a partial order is a drawing of the transitive reduction in which the orientation of each edge is shown by placing the starting vertex of the edge in a lower position than its ending vertex.
 
Every directed acyclic graph has a [[topological ordering]], an ordering of the vertices such that the starting endpoint of every edge occurs earlier in the ordering than the ending endpoint of the edge. In general, this ordering is not unique; a DAG has a unique topological ordering if and only if it has a directed path containing all the vertices, in which case the ordering is the same as the order in which the vertices appear in the path. The family of topological orderings of a DAG is the same as the family of [[linear extension]]s of the reachability relation for the DAG, so any two graphs representing the same partial order have the same set of topological orders. [[Topological sorting]] is the algorithmic problem of finding topological orderings; it can be solved in linear time. It is also possible to check whether a given directed graph is a DAG in linear time, by attempting to find a topological ordering and then testing whether the resulting ordering is valid.
 
Some algorithms become simpler when used on DAGs instead of general graphs, based on the principle of topological ordering. For example, it is possible to find [[shortest path]]s and [[longest path problem|longest paths]] from a given starting vertex in DAGs in linear time by processing the vertices in a topological order, and calculating the path length for each vertex to be the minimum or maximum length obtained via any of its incoming edges.
In contrast, for arbitrary graphs the shortest path may require slower algorithms such as [[Dijkstra's algorithm]] or the [[Bellman–Ford algorithm]], and longest paths in arbitrary graphs are [[NP-hard]] to find.
 
DAG representations of partial orderings have many applications in [[Job Shop Scheduling|scheduling problems]] for systems of tasks with ordering constraints. For instance, a DAG may be used to describe the dependencies between cells of a [[spreadsheet]]: if one cell is computed by a formula involving the value of a second cell, draw a DAG edge from the second cell to the first one. If the input values to the spreadsheet change, all of the remaining values of the spreadsheet may be recomputed with a single evaluation per cell, by topologically ordering the cells and re-evaluating each cell in this order. Similar problems of task ordering arise in [[makefile]]s for program compilation, [[instruction scheduling]] for low-level computer program optimization, and [[Program Evaluation and Review Technique|PERT scheduling]] for management of large human projects. [[Dependency graph]]s without circular dependencies form directed acyclic graphs.
 
==Data processing networks==
A directed graph may be used to represent a network of processing elements; in this formulation, data enters a processing element through its incoming edges and leaves the element through its outgoing edges. Examples of this include the following:
*In electronic circuit design, a [[combinational logic]] circuit is an acyclic system of [[logic gate]]s that computes a function of an input, where the input and output of the function are represented as individual [[bit]]s.
*[[Dataflow]] programming languages describe systems of values that are related to each other by a directed acyclic graph. When one value changes, its successors are recalculated; each value is evaluated as a function of its predecessors in the DAG.
*In [[compiler]]s, straight line code (that is, sequences of statements without loops or conditional branches) may be represented by a DAG describing the inputs and outputs of each of the arithmetic operations performed within the code; this representation allows the compiler to perform [[common subexpression elimination]] efficiently.
*In most [[spreadsheet]] systems, the [[dependency graph]] that connects one cell to another if the first cell stores a formula that uses the value in the second cell must be a directed acyclic graph. Cycles of dependencies are disallowed because they cause the cells involved in the cycle to not have a well-defined value. Additionally, requiring the dependencies to be acyclic allows a [[topological order]] to be used to schedule the recalculations of cell values when the spreadsheet is changed.
 
==Causal and temporal structures==
Graphs that have vertices representing events, and edges representing [[causality|causal relation]]s between events, are often acyclic – arranging the vertices in linear order of time, all arrows point in the same direction as time, from parent to child (due to causality affecting the future, not the past), and thus have no loops.
 
For instance, a [[Bayesian network]] represents a system of probabilistic events as nodes in a directed acyclic graph, in which the likelihood of an event may be calculated from the likelihoods of its predecessors in the DAG. In this context, the [[moral graph]] of a DAG is the undirected graph created by adding an (undirected) edge between all parents of the same node (sometimes called ''marrying''), and then replacing all directed edges by undirected edges.
 
Another type of graph with a similar causal structure is an [[influence diagram]], the nodes of which represent either decisions to be made or unknown information, and the edges of which represent causal influences from one node to another. In [[epidemiology]], for instance, these diagrams are often used to estimate the expected value of different choices for intervention.
 
[[Family tree]]s may also be seen as directed acyclic graphs, with a vertex for each family member and an edge for each parent-child relationship. Despite the name, these graphs are not necessarily trees – the graphs of [[matrilineal]] descent ("mother" relationships between women) and [[patrilineal]] descent ("father" relationships between men) are trees however – because of the possibility of marriages between distant relatives (so a child has a common ancestor on both the mother's and father's side). However, the time ordering of births (a parent's birthday is always prior to their child's birthday) causes these graphs to be acyclic. For the same reason, the version history of a [[distributed revision control]] system generally has the structure of a directed acyclic graph, in which there is a vertex for each revision and an edge connecting pairs of revisions that were directly derived from each other; these are not trees in general due to merges.
 
==Paths with shared structure==
A third type of application of directed acyclic graphs arises in representing a set of [[sequence]]s as [[path (graph theory)|paths]] in a graph. For example, the [[directed acyclic word graph]] is a [[data structure]] in computer science formed by a directed acyclic graph with a single source and with edges labeled by letters or symbols; the paths from the source to the sinks in this graph represent a set of [[String (computer science)|strings]], such as English words.
Any set of sequences can be represented as paths in a tree, by forming a tree node for every prefix of a sequence and making the parent of one of these nodes represent the sequence with one fewer element; the tree formed in this way for a set of strings is called a [[trie]]. A directed acyclic word graph saves space over a trie by allowing paths to diverge and rejoin, so that a set of words with the same possible suffixes can be represented by a single tree node.
 
The same idea of using a DAG to represent a family of paths occurs in the [[binary decision diagram]],<ref>{{citation|first=C. Y.|last=Lee|title=Representation of switching circuits by binary-decision programs|journal=Bell Systems Technical Journal|volume=38|pages=985–999|year=1959}}.</ref><ref>{{citation|first=Sheldon B.|last=Akers|doi=10.1109/TC.1978.1675141|title=Binary decision diagrams|journal=IEEE Transactions on Computers|volume=C-27|issue=6|pages=509–516|year=1978}}.</ref> a DAG-based data structure for representing binary functions. In a binary decision diagram, each non-sink vertex is labeled by the name of a binary variable, and each sink and each edge is labeled by a 0 or 1. The function value for any [[truth assignment]] to the variables is the value at the sink found by following a path, starting from the single source vertex, that at each non-sink vertex follows the outgoing edge labeled with the value of that vertex's variable. Just as directed acyclic word graphs can be viewed as a compressed form of tries, binary decision diagrams can be viewed as compressed forms of [[decision tree]]s that save space by allowing paths to rejoin when they agree on the results of all remaining decisions.
 
In many [[randomization|randomized]] [[algorithm]]s in [[computational geometry]], the algorithm maintains a ''history DAG'' representing features of some geometric construction that have been replaced by later finer-scale features; [[point location]] queries may be answered, as for the above two data structures, by following paths in this DAG.
 
==Relation to other kinds of graphs==
A [[polytree]] is a directed graph formed by orienting the edges of a [[tree (graph theory)|free tree]]. Every polytree is a DAG. In particular, this is true of the [[Arborescence (graph theory)|arborescence]]s formed by directing all edges outwards from the root of a tree. A [[multitree]] (also called a strongly ambiguous graph or a mangrove) is a directed graph in which there is at most one directed path (in either direction) between any two nodes; equivalently, it is a DAG in which, for every node ''v'', the set of nodes reachable from ''v'' forms a tree.
 
Any undirected graph may be made into a DAG by choosing a [[total order]] for its vertices and orienting every edge from the earlier endpoint in the order to the later endpoint. However, different total orders may lead to the same [[acyclic orientation]]. The number of acyclic orientations is equal to |χ(−1)|, where χ is the [[chromatic polynomial]] of the given graph.<ref>{{citation|first=Richard P.|last=Stanley|authorlink=Richard P. Stanley|title=Acyclic orientations of graphs|journal=Discrete Mathematics|volume=5|issue=2 |pages=171–178|year= 1973|doi=10.1016/0012-365X(73)90108-8}}.</ref>
 
Any directed graph may be made into a DAG by removing a [[feedback vertex set]] or a [[feedback arc set]]. However, the smallest such set is [[NP-hard]] to find. An arbitrary directed graph may also be transformed into a DAG, called its [[condensation (graph theory)|condensation]], by contracting each of its [[strongly connected component]]s into a single supervertex.<ref>{{citation|title=Structural Models: An Introduction to the Theory of Directed Graphs|last1=Harary|first1=Frank|author1-link=Frank Harary|last2=Norman|first2=Robert Z.|last3=Cartwright|first3=Dorwin|publisher=John Wiley & Sons|year=1965|page=63}}.</ref> When the graph is already acyclic, its smallest feedback vertex sets and feedback arc sets are [[empty set|empty]], and its condensation is the graph itself.
 
==Enumeration==
The [[graph enumeration]] problem of counting directed acyclic graphs was studied by {{harvtxt|Robinson|1973}}.<ref name="enum">{{citation|first=R. W.|last=Robinson|contribution=Counting labeled acyclic digraphs|pages=239–273|editor-first=F.|editor-last=Harary|editor-link=Frank Harary|title=New Directions in the Theory of Graphs|publisher=Academic Press|year=1973}}. See also {{citation
|last1 = Harary | first1 = Frank | author1-link = Frank Harary | first2 = Edgar M. | last2 = Palmer | year =  1973| title = Graphical Enumeration  | publisher = [[Academic Press]] | isbn = 0-12-324245-2 | page=19}}.</ref>
The number of DAGs on ''n'' labeled nodes, for ''n''&nbsp;=&nbsp;0, 1, 2, 3, ..., is
:1, 1, 3, 25, 543, 29281, 3781503, ... {{OEIS|id=A003024}}.
These numbers may be computed by the [[recurrence relation]]
:<math>a_n = \sum_{k=1}^n (-1)^{k-1} {n\choose k}2^{k(n-k)} a_{n-k}.</math><ref name="enum"/>
[[Eric W. Weisstein]] conjectured,<ref>{{MathWorld | urlname=WeissteinsConjecture | title=Weisstein's Conjecture}}</ref> and {{harvtxt|McKay|Royle|Wanless|Oggier|2004}} proved,<ref>{{citation|last1=McKay|first1=B. D.|author1-link=Brendan McKay|last2=Royle|first2=G. F.|author2-link=Gordon Royle|last3=Wanless|first3=I. M.|last4=Oggier|first4=F. E.|last5=Sloane|first5=N. J. A.|author5-link=Neil J. A. Sloane|last6=Wilf|first6=H.|author6-link=Herbert Wilf|title=Acyclic digraphs and eigenvalues of (0,1)-matrices|journal=Journal of Integer Sequences|volume=7|year=2004|url=http://www.cs.uwaterloo.ca/journals/JIS/VOL7/Sloane/sloane15.html}}, Article 04.3.3.</ref> that the same numbers count the [[(0,1) matrix|(0,1) matrices]] in which all [[eigenvalue]]s are positive [[real number]]s. The proof is [[bijective proof|bijective]]: a matrix ''A'' is an [[adjacency matrix]] of a DAG if and only if ''A''&nbsp;+&nbsp;''I'' is a (0,1) matrix with all eigenvalues positive, where ''I'' denotes the identity matrix. Note that a DAG adjacency matrix must have a zero diagonal, otherwise one or more vertices have arcs to themselves.
 
== References ==
{{reflist}}
 
== External links ==
* {{MathWorld | urlname=AcyclicDigraph | title=Acyclic Digraph}}
 
{{DEFAULTSORT:Directed Acyclic Graph}}
[[Category:Directed graphs]]
 
[[de:Gerichteter azyklischer Graph]]
[[fr:Graphe acyclique orienté]]

Latest revision as of 16:04, 11 January 2015

My name is Lynette Spitzer. I life in Curitiba (Brazil).

My web page; hemorrhoid relief