SlideShare una empresa de Scribd logo
1 de 7
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by
PGX ユーザー勉強会 #10 LT
Built-in アルゴリズム(Shortest-Path, Fattest-Path)
2018/10/25
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 1
自己紹介
– 名前: 田上 悠樹
– 職業: ITエンジニア
– 所属: ウルシステムズ株式会社
– 活動: ビジネスデータのグラフモデル化
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 2
PGX Built-in Algorithms
– 30以上のグラフ分析用アルゴリズムを備えている
Path分析, Centralities分析, Community分析 等がPGXに組み込まれており、利用可能
– Built-in アルゴリズム 一覧
[ https://docs.oracle.com/cd/E56133_01/2.7.0/reference/algorithms/index.html ]
本日は、 Dijkstra‘s Algorithm と Fattest-Path をご紹介
 Cycle Detection Algorithms
 Degree Centrality and variants
 Degree Distribution and variants
 Dijkstra's Algorithm and variants
 Bidirectional Dijkstra's Algorithm (and
variants)
 Eccentricity Algorithms
 Eigenvector Centrality
 Fattest-Path
 Filtered BFS
 Hyperlink-Induced Topic Search
 Infomap
 K-Core
 Label Propagation
 Local Clustering Coefficient
 Matrix Factorization (Gradient Descent)
 PageRank and variants
 Partition Conductance
 Partition Modularity
 Prim
 Random Walk with Restart
 Reachability
 SALSA and variants
 SSSP (Bellman Ford) and variants
 SSSP (Hop Distance) and variants
 Strongly Connected Components
 Topological Ordering Algorithms
 Triangle Counting
 Vertex Betweenness Centrality and variants
 Weakly Connected Components
 Whom To Follow
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 3
Shortest-Path (Dijkstra's Algorithm)
– Overview
2点間の最短経路を求めるアルゴリズム。言い換えると、『経路上に登場する”重み”の
和を最小にする経路』(Dijkstra法の場合、重みは非負が前提)
– Signature (Java APIの場合)
 Input
Graph, 始点, 終点, ”重み”に対応する辺プロパティ。
“重み”に何を採用するかは問題の設定次第。
物理的距離、時間、値段、経由数 など。(非負が前提)
 Return
始点- 終点間の Shortest-Path .
経路上のVertex と Edge が含まれた形で返却。
 Example
EdgeProperty<Double> weight = graph.getEdgeProperty("distance");
PgxPath<Integer> shortestPath = analyst.shortestPathDijkstra(graph, source, dest, weight);
https://en.wikipedia.org/wiki/Widest_path_problem
一部 加筆
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 4
Fattest-Path
– Overview
2点間の最大フロー経路を求めるアルゴリズム。言い換えると、『経路上に登場する
最小域を最大にする経路』とか、『経路のボトルネックを最小化する経路』とか。
– Signature (Java APIの場合)
 Input
Graph, 始点, ”容量”に対応する辺プロパティ。
“容量”に何を採用するかは問題の設定次第。
幅、帯域、など。
 Return
始点 から全点間へのFattest-Path .
経路毎のVertex と Edge が含まれた形で返却。
 Example
EdgeProperty<Double> capacity = graph.getEdgeProperty("capacity");
AllPaths<Integer> fattestPaths = analyst.fattestPath(graph,start, capacity);
https://en.wikipedia.org/wiki/Widest_path_problem
一部 加筆
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 5
Demo( Shortest-Path vs Fattest-Path )
– Vertex 0 → Vertex 2 への Shortest-Path と Fattest-Path 比較
 Shortest-Path の”距離” はユークリッド距離。(見た目上の距離感と一致)
 Fattest-Path の”容量”はランダムに割当。グラフの辺の幅(太い・細い)で表現。
ULS
Copyright © 2011-2017 UL Systems, Inc. All rights reserved.
Proprietary & Confidential Powered by 6
まとめ
– 本日は2つのBuilt-in アルゴリズムを紹介した
 Shortest-Path ( Dijkstra's Algorithm )
 最短経路: 経路上の重みの和を最小にする経路。
 Fattest-Path
 最大フロー経路: 経路上に登場する最小幅を最大にする経路。
あと、 Filtered Dijkstra Algorithm を使えば、
一定の容量以上(Filter 例: capacity ≧ X )での最短経路 を
求めるみたいな合わせ技もいけるかも。(試してないけどね。)
以上です.

Más contenido relacionado

Similar a PGXユーザー勉強会#10_Built-in アルゴリズム(Shortest-Path, Fattest-Path)

SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】
SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】
SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】Kohei KaiGai
 
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行CODE BLUE
 
Data Orchestration with LogicFlow
Data Orchestration with LogicFlowData Orchestration with LogicFlow
Data Orchestration with LogicFlowTomoyuki Obi
 
OpenStackによる、実践オンプレミスクラウド
OpenStackによる、実践オンプレミスクラウドOpenStackによる、実践オンプレミスクラウド
OpenStackによる、実践オンプレミスクラウドMasanori Itoh
 
Extending PostgreSQL - PgDay 2012 Japan
Extending PostgreSQL - PgDay 2012 JapanExtending PostgreSQL - PgDay 2012 Japan
Extending PostgreSQL - PgDay 2012 JapanShigeru Hanada
 
20170127 JAWS HPC-UG#8
20170127 JAWS HPC-UG#820170127 JAWS HPC-UG#8
20170127 JAWS HPC-UG#8Kohei KaiGai
 

Similar a PGXユーザー勉強会#10_Built-in アルゴリズム(Shortest-Path, Fattest-Path) (6)

SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】
SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】
SSDとGPUがPostgreSQLを加速する【OSC.Enterprise】
 
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行
HTML5 Security & Headers - X-Crawling-Response-Header - by 重森 友行
 
Data Orchestration with LogicFlow
Data Orchestration with LogicFlowData Orchestration with LogicFlow
Data Orchestration with LogicFlow
 
OpenStackによる、実践オンプレミスクラウド
OpenStackによる、実践オンプレミスクラウドOpenStackによる、実践オンプレミスクラウド
OpenStackによる、実践オンプレミスクラウド
 
Extending PostgreSQL - PgDay 2012 Japan
Extending PostgreSQL - PgDay 2012 JapanExtending PostgreSQL - PgDay 2012 Japan
Extending PostgreSQL - PgDay 2012 Japan
 
20170127 JAWS HPC-UG#8
20170127 JAWS HPC-UG#820170127 JAWS HPC-UG#8
20170127 JAWS HPC-UG#8
 

Más de Yuki Tagami

グラフデータからの分析アプローチ
グラフデータからの分析アプローチグラフデータからの分析アプローチ
グラフデータからの分析アプローチYuki Tagami
 
Start Deep Reinforcement Learning with RL4J
Start Deep Reinforcement Learning with RL4JStart Deep Reinforcement Learning with RL4J
Start Deep Reinforcement Learning with RL4JYuki Tagami
 
PGX ユーザー勉強会 #15 LT Ant Colony Optimization
PGX ユーザー勉強会 #15 LT Ant Colony OptimizationPGX ユーザー勉強会 #15 LT Ant Colony Optimization
PGX ユーザー勉強会 #15 LT Ant Colony OptimizationYuki Tagami
 
RL4J で始める深層強化学習
RL4J で始める深層強化学習RL4J で始める深層強化学習
RL4J で始める深層強化学習Yuki Tagami
 
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )Yuki Tagami
 
PGX ユーザー勉強会 #13 LT Built-in アルゴリズム( Topological Ordering Algorithm )
PGX ユーザー勉強会 #13  LT Built-in アルゴリズム( Topological Ordering Algorithm )PGX ユーザー勉強会 #13  LT Built-in アルゴリズム( Topological Ordering Algorithm )
PGX ユーザー勉強会 #13 LT Built-in アルゴリズム( Topological Ordering Algorithm )Yuki Tagami
 
Graph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたGraph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたYuki Tagami
 
Graph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたGraph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたYuki Tagami
 
いまさらアジャイル巡業 In Tokyo アジャイルモデリング
いまさらアジャイル巡業 In Tokyo アジャイルモデリングいまさらアジャイル巡業 In Tokyo アジャイルモデリング
いまさらアジャイル巡業 In Tokyo アジャイルモデリングYuki Tagami
 
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312Yuki Tagami
 

Más de Yuki Tagami (10)

グラフデータからの分析アプローチ
グラフデータからの分析アプローチグラフデータからの分析アプローチ
グラフデータからの分析アプローチ
 
Start Deep Reinforcement Learning with RL4J
Start Deep Reinforcement Learning with RL4JStart Deep Reinforcement Learning with RL4J
Start Deep Reinforcement Learning with RL4J
 
PGX ユーザー勉強会 #15 LT Ant Colony Optimization
PGX ユーザー勉強会 #15 LT Ant Colony OptimizationPGX ユーザー勉強会 #15 LT Ant Colony Optimization
PGX ユーザー勉強会 #15 LT Ant Colony Optimization
 
RL4J で始める深層強化学習
RL4J で始める深層強化学習RL4J で始める深層強化学習
RL4J で始める深層強化学習
 
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )
PGX ユーザー勉強会 #14 LT Built-in アルゴリズム ( Prim's Algorithm )
 
