(Graph Theory) Adjacency Matrix

本文介绍了图的邻接矩阵表示方法,讨论了如何根据顶点的重新排列来改变邻接矩阵,并阐述了邻接矩阵在判断图同构中的作用。证明了两个图同构当且仅当存在一种顶点排列使得它们的邻接矩阵相同。
摘要由CSDN通过智能技术生成


This post will briefly go over the definition of adjacency matrix for graphs, some related theorems regarding graph isomorphism, and some proofs.

Adjacency Matrix

  • The adjacency matrix is one way to formally represent a graph, for example in convenience for computer computation.
  • Given a graph G : = ( V , E ) G:=(V,E) G:=(V,E), where ∣ V ∣ = n |V|=n V=n, to obtain the adjacency matrix of this graph, we firstly select an ordering of the vertices, say we (re)name them as v 1 , . . . , v n v_1,...,v_n v1,...,vn.
  • Next, we label the rows and columns of a matrix with the ordered vertices.
  • The entry in this matrix in row $i4, column j j j, when i ≠ j i \ne j i=j, is the number of edges incident on i i i and j j j.
  • If i = j i = j i=j, the entry is twice the number of loops incident on i i i, and this is because we want the nice formula ∑ i = 1 n δ ( v i ) = 2 ∣ E ∣ , n ≥ 1 \sum_{i=1}^n\delta(v_i)=2|E| ,n≥1 i=1nδ(vi)=2E,n1 to hold in general ( n = 0 n=0 n=0 is not particuarly interesting).

Remark

  • Besides entries on the main diagonal, the information are redundantly stored twice in the adjacency matrix (the information above the main diagonal is identical to the information below the main diagonal). Therefore, to obtain δ ( v i ) \delta(v_i) δ(vi), we sum up all the entries in the i i ith row OR all the entries in the i i ith column, but never both.

Reordering the Vertices

  • Ordering affects which row represents which vertex. Observe that if a graph has n n n vertices, we have n ! n! n! ways to reorder the vertices, and we can thus produce n ! n! n! (not necessarily distinct) adjacency matrices.

Graph Isomorphism and Adjacency Matrix

Proposition

  • Two graphs G 1 , G 2 G_1,G_2 G1,G2 are isomorphic iff there is some ordering of their vertices so that A 1 = A 2 A_1=A_2 A1=A2 ( A 1 A_1 A1 is an adjacency matrix of G 1 G_1 G1, and A 2 A_2 A2 is an adjacency matrix of G 2 G_2 G2).

Proof

Isomorphism    ⟹    \implies Ordering

  • Suppose G 1 , G 2 G_1,G_2 G1,G2 are isomorphic, then there exist bijections f : V 1 → V 2 f:V_1\to V_2 f:V1V2 and g : E 1 → E 2 g:E_1\to E_2 g:E1E2 such that e ∈ E 1 e\in E_1 eE1 is incident on v , w ∈ V 1 v,w\in V_1 v,wV1 iff g ( e ) ∈ E 2 g(e)\in E_2 g(e)E2 is incident on f ( v ) , f ( w ) ∈ V 2 f(v),f(w)\in V_2 f(v),f(w)V2.
  • Thus, we can choose arbitrarily an ordering of the vertices of G 1 G_1 G1, say v 1 , . . . , v n v_1,...,v_n v1,...,vn, which gives us an adjacency matrix of G 1 G_1 G1, A 1 A_1 A1. Since f f f is a bijection, we can let the ordering of vertices of G 2 G_2 G2 be f ( v 1 ) , . . . , f ( v n ) f(v_1),...,f(v_n) f(v
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值