dag圖

dag圖

dag圖,信息技術術語,DAG數據結構跟蹤基本塊中值和變數的計算和賦值 ;塊中使用的來自別處的值表示為葉子結點 ;值上的操作表示為內部結點 ;新值的賦值表示為將目標變數或臨時變數的名字附加到表示賦值的結點上。

基本介紹

術語簡介
DAG圖:無迴路有向圖(Directed Acyclic Graph)
DAG 上的問題
SPOJ 4882 Counting in a DAG
點帶權DAG 求每個點能到達的點集權值之和(包括自己)
編譯原理中的DAG:
基本塊的有向無環圖(DGA):
拓展:基本塊劃分,主要依據流圖構造,就是按照if,while等跳轉時需要的lab位置劃分。例如:
label L2t2=fact*xfact=t2t3=x-1x=t3t4=x==0if_false t4 goto L2
其DAG為:
在數學和計算機科學的,有向無環圖(DAG,/ˈdaelig; ɡ/), is a directed graphwith no directed cycles. 是一個有向圖,無定向的周期。That is, it is formed by a collection of vertices and 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. [ 1 ][ 2 ][ 3 ]也就是說,它是由集合的頂點和有向邊構成,每條邊連線一個頂點到另一個,這樣,在一些頂點v開始,沿著有序的邊,最終循環回再次到V是不可能的。[ 1][2][3]
dag圖
dag圖
DAGs may be used to model several different kinds of structure in mathematics and computer science.的DAG可用於對數學和計算機科學中得一些不同種類的結構進行建模。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 orderingmay be used to generate a valid sequence,由於受制於某些任務必須比另一些任務較早執行的限制,必須排序為一個佇列的任務集合可以由一個DAG圖來呈現,其中每個頂點表示一個任務,每條邊表示一種限制約束,拓撲排序算法可以用來生成一個有效的序列。DAGs may also be used to model processes in which information flows in a consistent direction through a network of processors.DAG也可以用來模擬信息沿著一個一致性的方向通過處理器網路的過程。The reachabilityrelation in a DAG forms a partial order, and any finite partial order may be represented by a DAG using reachability.DAG中得可達性關係構成了一個局部順序,任何有限的局部順序可以由DAG使用可達性來呈現,Additionally, DAGs may be used as a space-efficient representation of a collection of sequences with overlapping subsequences.此外,DAG的可作為一個序列集合的高效利用空間的重疊的子序列的代表性
The corresponding concept for undirected graphsis a forest, an undirected graph without cycles.相對應的概念,無向圖是一個森林,無環的無向圖。 Choosing an orientation for a forest produces a special kind of directed acyclic graph called a polytree.選擇森林的一個方向,產生了一種特殊的有向無環圖稱為polytree 。 However there are many other kinds of directed acyclic graph that are not formed by orienting the edges of an undirected acyclic graph.不過,也有其他種類的向無環圖,它們不是由面向無向無環圖的邊構成的。For this reason it may be more accurate to call directed acyclic graphs acyclic directed graphs or acyclic digraphs .出於這個原因,稱其為有向無環圖比無環有向圖或者無環圖更確切。

相關詞條

熱門詞條

聯絡我們