PGX ユーザー勉強会 #13 LT Built-in アルゴリズム( Topological Ordering Algorithm )
PGX ユーザー勉強会 #13  LT Built-in アルゴリズム( Topological Ordering Algorithm )PGX ユーザー勉強会 #13  LT Built-in アルゴリズム( Topological Ordering Algorithm )
PGX ユーザー勉強会 #13 LT Built-in アルゴリズム( Topological Ordering Algorithm )
 
Graph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたGraph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみた
 
Graph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみたGraph DB のユニークさについて考えてみた
Graph DB のユニークさについて考えてみた
 
いまさらアジャイル巡業 In Tokyo アジャイルモデリング
いまさらアジャイル巡業 In Tokyo アジャイルモデリングいまさらアジャイル巡業 In Tokyo アジャイルモデリング
いまさらアジャイル巡業 In Tokyo アジャイルモデリング
 
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312
ULSアジャイル推進室 基幹系システムの再構築におけるDDD事例 20160312
 

PGXユーザー勉強会#10_Built-in アルゴリズム(Shortest-Path, Fattest-Path)

  • 1. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by PGX ユーザー勉強会 #10 LT Built-in アルゴリズム(Shortest-Path, Fattest-Path) 2018/10/25
  • 2. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 1 自己紹介 – 名前: 田上 悠樹 – 職業: ITエンジニア – 所属: ウルシステムズ株式会社 – 活動: ビジネスデータのグラフモデル化
  • 3. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 2 PGX Built-in Algorithms – 30以上のグラフ分析用アルゴリズムを備えている Path分析, Centralities分析, Community分析 等がPGXに組み込まれており、利用可能 – Built-in アルゴリズム 一覧 [ https://docs.oracle.com/cd/E56133_01/2.7.0/reference/algorithms/index.html ] 本日は、 Dijkstra‘s Algorithm と Fattest-Path をご紹介  Cycle Detection Algorithms  Degree Centrality and variants  Degree Distribution and variants  Dijkstra's Algorithm and variants  Bidirectional Dijkstra's Algorithm (and variants)  Eccentricity Algorithms  Eigenvector Centrality  Fattest-Path  Filtered BFS  Hyperlink-Induced Topic Search  Infomap  K-Core  Label Propagation  Local Clustering Coefficient  Matrix Factorization (Gradient Descent)  PageRank and variants  Partition Conductance  Partition Modularity  Prim  Random Walk with Restart  Reachability  SALSA and variants  SSSP (Bellman Ford) and variants  SSSP (Hop Distance) and variants  Strongly Connected Components  Topological Ordering Algorithms  Triangle Counting  Vertex Betweenness Centrality and variants  Weakly Connected Components  Whom To Follow
  • 4. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 3 Shortest-Path (Dijkstra's Algorithm) – Overview 2点間の最短経路を求めるアルゴリズム。言い換えると、『経路上に登場する”重み”の 和を最小にする経路』(Dijkstra法の場合、重みは非負が前提) – Signature (Java APIの場合)  Input Graph, 始点, 終点, ”重み”に対応する辺プロパティ。 “重み”に何を採用するかは問題の設定次第。 物理的距離、時間、値段、経由数 など。(非負が前提)  Return 始点- 終点間の Shortest-Path . 経路上のVertex と Edge が含まれた形で返却。  Example EdgeProperty<Double> weight = graph.getEdgeProperty("distance"); PgxPath<Integer> shortestPath = analyst.shortestPathDijkstra(graph, source, dest, weight); https://en.wikipedia.org/wiki/Widest_path_problem 一部 加筆
  • 5. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 4 Fattest-Path – Overview 2点間の最大フロー経路を求めるアルゴリズム。言い換えると、『経路上に登場する 最小域を最大にする経路』とか、『経路のボトルネックを最小化する経路』とか。 – Signature (Java APIの場合)  Input Graph, 始点, ”容量”に対応する辺プロパティ。 “容量”に何を採用するかは問題の設定次第。 幅、帯域、など。  Return 始点 から全点間へのFattest-Path . 経路毎のVertex と Edge が含まれた形で返却。  Example EdgeProperty<Double> capacity = graph.getEdgeProperty("capacity"); AllPaths<Integer> fattestPaths = analyst.fattestPath(graph,start, capacity); https://en.wikipedia.org/wiki/Widest_path_problem 一部 加筆
  • 6. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 5 Demo( Shortest-Path vs Fattest-Path ) – Vertex 0 → Vertex 2 への Shortest-Path と Fattest-Path 比較  Shortest-Path の”距離” はユークリッド距離。(見た目上の距離感と一致)  Fattest-Path の”容量”はランダムに割当。グラフの辺の幅(太い・細い)で表現。
  • 7. ULS Copyright © 2011-2017 UL Systems, Inc. All rights reserved. Proprietary & Confidential Powered by 6 まとめ – 本日は2つのBuilt-in アルゴリズムを紹介した  Shortest-Path ( Dijkstra's Algorithm )  最短経路: 経路上の重みの和を最小にする経路。  Fattest-Path  最大フロー経路: 経路上に登場する最小幅を最大にする経路。 あと、 Filtered Dijkstra Algorithm を使えば、 一定の容量以上(Filter 例: capacity ≧ X )での最短経路 を 求めるみたいな合わせ技もいけるかも。(試してないけどね。) 以上です.