标签:顶点 and 表示 邻接 png title 运算 answer use
称0-1矩阵MR为R的邻接矩阵, 定义如下:
令MS?R = [tij], MR = [rij], MS = [sij]
则MS?R = MR⊙MS
其中,⊙表示两个矩阵进行布尔乘运算(boolean product)
例:
\[ M_R =
\left[\begin{matrix}
1 & 0 & 1 \ 1 & 1 & 0 \ 0 & 0 & 0
\end{matrix}
\right]
\]
\[ and \quad M_S =
\left[\begin{matrix}
0 & 1 & 0 \ 0 & 0 & 1 \ 1 & 0 & 1
\end{matrix}
\right]
\]
则MS?R的每个tij由MR的第i行与MS的第j列进行布尔乘运算,得到S?R的邻接矩阵为:
\[ M_{S?R} =
\left[\begin{matrix}
1 & 1 & 1 \ 0 & 1 & 1 \ 0 & 0 & 0
\end{matrix}
\right]
\]
理解:
例:用有向图来表示一个关系:
限制
如果R是定义在A上的关系,并且B是A的子集,则R对B的限制(the restriction of R to B)为:
R ∩ (B × B)
具有反对称性的图:无双向箭头
有一个关系R以及它的邻接矩阵MR,设△是一个等价关系,即M△是单位矩阵
①. R自反 <= => △ ? R <= => all 1‘s on its main diagonal
②. R反自反 <= => △ ∩ R = ? <= => all 0‘s on its main diagonal
③. R对称反对称非对称显然不赘述
④. R传递 <= => MR=[mij]具有这个性质:如果mij = 1,并且mjk = 1,那么mik = 1.
④. R传递 ==> R2 ? R, because if a and c are connected by a path of length 2 in R, then they must be connected by a path of length 1.
The answer is NO!
标签:顶点 and 表示 邻接 png title 运算 answer use
原文地址:https://www.cnblogs.com/SpicyArticle/p/11868611.html