Dawg HTML

In computer science and mathematics, a directed acyclic graph, also called a DAG, is a directed graphhttp://en.wikipedia.org/wiki/Graph_(mathematics)#Directed_graph with no directed cycleshttp://en.wikipedia.org/wiki/Cycle_graph#Directed_cycle_graph; that is, for any vertex v, there is no nonempty directed path that starts and ends on v. DAGs appear in models where it doesn't make sense for a vertex to have a path to itself; for example, if an edge u→v indicates that v is a part of u, such a path would indicate that u is a part of itself, which is impossible. Informally speaking, a DAG "flows" in a single direction.

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. Among all such DAGs, the one with the fewest edges is the transitive reduction of each of them and the one with the most is their transitive closure. In particular, the transitive closure is the reachability order.

Terminology

A source is a vertex with no incoming edges, while a sink is a vertex with no outgoing edges. A finite DAG must have at least one source and at least one sink.

The depth of a vertex in a finite DAG is the length of the longest path from a source to that vertex, while its height is the length of the longest path from that vertex to a sink

Applications

Directed acyclic graphs have many important applications in computer science, including:

* Parse trees constructed by compilers
* Bayesian networks
* Reference graphs that can be garbage collected using simple reference counting
* Feedforward neural networks, and other feed-forward controller or classifier topologies
* Reference graphs of purely functional data structures (although some languages allow purely functional cyclic structures)
* Dependency graphs such as those used in instruction scheduling and makefiles
* Dependency graphs between classes formed by inheritance relationships in object-oriented programming languages
* Serializability Theory of Transaction Processing Systems
* Information categorization systems, such as file system directories
* Hierarchical scene graphs to optimise view frustum culling operations
* Forward chained rules systems (including business rules engines) such as the Rete algorithm, used by the rule engine Drools.
* Representing spacetime as a causal set in theoretical physics
* In bioinformatics, finding areas of synteny between two genomes, or representing evolution as phylogenetic networks
* Abstract process descriptions such as workflows and some models of provenance
* A pattern language as a DAG of patterns[3]
* Dynamic programming
* Optical character recognition
Directed acyclic word graph

A directed acyclic word graph (DAWG) is a data structure in computer science similar to a trie but much more space efficient. It is used to represent a set of strings and supports a constant time search operation. The lookup time is proportional to the length of the search string and is the same as an equivalent trie.

A DAWG is defined as a trie where isomorphic subtrees are identified, thus producing an acyclic directed graph instead of a tree structure. Each node in the graph represents a unique substring. Each outgoing edge from one node to the next is labeled with a letter and represents appending that letter to the substring represented by the first node to get the substring represented by the second node. There is one node having zero incoming edges; it represents the empty string. Similarly, the nodes representing entire strings that are not a substring of any other string (this can always be guaranteed by appending an otherwise unused character such as $ to the end of every string) have zero outgoing edges.

The primary difference between DAWG and trie is the elimination of suffix redundancy in storing strings. The trie eliminates prefix redundancy since all common prefixes are shared between strings, such as between doctors and doctorate the doctor prefix is shared. In a DAWG common suffixes are also shared, such as between desertion and desertification both the prefix deserti- and suffix -tion are shared. For dictionary sets of common English words, this translates into major memory usage reduction.

Acyclic deterministic finite automata (ADFA) are deterministic finite automata without cycles. In other words, they can only represent finite sets of strings. They can be used as a data structure for word storage with extremely fast search performance. Minimized ADFA can be very compact as well. The size of a minimized ADFA does not directly depend on the number of keys stored. In fact, after a certain point, as more words are stored in a minimized ADFA, its size can begin to decrease. Its size would actually appear to be related to how complex the set of strings is. A trie is a type of ADFA.

0 comments:

Designed by Posicionamiento Web | Bloggerized by GosuBlogger | Blue Business Blogger