フィルターのクリア

Can we compute the graph Laplacian matrix for a directed graph?

21 ビュー (過去 30 日間)
Souarv De
Souarv De 2022 年 3 月 16 日
コメント済み: Souarv De 2022 年 3 月 16 日
How to find graph laplacian matrix of a directed graph?

採用された回答

Christine Tobler
Christine Tobler 2022 年 3 月 16 日
It depends how you want to define it, there is no one consistent definition of what the graph laplacian of a directed graph is. This wikipedia page https://en.wikipedia.org/wiki/Laplacian_matrix#Definitions_for_simple_graphs lists some options.
  2 件のコメント
Christine Tobler
Christine Tobler 2022 年 3 月 16 日
For undirected graphs, the graph class in MATLAB has a laplacian method.
Souarv De
Souarv De 2022 年 3 月 16 日
Thanks @Christine Tobler for providing the resource link for the subject matter. It's really help me a lot.

サインインしてコメントする。

その他の回答 (1 件)

Bruno Luong
Bruno Luong 2022 年 3 月 16 日
編集済み: Bruno Luong 2022 年 3 月 16 日
In this thread I give formula for graph, for digraph you just need to be careful about indegree or outdegree
% TMW example
s = [1 2 2 3 3 3 4 5 5 5 8 8 9];
t = [2 3 4 1 4 5 5 3 6 7 9 10 10];
G = digraph(s,t);
A = G.adjacency;
% Use Laplacian
Din = diag(sum(A,1)); % in degree matrix
Dout = diag(sum(A,2)); % in degree matrix
Lin = Din - A % laplacian matrix
Lin =
(1,1) 1 (3,1) -1 (1,2) -1 (2,2) 1 (2,3) -1 (3,3) 2 (5,3) -1 (2,4) -1 (3,4) -1 (4,4) 2 (3,5) -1 (4,5) -1 (5,5) 2 (5,6) -1 (6,6) 1 (5,7) -1 (7,7) 1 (8,9) -1 (9,9) 1 (8,10) -1 (9,10) -1 (10,10) 2
Lout = Dout - A % laplacian matrix
Lout =
(1,1) 1 (3,1) -1 (1,2) -1 (2,2) 2 (2,3) -1 (3,3) 3 (5,3) -1 (2,4) -1 (3,4) -1 (4,4) 1 (3,5) -1 (4,5) -1 (5,5) 3 (5,6) -1 (5,7) -1 (8,8) 2 (8,9) -1 (9,9) 1 (8,10) -1 (9,10) -1
  1 件のコメント
Souarv De
Souarv De 2022 年 3 月 16 日
Thanks @Bruno Luong for your easy explanation via the simple codding. It's really solved my doubts.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by