

However, higher screen time probably doesn’t cause obesity directly – it is more likely there is an intermediate process (being a reduction in physical activity) that is responsible for weight gain. It might seem reasonable to hypothesize that more screen time may lead to an increased risk of childhood obesity: For example, consider a clinical study with the objective of identifying the relationships between “screen time” and “childhood obesity”. DAGs can be used to identify confounding and sources of bias, which is particularly important in medical and clinical studies.Figure 8: A DAG based distributed ledger. This could enable use cases such as P2P energy trading to become entirely viable, a feat that has so far eluded current blockchains. However, a DAG based distributed ledger (due to its graph structure) can process hundreds of thousands of transactions per second, and do so with far lower transaction costs. For example, the Bitcoin blockchain (which uses a linear sequence of blocks) only manages to process 4 to 7 transactions per second, which is simply not viable for wide scale adoption. Despite the hype, distributed ledgers such as “blockchain” have failed to be widely adopted, due in large part to their poor scalability, low speed and high transaction costs. A promising application of DAGs is in the development of faster and cheaper distributed ledgers.For instance, in Spark, DAGs are used to represent a chain of Resilient Distributed Dataset (RDD) dependencies:įigure 6: A job process within Spark using DAGs For example, DAGs are used in popular projects such as Apache Airflow (a workflow management system originally developed by Airbnb) and in Apache Spark.

DAGs are used in project management to plan, design, and implement complex projects or tasks.A number of use-cases deserve specific mention:

In fact, DAGs are far more ubiquitous than you might imagine, being not only a critical data structure in mathematics, statistics and data science, but they appear almost everywhere and in some unexpected places. This topological ordering property, as well as other key properties, make DAGs very efficient at a number of tasks (such as finding the shortest path from one node to another) and are the reason DAGs have a wide range of use-cases. For example, a topological ordering of the DAG from Figure 4 could look like this: Figure 5: A topological ordering Key applications of DAGsĪ key property of DAGs is that they have what is known as a “topological ordering”, which means that the nodes of a DAG can be put into a linear sequence with the nodes given an “ordering”, specifically nodes at the beginning of the sequence have a “lower value” than nodes at the end of the sequence. Putting these concepts together, a DAG is a graph in which all the edges are directed, such that it is impossible to find a node and follow a sequence of edges that eventually loops back to the same node. By reversing the direction of the relationship between nodes B and E in Figure 3 we obtain an acyclic graph as it is not possible to start at node B (or any other node for that matter) and return to it by following a directed sequence of edges. Figure 3: A cyclic graphĪn “acyclic graph” is a graph in which it is not possible to find at least one cyclic path. The graph in Figure 3 is cyclic, as we can start at Node B, go to nodes C, D and E and return to B. Iii) A “cyclic graph” is a graph in which it is possible to find at least one node, and by following a sequence of directed edges eventually return to the same node. Directed graphs are very important as they can be used to represent asymmetrical relationships, as opposed to symmetrical relationships that exist in undirected graphs.įor example, a directed graph can be used to represent a particular website, where sites or web-pages are nodes and the edges are the hyperlinks from one page to another. Ii) A “directed graph” is one in which the edges have a direction, represented by adding an arrow to the edge to show the direction of the relationship. An edge between two nodes only exists if there is a relationship (of some sort) between them.įor example, a graph might look something like this: Figure 1: The Franklin Graph
