SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 30 day free trial to unlock unlimited reading.
8.
DAG
閉路を持たない有向グラフのこと
動的計画法のキモです
これもDAG
閉路はない!
つまりDAG
これは違う
9.
トポロジカル順序
DAGにおいて、「ノードAからノードBにエッジがあ
るとき、必ずAがBより前にあるように並び替えた順
序」のこと
A
B
C
トポロジカル順序は、
「A → B → C → D → E」
「A → B → D → C → E」
D
E
10.
トポロジカル順序
トポロジカル順序は複数存在するときもある
DAGを仕事の順序を表したグラフと考えると、
「仕事が成立する順序」とも考えられる。
トポロジカル順序にノードを並び替えることを
「トポロジカルソート」という。
A
B
C
A → B → C → D → E または
仕事が成立する。
D
E
A → B → D → C → E なら