An Operation State Analysis Method for Integrated Energy System Based on Correlation Information Adversarial Learning
-
摘要: 综合能源系统(Integrated energy system, IES)运行状态分析常以广泛化信息技术应用提供的数据为支撑, 然而传感器故障、网络通信中断等信息异常导致的数据缺失会直接影响数据质量. 在考虑数据缺失的情况下, 本文提出了一种基于关联信息对抗学习的综合能源系统运行状态分析方法. 首先构建深度生成对抗网络(Generative adversarial network, GAN)对数据缺失部分进行可靠性补偿. 在设计生成器结构过程中, 通过引入系统拓扑邻接矩阵对生成器输入数据进行优化排序, 进而在训练过程中采用设计的多属性融合生成器损失函数, 促使生成器进一步得到高精度补偿数据. 接着将判别器提取的不同时刻完整能源数据的特征作为基础, 采用浅层特征分布及深层特征信息差异值融合判断, 从而实现系统运行状态分析. 最后对不同数据缺失补偿及不同类型节点改变情况进行仿真, 验证了本文所提方法的可行性与有效性.Abstract: The operation state analysis of integrated energy system (IES) is based on data provided through information technology application. However, data missing caused by ubiquitous device failure, network interruption and so on, has direct influence on quality of data. Considering data missing, this paper proposes an operation state analysis method for integrated energy system based on correlation information adversarial learning. Firstly, deep generative adversarial network (GAN) is presented to complete the reliable data imputation process. In the designed generator structure, an adjacent matrix is presented to optimize the input data sorting, and then the multi-attribute fusion loss function in training process is utilized to drive generator for obtaining high precision completed data. Based on different time completed energy data features extracted by discriminator, difference values of shallow and deep features are considered as the judging index to realize operation state analysis. Finally, the feasibility and effectiveness of the proposed method are verified through the different data imputation situation and the changes of different types of nodes.
-
图的同构判定在有机化学、计算机科学和人工智能(机器学习或模式识别中常使用图的邻接矩阵特征值来判定两个对象是否为同一个对象)等领域有着重要的应用[1−3]. 上世纪前半叶, 与图同构相关的问题主要围绕图的邻接矩阵特征值及其应用展开[4], 取得若干重要的理论成果和一批应用成果; 其中一个重要的发现是, 两个互不同构的无向图却具有相同的邻接矩阵特征多项式, 即用邻接矩阵特征多项式判定两个无向图是否同构有时会得出错误的结果[4].
上世纪70年代, Karp和Johnson认为图的同构判定问题是少数几个既不能归类为 P 问题也不能归类为 NP 的问题[1, 3]. 此后, 该问题成为理论计算机领域的公开问题并受到广泛重视. 1982年, Luks给出一个当时最好的两图同构判定算法, 其时间复杂度是$\exp ({\text{O(}}\sqrt {n\log n} {\text{)}}$)[5−6] ($ n $为图的顶点数). 此后40多年来, 几百篇这方面的文章得以在不同的学术期刊上发表[1]. 2015年, Babai[6]在Luks算法的基础上, 给出两图同构判定问题的拟多项式算法, 其时间复杂度是$ \exp ({(\log n)^{{\text{O(1)}}}}) $. Babai的工作虽然是一个重要进展, 但图的同构判定问题是否在多项式时间内可解仍然悬而未决[1, 3].
图的同构判定问题的另一研究路径是设计可执行的判定算法, 大致可以分为传统和非传统两类判定算法. 传统判定算法有两类: 1) 针对一些特殊图[7−8] (如树和极大外平面图)的同构判定算法(如Ullman算法和Schmidt算法等[9]). 2) 针对一般简单图的同构判定算法, 如一些放在因特网上用于测试两图是否同构的程序(如Nauty和Saucy等[3, 6]). 非传统判定算法也有两类: 1) 基于遗传算法和神经网络的智能判定算法. 这些算法将图的同构判定问题转化为一类优化求解问题, 但其判定结果并不完全可靠. 2) 基于DNA计算[9]和量子计算的判定算法. 这类算法虽然高效, 但不能回答图的同构判定是 P 问题还是 NP 问题. 无向连通图的距离矩阵是素矩阵(邻接矩阵一般不是素矩阵), 它具有邻接矩阵所没有的独特性质[10]. 文献[10]揭示了简单无向图同构与距离矩阵同构之间的一般关系, 将基于邻接矩阵的同构判定条件推广到距离矩阵, 给出几个适合一般简单无向图的同构判定条件. 这些条件均是充要条件且均具有多项式时间复杂度. 上述成果是近年来图同构研究方面的一个重要进展.
简单无向图的同构关系可由其距离矩阵的同构关系确定, 但复杂无向图却不能. 其根本原因在于: 复杂无向图中的自环和顶点间的重边对顶点间的距离没有影响[10]; 换言之, 自环数或重边数不同的复杂无向图可能具有完全相同的距离矩阵. 因文献[10]所给的判定条件不能用于复杂无向图, 故寻找和发现复杂无向图的同构判定条件既是必须的也是重要的. 本文的主要贡献是: 1) 针对一般复杂无向图的同构判定问题, 给出了基于邻接矩阵之和的特征多项式判定条件. 2) 针对复杂无向连通图的同构判定问题, 给出了基于距离矩阵特征多项式和邻接矩阵特征多项式的同构判定条件. 将该条件用于复杂无向不连通图的各个连通子图, 就可解决复杂无向不连通图的同构判定问题. 上述两个判定条件均是充要条件且均具有多项式时间复杂度. 此外, 当复杂无向图退化为简单无向图时, 上述两个判定条件仍然适用.
1. 相关概念和预备知识
定义1[4, 11−12]. 图$ G $是一个二元组, 记作$ G = \langle V, E \rangle $, 其中:
1) $ V = \{ {v_1},\;{v_2},\; \cdots ,\;{v_n}\left| {\left| V \right| = n,\;{\text{ 1}} \le n < \infty } \right.\} $, $ {v_i} \in V $称为$ G $的顶点, $ V $称为$ G $的顶点集.
2) $ E = \{ {e_1},\;{e_2},\; \cdots ,\;{e_m}\left| {\left| E \right| = m,\;{\text{ 0}} \le m < \infty } \right.\} $, $ {e_j} \in E $称为$ G $的边, $ E $称为$ G $的边集.
3) $ \forall {e_j} \in E $: $ {e_j} $为无向边时, 称$ G $为无向图, $ {e_j} $为有向边时, 称$ G $为有向图.
4) 连接同一顶点的边称为自环, 两顶点间的多条无向边或多条方向相同的有向边称为重边. 既无自环也无重边的图称为简单图, 否则称为复杂图.
在现有文献报道的复杂无向图中, 每个顶点最多有一个自环. 若无特别声明, 本文讨论的均是顶点最多有一个自环的复杂无向图.
定义2[11−13]. 设$ G = \left\langle {V,\;E} \right\rangle $是无向图, $ V = \{ {v_1}, {v_2},\; \cdots ,\;{v_n}\} $. 若$ {v_i} $和$ {v_j} $之间有$ k $ ($ k = 0,\;1,\; \cdots $)条边, 令$ {a_{ij}} = k $; 称由元素$ {a_{ij}} $构成的矩阵$ A({a_{ij}}) \in {{\bf{R}}^{n \times n}} $为无向图$ G $的邻接矩阵.
定义2既适合简单无向图也适合复杂无向图($ {a_{ij}} \in \{ 0,\;1,\;2,\; \cdots \} $). 无向图的邻接矩阵是非负整数对称矩阵.
定义3[14]. 设$ {I_n} \in {{\bf{R}}^{n \times n}} $为单位矩阵, 交换$ {I_n} $的第$ i $行和第$ j $行(或第$ i $列与第$ j $列)所得的矩阵$ P(i,\;j) $称为对换矩阵, 对换矩阵的乘积称为置换矩阵.
引理1[14]. 对换矩阵和置换矩阵具有如下性质:
1) 置换矩阵的乘积仍是置换矩阵;
2) 设$ Q $是置换矩阵, 则$ \det (Q) = \pm 1 $;
3) 设$ Q $是置换矩阵, 则$ {Q^{\text{T}}} $和$ {Q^{ - 1}} $也是置换矩阵, 且$ {Q^{\text{T}}} = {Q^{ - 1}} $;
4) 置换矩阵是正交矩阵;
5) 置换矩阵是幂幺矩阵, 即若$ Q $是置换矩阵, 则$ {Q^m} = {I_n} $, $ m $是某自然数.
由定义3和引理1可知, 对换矩阵和$ {I_n} $也是置换矩阵.
定义4[10]. 设$ A,\;B \in {{\bf{R}}^{n \times n}} $, $ \Omega \subset {{\bf{R}}^{n \times n}} $为全体$ n $阶置换矩阵的集合. 若存在置换矩阵$ Q \in \Omega $, 使得$ A = {Q^{\text{T}}}BQ $, 则称$ A $与$ B $同构, 记作$ A \cong B $; 此外, 称$ {Q^{\text{T}}}BQ $是对$ B $的同构变换.
图的同构问题可以这样表述: 给定两个图, 当忽略图中顶点标号、顶点间相对位置、边的长短和曲直信息时, 问这两个图是否具有相同的结构?
定义5[4, 12−13]. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_2} = $ $ \langle {V_2}, {E_{\text{2}}} \rangle $是两个图. 若存在一个从$ {V_1} $到$ {V_2} $的一一映射$ g $: $ \forall {v_i},\;{v_j} \in {V_1} $, $ {v_i} $至$ {v_j} $有$ k $条边, 当且仅当$ g({v_i}), g({v_j}) \in {V_2} $, 且$ g({v_i}) $至$ g({v_j}) $也有$ k $条边, 则称$ {G_1} $和$ {G_2} $同构, 记作$ {G_1} \cong {G_2} $.
定义5既适合简单图也适合复杂图($ k \in \{ 0, 1,\;2,\; \cdots \} $).
引理2[10−11]. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_2} = $$ \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个图, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n $, $ A $与$ B $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, 则$ {G_1} \cong {G_2} $的充要条件是存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ A = {Q^{\text{T}}}BQ $.
引理2适合一切无向和有向图. 由定义4和引理2可知, 两图同构与该两图的邻接矩阵同构等价.
定义6[4, 10−13]. 设$ G = \left\langle {V,\;E} \right\rangle $是无向图, $ V = \{ {v_1},\;{v_2},\; \cdots ,\;{v_n}\} $, $ E = \{ {e_1},\;{e_2},\; \cdots ,\;{e_m}\} $: 1) $ G $中顶点与边的交替序列$ W = {v_1}{e_1}{v_2}{e_2} \cdots {v_k}{e_k}{v_{k + 1}} $ ($ k \le n - 1 $)称为$ G $的链, 各边互异的链称为迹, 各顶点互异的链称为路, 当$ W $是路时, $ W $中的边数$ k $称为$ W $的长度, 记作$ k = \left| W \right| $; 2) 设$ {v_i} $和$ {v_j} $是$ V $中任意两个顶点, 当$ {v_i} $和$ {v_j} $之间有$ s $条路$ {W_s}{\text{ }} $时, 称$ d({v_i},\;{v_j}) = $$ \min \{ {k_p} = \left| {{W_p}} \right|\left| {1 \le p \le s} \right.\} $为$ {v_i} $和$ {v_j} $之间的距离; 若$ {v_i} $和$ {v_j} $之间无路($ G $不连通), 约定$ d({v_i},\;{v_j}) = \infty $.
定义7[10, 13]. 设$ G = \left\langle {V,\;E} \right\rangle $是无向图, $ V = \{ {v_1}, {v_2},\; \cdots ,\;{v_n}\} $, $ {d_{ij}} = d({v_i},\;{v_j}) $表示顶点$ {v_i} $和$ {v_j} $($ 1 \le i, j \le n $)之间的距离: 当$ i = j $时, 令$ {d_{ii}} = 0 $; 当$ i \ne j $且$ d({v_i},\;{v_j}) = k $ ($ d({v_i},\;{v_j}) = \infty $)时, 令$ {d_{ij}} = k $$ ({d_{ij}} = \infty ) $, 其中$ k \ge 1 $为正整数, 称由元素$ {d_{ij}} $构成的矩阵$ D({d_{ij}}) \in {{\bf{R}}^{n \times n}} $为无向图$ G $的距离矩阵.
由定义6和定义7可知: 1) 复杂无向图中的自环和顶点间的重边对顶点间的距离没有影响; 2) 当$ G $是无向连通图时, 距离矩阵$ D $是对角线元素均为零而其他元素均为正整数的对称矩阵.
定义8[12−13]. 设$ {G_n} = \left\langle {V,\;E} \right\rangle $是简单无向图, $ V = \{ {v_1},\;{v_2},\; \cdots ,\;{v_n}\} $, $ n \ge 2 $, 若$ \forall i \ne j $, $ {v_i} $和$ {v_j} $之间恰有一条边, 则称$ {G_n} $为无向完全图, 其邻接矩阵记为$ {A_n} $.
由定义2和定义8可知, $ {A_n} $的对角线元素均为0而其他元素均为1. 设$ {G_n} $的距离矩阵为$ {D_n} $, 由定义7可知, $ {D_n} = {A_n} $, 即$ {A_n} $既是$ {G_n} $的邻接矩阵又是$ {G_n} $的距离矩阵.
定义9. 设$ { T} \subset {{\bf{R}}^{n \times n}} $$ (n \ge 2) $表示全体$ n $阶正交矩阵的集合; $ {\Omega ^ - } = \{ - S\left| {S \in \Omega } \right.\} $表示全体$ n $阶负置换矩阵的集合; $ \Phi = \Omega \cup {\Omega ^ - } $表示全体$ n $阶置换矩阵和全体$ n $阶负置换矩阵的并集; $ \Theta = { T} - \Phi $表示$ { T} $中除$ \Phi $之外全体$ n $阶正交矩阵的集合.
由定义9和正交矩阵的性质可知: $ \Theta \cap \Phi = \emptyset $($ \emptyset $为空集), $ \Theta \cup \Phi = { T} $; $ \forall {Q_1},\;{Q_2} \in \Phi $, $ {Q_1}{Q_2} \in \Phi $; $ \forall Q \in \Phi $, $ \forall P \in \Theta $, $ QP,\;{\text{ }}PQ \in \Theta $; $ \forall P \in \Theta $, $ \forall E \in \Phi $, $ \forall Q \in { T} $且$ Q \ne E{P^{\text{T}}} $, $ QP,\;{\text{ }}PQ \in \Theta $.
2. 复杂无向图的同构判定方法
为简便计, $ \forall A \in {{\bf{R}}^{n \times n}} $$ (n \ge 2) $, 本文用$ {f_\lambda }(A) $表示$ A $的特征多项式 $ \det (\lambda {I_n} - A) $, 即$ {f_\lambda }(A) = \det (\lambda {I_n} - A) $.
推论1. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_{\text{2}}} = \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个无向图, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n $, $ A $与$ B $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, 若$ {f_\lambda }(A) \ne {f_\lambda }(B) $, 则$ {G_1} $和$ {G_2} $不同构.
证明. 设$ {f_\lambda }(A) \ne {f_\lambda }(B) $时, $ {G_1} \cong {G_2} $. 由引理2可知, 当$ {G_1} \cong {G_2} $时, 存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ A = {Q^{\text{T}}}BQ $. 由此, $ {f_\lambda }(A) = $ $ {f_\lambda }({Q^{\text{T}}}BQ) = {f_\lambda }(B) $, 与假设相矛盾. 故$ {f_\lambda }(A) \ne {f_\lambda }(B) $时, $ {G_1} $和$ {G_2} $不同构.
□ 推论1既适合简单无向图也适合复杂无向图. 需要强调的是, 即使$ {f_\lambda }(A) = {f_\lambda }(B) $, 也不能保证$ {G_1} $和$ {G_2} $同构. 邻接矩阵特征多项式相等仅是两个无向图同构的必要条件[10, 15].
设$ A({a_{ij}}) \in {{\bf{R}}^{n \times n}} $$ (n \ge 2) $是对称矩阵: 若$ {a_{ij}} $全是正整数, 则称$ A $为正整数对称矩阵; 若$ {a_{ij}} $为零或正整数, 则称$ A $为非负整数对称矩阵.
引理3[10]. 设$ A \in {{\bf{R}}^{n \times n}} $$ (n \ge 2) $是对角线元素均为1而其他元素均为正整数的对称矩阵, 则$ \forall P \in \Theta $, $ {P^{\text{T}}}AP $不是正整数对称矩阵.
引理4[14]. 设$ A \in {{\bf{R}}^{n \times n}} $, 则$ A $为正交矩阵的充要条件是存在正交矩阵$ P \in { T} $, 使得
$$ {P^{\text{T}}}AP = {P^{ - 1}}AP = \left[ {\begin{array}{*{20}{c}} {{I_s}}&{}&{} \\ {}&{ - {I_t}}&{} \\ {}&{}&{{H_\theta }} \end{array}} \right] = {P_\theta } $$ 其中, $ {I_s} $与$ I_{t} $分别是$ s $阶和$ t $阶单位矩阵,
$$ {H_\theta } = \left[ {\begin{array}{*{20}{c}} {\left[ {\begin{array}{*{20}{c}} {\cos {\theta _1}}&{\sin {\theta _1}} \\ { - \sin {\theta _1}}&{\cos {\theta _1}} \end{array}} \right]}&{}&{} \\ {}& \ddots &{} \\ {}&{}&{\left[ {\begin{array}{*{20}{c}} {\cos {\theta _k}}&{\sin {\theta _k}} \\ { - \sin {\theta _k}}&{\cos {\theta _k}} \end{array}} \right]} \end{array}} \right] $$ $ s + t + 2k = n $, $ {\theta _j} \in {\bf{R}} $$ (1 \le j \le k) $为实数.
由正交矩阵的定义可知, $ {P_\theta } $和$ {H_\theta } $均是正交矩阵.
定理1. 设$ A \in {{\bf{R}}^{n \times n}} $$ (n \ge 2) $是对角线元素为0或1而其他元素均为正整数的对称矩阵, 则$ \forall P \in \Theta $, $ {P^{\text{T}}}AP $既不是正整数对称矩阵也不是非负整数对称矩阵.
证明. 当$ A $的对角线元素全为1时, 由引理3可知, $ \forall P \in \Theta $, $ {P^{\text{T}}}AP $不是正整数对称矩阵. 当$ A $的对角线元素全为0时, 设$ B = A + {I_n} $. 由引理3可知, $ \forall P \in \Theta $, $ {P^{\text{T}}}BP $不是正整数对称矩阵. 因$ {P^{\text{T}}}BP = {P^{\text{T}}}AP + {I_n} $, 故$ \forall P \in \Theta $, $ {P^{\text{T}}}AP $不是非负整数对称矩阵. 当$ A $的对角线元素不全为0也不全为1时, 以下用归纳法证明: $ \forall P \in \Theta $, $ {P^{\text{T}}}AP $不是非负整数对称矩阵.
当$ n = 2 $时, 设
$$ A = \left[ {\begin{array}{*{20}{c}} {{\delta _1}}&a \\ a&{{\delta _2}} \end{array}} \right] ,\; P = \left[ {\begin{array}{*{20}{c}} {\cos \theta }&{\sin \theta } \\ { - \sin \theta }&{\cos \theta } \end{array}} \right] $$ 其中, $ {\delta _1},\;{\delta _2} \in \{ 0,\;1\} $, $ {\delta _1} + {\delta _2} = 1 $, $ a \ge 1 $为正整数, $ \theta \in {\bf{R}} $. 设$ {\vartheta _1} = \sin 2\theta $, $ {\vartheta _2} = \cos 2\theta $, $ C = {P^{\text{T}}}AP $, 可得
$$ C = \left[ {\begin{array}{*{20}{c}} {{{\sin }^2}\theta + {\delta _1}{\vartheta _2} - a{\vartheta _1}}&{({\delta _1} - 0.5){\vartheta _1} + a{\vartheta _2}} \\ {({\delta _1} - 0.5){\vartheta _1} + a{\vartheta _2}}&{{{\cos }^2}\theta - {\delta _1}{\vartheta _2} + a{\vartheta _1}} \end{array}} \right] $$ 当$ \theta \ne \pm k\pi $$ (k = 0,\;1,\;2,\; \cdots ) $时, $ P \in \Theta $, $ C $不是非负整数对称矩阵($ C $的元素中有负数或小数). 当$ P \in \Theta $时, 由定义9和引理4可知, 对一切2阶正交矩阵$ E \in \Phi $, $ Z \in {\rm T} $且$ Z \ne E{P^{ - 1}} $, 则: 1) $ {J_1} = ZP \in \Theta $, $ {J_2} = PZ \in \Theta $, $ {J_3} = {Z^{\text{T}}}PZ \in \Theta $; 2) $ J_1^{\text{T}}A{J_1} $, $ J_2^{\text{T}}A{J_2} $, $ J_3^{\text{T}}A{J_3} $均不是非负整数对称矩阵. 由此, 对一切2阶正交矩阵$ J \in \Theta $, $ {J^{\text{T}}}AJ $不是非负整数对称矩阵.
当$ n = 3 $时, 设
$$ A = \left[ {\begin{array}{*{20}{c}} {{\delta _1}}&{{a_1}}&{{a_2}} \\ {{a_1}}&{{\delta _2}}&{{a_3}} \\ {{a_2}}&{{a_3}}&{{\delta _3}} \end{array}} \right] ,\; P = \left[ {\begin{array}{*{20}{c}} \delta &0&0 \\ 0&{\cos \theta }&{\sin \theta } \\ 0&{ - \sin \theta }&{\cos \theta } \end{array}} \right] $$ 其中, $ {\delta _1},\;{\delta _2},\;{\delta _3} \in \{ 0,\;1\} $, $ 1 \le {\delta _1} + {\delta _2} + {\delta _3} \le 2 $, $ {a_i} \ge 1 $ $ (1 \le i \le 3) $为正整数, $ \delta = \pm 1 $, $ \theta \in {\bf{R}} $. 设$ {\vartheta _1} = \sin 2\theta $, $ {\vartheta _2} = \cos 2\theta $, $ \alpha (\theta ) = {a_1}\cos \theta - {a_2}\sin \theta $, $ \beta (\theta ) = {a_1}\sin \theta $ $ +{a_2}\cos \theta $, $ \eta = {\delta _2} - {\delta _3} $, $ \mu (\theta ) = \eta {\sin ^2}\theta $, $ C = {P^{\mathrm{T}}}AP $, 可得
$$ C = \left[ {\begin{array}{*{20}{c}} {{\delta _1}}&{\delta \alpha (\theta )}&{\delta \beta (\theta )} \\ {\delta \alpha (\theta )}&{{\delta _2} - \mu (\theta ) - {a_3}{\vartheta _1}}&{0.5\eta {\vartheta _1} + {a_3}{\vartheta _2}} \\ {\delta \beta (\theta )}&{0.5\eta {\vartheta _1} + {a_3}{\vartheta _2}}&{{\delta _3} + \mu (\theta ) + {a_3}{\vartheta _1}} \end{array}} \right] $$ 当$ \delta = 1 $且 $ \theta \ne \pm 2l\pi $$ (l = 0,\;1,\;2,\; \cdots ) $, 或者$ \delta = - 1 $且$ \theta \ne \pm h\pi $ ($ h $为奇数)时, $ P \in \Theta $, $ C $不是非负整数对称矩阵. 类似$ n = 2 $时的分析可得, 对一切3阶正交矩阵$ J \in \Theta $, $ {J^{\text{T}}}AJ $不是非负整数对称矩阵.
当$ n \ge 4 $时, 设
$$ A = \left[ {\begin{array}{*{20}{c}} {{A_{11}}}&{{A_{12}}}&{{A_{13}}} \\ {A_{12}^{\text{T}}}&{{A_{22}}}&{{A_{23}}} \\ {A_{13}^{\text{T}}}&{A_{23}^{\text{T}}}&{{A_{33}}} \end{array}} \right] ,\; {P_\theta } = \left[ {\begin{array}{*{20}{c}} {{I_s}}&{}&{} \\ {}&{ - {I_t}}&{} \\ {}&{}&{{H_\theta }} \end{array}} \right] $$ 其中, $ {A_{11}} \in {{\bf{R}}^{s \times s}} $、$ {A_{22}} \in {{\bf{R}}^{t \times t}} $和$ {A_{33}} \in {{\bf{R}}^{2k \times 2k}} $均是对角线元素为0或1而其他元素全是正整数的分块对称矩阵; $ {A_{12}} $, $ {A_{13}} $, $ {A_{23}} $均是分块正整数矩阵; $ A $的对角线元素之和满足$ 1 \le \sum\nolimits_i {{a_{ii}}} \le n - 1 $; $ {H_\theta } $为形如引理4中的矩阵, $ s + t + 2k = n $, $ {\theta _j} \in {\bf{R}} $$ (1 \le j \le k) $为实数. 由此,
$$ P_\theta ^{\text{T}}A{P_\theta } = \left[ {\begin{array}{*{20}{c}} {{A_{11}}}&{ - {A_{12}}}&{{A_{13}}{H_\theta }} \\ { - A_{12}^{\text{T}}}&{{A_{22}}}&{ - {A_{23}}{H_\theta }} \\ {H_\theta ^{\text{T}}A_{13}^{\text{T}}}&{ - H_\theta ^{\text{T}}A_{23}^{\text{T}}}&{H_\theta ^{\text{T}}{A_{33}}{H_\theta }} \end{array}} \right] $$ 1) 当$ s = n $, 或$ 1 \le s < n $, $ t = 0 $且所有的$ {\theta _j} = \pm 2l\pi $$ (l = 0,\;1,\;2,\; \cdots ) $, 或$ s = t = 0 $且所有的$ {\theta _j} = \pm 2l\pi $$ (l = 0,\;1,\;2,\; \cdots ) $时, $ {P_\theta } = {I_n} \in \Omega $.
2) 当$ t = n $, 或$ 1 \le t < n $, $ s = 0 $且所有的$ {\theta _j} = \pm h\pi $($ h $为奇数), 或$ t = s = 0 $且所有的$ {\theta _j} = \pm h\pi $($ h $为奇数)时, $ {P_\theta } = - {I_n} \in \Phi $.
3) 当$ s,\;t,\;k $和$ {\theta _j} $$ (1 \le j \le k) $的取值不是上述两种情况时, $ {P_\theta } \in \Theta $, $ P_\theta ^{\text{T}}A{P_\theta } $不是非负整数对称矩阵.
当$ P \in \Theta $时, 由定义9和引理4可知, 对一切$ n \ge 4 $阶正交矩阵$ E \in \Phi $, $ Z \in {T} $且$ Z \ne E{P^{ - 1}} $, 则: a) $ {J_1} = ZP \in \Theta $, $ {J_2} = PZ \in \Theta $, $ {J_3} = {Z^{\text{T}}}PZ \in \Theta $; b) $ J_1^{\text{T}}A{J_1} $, $ J_2^{\text{T}}A{J_2} $, $ J_3^{\text{T}}A{J_3} $均不是非负整数对称矩阵. 由此, 对一切$ n \ge 4 $阶正交矩阵$ J \in \Theta $, $ {J^{\text{T}}}AJ $不是非负整数对称矩阵.
综上可得, $ \forall n \ge 2 $, $ \forall P \in \Theta $, $ {P^{\text{T}}}AP $不是非负整数对称矩阵.
□ 此外, 不难证明, $ \forall n \ge 2 $, $ \forall Q \in \Phi $, $ {Q^{\text{T}}}AQ $是非负整数对称矩阵.
使用定义8中的符号$ {A_n} $和引理2, 可以得到如下推论.
推论2. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_2} = \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个无向图, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n \ge 2 $, $ A $与$ B $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, 则$ {G_1} \cong {G_2} $的充要条件是存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ A + {A_n} = {Q^{\text{T}}}(B + {A_n})Q $.
证明. 设$ A + {A_n} = {Q^{\text{T}}}(B + {A_n})Q $. 由定义3和引理1可知, 置换矩阵$ Q \in \Omega $$ (Q \ne {I_n}) $可表示为$ m $ ($ m \ge 2 $为正整数)个对换矩阵$ P({i_s},\;{j_s}) = {P_s} $的乘积, 即$ Q = P({i_1},\;{j_1}) \cdots P({i_m},\;{j_m}) = {P_1} \cdots {P_m}$. 此外, 不难验证, 任给对换矩阵$ {P_s} $, $ P_s^{\text{T}}{A_n}{P_s} = {A_n} $. 由此可得: $ {Q^{\text{T}}}{A_n}Q = P_m^{\text{T}} \cdots P_1^{\text{T}}{A_n}{P_1} \cdots {P_m} = {A_n} $; $ A\; + {A_n} = $$ {Q^{\text{T}}}(B + {A_n})Q = {Q^{\text{T}}}BQ + {A_n} $; $ A = {Q^{\text{T}}}BQ $. 再由引理2可得, $ {G_1} \cong {G_2} $.
设$ {G_1} \cong {G_2} $. 由引理2可知, 存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ A = {Q^{\text{T}}}BQ $. 由上述充分性证明可知, $ \forall Q \in \Omega $, $ {A_n} = {Q^{\text{T}}}{A_n}Q $. 由此, $ A + {A_n} = {Q^{\text{T}}}(B + {A_n})Q $.
□ 容易理解, 推论2适合一切无向图.
引理5[14]. 设$ C,\;B \in {{\bf{R}}^{n \times n}} $是对称矩阵, 则$ {f_\lambda }(C) = {f_\lambda }(B) $的充要条件是存在$ n $阶正交矩阵$ P \in {T} $, 使得$ C = {P^{\text{T}}}BP $.
基于前面的分析和准备, 下面给出两个无向图的同构判定条件.
定理2. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_2} = \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个无向图, 每个顶点最多有一个自环, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n \ge 2 $, $ {A_1} $与$ {A_2} $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, 则$ {G_1} \cong {G_2} $的充要条件是$ {f_\lambda }({A_1} + {A_n}) = {f_\lambda }({A_2} + {A_n}) $.
证明. 设$ {f_\lambda }({A_1} + {A_n}) = {f_\lambda }({A_2} + {A_n}) $. 给$ {G_1} $和$ {G_2} $中的每两个顶点之间加一条边, 可以得到两个新的无向图$ {\hat G_1} $和$ {\hat G_2} $, 其邻接矩阵分别是$ {A_1} + {A_n} $和$ {A_2} + {A_n} $. 因$ {G_1} $和$ {G_2} $的顶点最多有一个自环, 由定义2可知, $ {A_1} $和$ {A_2} $的对角线元素为0或1 (可以全为0, 也可全为1); 再由定义8可知, $ {A_1} + {A_n} $和$ {A_2} + {A_n} $均是对角线元素为0或1而其他元素均是正整数的对称矩阵, 即$ {A_1} + {A_n} $和$ {A_2} + {A_n} $均是非负整数对称矩阵. 由引理5可知, 当$ {f_\lambda }({A_1} + {A_n}) = {f_\lambda }({A_2} + {A_n}) $时, 存在正交矩阵$ Q \in { T} $, 使得$ {A_1} \;+ {A_n} = {Q^{\text{T}}}({A_2} + {A_n})Q $. 由定理1可知, $ Q \notin \Theta $; 否则, $ {A_1} + {A_n} $将不是非负整数矩阵. 因$ Q \in { T} = \Phi \cup \Theta $且$ Q \notin \Theta $, 故$ Q \in \Phi $. 由此, 存在$ Q \in \Omega $ (或$ - Q \in \Omega $), 使得$ {A_1} + {A_n} = {Q^{\text{T}}}({A_2} + {A_n})Q $; 再由推论2可知, $ {G_1} \cong {G_2} $.
设$ {G_1} \cong {G_2} $. 因$ {G_1} \cong {G_2} $, 故存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ {A_1} = {Q^{\text{T}}}{A_2}Q $. 由推论2的证明结果可知, $ {A_n} = {Q^{\text{T}}}{A_n}Q $. 由此, $ {A_1} + {A_n} = $$ {Q^{\text{T}}}({A_2} + {A_n})Q $, $ {f_\lambda }({A_1} + {A_n}) = {f_\lambda }({A_2} + {A_n}) $.
□ 需要说明的是: 1) 定理2既适合复杂无向图也适合简单无向图, 既适合连通无向图也适合不连通无向图; 一言以蔽之, 定理2适合一切无向图. 2) 因求解特征多项式$ {f_\lambda }(A) $的算法复杂度是$ {\mathrm{O}}({n^3}) $[16−17], 故使用定理2判定两个无向图是否同构的算法复杂度是$ 2{\mathrm{O}}({n^3}) $.
引理6[10]. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_{\text{2}}} = \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个简单无向连通图, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n \ge {\text{2}} $, $ {D_1} $与$ {D_2} $分别是$ {G_1} $和$ {G_2} $的距离矩阵, 则$ {G_1} \cong {G_2} $的充要条件是$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $.
引理7[18]. 设$ C,\;B \in {{\bf{R}}^{n \times n}} $为对称矩阵, 对一切$ 1 \le i \le n $, $ {\lambda _i}(C) $为$ C $的特征值, $ {\lambda _i}(B) $为$ B $的特征值, 则$ \min {\lambda _i}(B) + {\lambda _i}(C) \le {\lambda _i}(C + B) $$ \le {\lambda _i}(C) \;+ \max {\lambda _i}(B) $.
设$ G = \left\langle {V,\;E} \right\rangle $是复杂无向连通图, $ V = \{ {v_1}, {v_2},\; \cdots ,\;{v_n}\} $, $ n \ge 2 $: 1) 除去$ G $中顶点上的自环和邻接顶点间的重边(邻接顶点间仅保留一条边), 可以得到一个简单无向连通图$ {G_1} $(称$ {G_1} $为$ G $的主图). 2) $ \forall i \ne j $, 若$ {v_i} $和$ {v_j} $邻接, 除去$ {v_i} $和$ {v_j} $之间的一条边, 其他保持不变, 可以得到另一个无向图$ {G_2} $(称$ {G_2} $为$ G $的附图). 3) 设$ A $为$ G $的邻接矩阵, $ {A_1} $和$ {A_2} $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, $ D $为$ G $的距离矩阵. 由上述假设可知, $ A = {A_1} + {A_2} $. 因复杂无向图中的自环和顶点间的重边对距离没有影响, 由定义6和定义7可知, $ D $既是$ G $也是$ {G_1} $的距离矩阵.
基于以上的叙述和讨论, 本文给出两个复杂无向图同构的另一个判定条件.
定理3. 设$ {G_{\text{1}}} = \left\langle {{V_{\text{1}}},\;{E_{\text{1}}}} \right\rangle $和$ {G_{\text{2}}} = $$ \left\langle {{V_{\text{2}}},\;{E_{\text{2}}}} \right\rangle $是两个复杂无向连通图, 每个顶点最多有一个自环, $ \left| {{V_1}} \right| = \left| {{V_2}} \right| = n \ge {\text{2}} $, $ {A_1} $与$ {A_2} $分别是$ {G_1} $和$ {G_2} $的邻接矩阵, $ {D_1} $与$ {D_2} $分别是$ {G_1} $和$ {G_2} $的距离矩阵. 则$ {G_1} \cong {G_2} $的充要条件是$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $且$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $.
证明. 设$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $且$ {f_\lambda }({A_1}) = $$ {f_\lambda }({A_2}) $. 另设$ {G_{11}} $与$ {G_{12}} $分别是$ {G_1} $的主图和附图, $ {A_{11}} $与$ {A_{12}} $$ ({A_{12}} \ne 0) $分别是$ {G_{11}} $和$ {G_{12}} $的邻接矩阵; $ {G_{21}} $与$ {G_{22}} $分别是$ {G_2} $的主图和附图, $ {A_{21}} $与$ {A_{22}} $$ ({A_{22}} \ne 0) $分别是$ {G_{21}} $和$ {G_{22}} $的邻接矩阵. 由此, 可得: $ {A_1} = {A_{11}} + {A_{12}} $, $ {A_2} = {A_{21}} + {A_{22}} $; $ {D_1} $既是$ {G_1} $也是$ {G_{11}} $的距离矩阵, $ {D_2} $既是$ {G_2} $也是$ {G_{21}} $的距离矩阵. 由引理6可知, 当$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $时, $ {G_{11}} \cong {G_{21}} $; 再由引理2可知, 存在$ Q \in \Omega $, 使得$ {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $. 因$ {A_1} $和$ {A_2} $均是实对称矩阵, 且$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $, 由引理5可知, 存在$ n $阶正交矩阵$ P \in { T} $, 使得$ {A_1} = {P^{\text{T}}}{A_2}P $, 即$ {A_{11}} + {A_{12}} = {P^{\text{T}}}{A_{21}}P + {P^{\text{T}}}{A_{22}}P $. 综上可知, 当$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $且$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $时
$$ {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $$ (1) 且
$$ {A_{11}} + {A_{12}} = {P^{\text{T}}}{A_{21}}P + {P^{\text{T}}}{A_{22}}P$$ (2) 设$ {A_{12}} = {P^{\text{T}}}{A_{22}}P $, 由式(1)和式(2)可得, $ {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $, $ {A_{11}} = {P^{\text{T}}}{A_{21}}P $, 由此, $ P = Q $. 另由式(2)可得, $ {A_{11}} = {P^{\text{T}}}{A_{21}}P + {P^{\text{T}}}{A_{22}}P - {A_{12}} $.
1) 设$ {H_1} = {P^{\text{T}}}{A_{21}}P $, $ {H_2} = {P^{\text{T}}}{A_{22}}P - {A_{12}} $, 则
$${A_{11}} = {H_1} + {H_2} $$ (3) 因$ {H_1} $和$ {H_2} $均是实对称矩阵且$ \lambda ({H_1}) = \lambda ({A_{21}}) $. 由式(3)和引理7可得
$$ \begin{split} & \min {\lambda _i}({H_2}) + {\lambda _i}({A_{21}}) \le {\lambda _i}({A_{11}}) \le\\& \qquad{\lambda _i}({A_{21}}) +\max {\lambda _i}({H_2}) \end{split} $$ (4) 2) 设$ {A_{12}} \ne {P^{\text{T}}}{A_{22}}P $, 则$ {H_2} \ne 0 $. 因$ {H_2} $是对称矩阵, 故当$ {H_2} \ne 0 $时, $ \lambda ({H_2}) \ne 0 $. 设$ \min {\lambda _i}({H_2}) = \max {\lambda _i}({H_2}) = h $, 由式(4)可得, $ {\lambda _i}({A_{11}}) = {\lambda _i}({A_{21}}) \;+ h $. 若$ \lambda ({A_{11}}) = \lambda ({A_{21}}) $, 则$ h = 0 $, $ \lambda ({H_2}) = 0 $, $ {A_{12}} = {P^{\text{T}}}{A_{22}}P $, 与假设矛盾; 若$ \lambda ({A_{11}}) \ne \lambda ({A_{21}}) $, 则与式(1)矛盾. 设$ {\lambda _i}({A_{11}}) \le $$ {\lambda _i}({A_{21}}) + \max {\lambda _i}({H_2})\; ({\lambda _i}({A_{11}}) \ge {\lambda _i}({A_{21}}) + \min {\lambda _i}({H_2})) $, 若$ \lambda ({A_{11}}) \ne \lambda ({A_{21}}) $, 则与$ {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $矛盾; 若$ \lambda ({A_{11}}) = \lambda ({A_{21}}) $, 则由引理5可得, $ {A_{11}} = {P^{\text{T}}}{A_{21}}P $$ (P \in { T}) $. 由此, ${A_{11}} = {P^{\text{T}}}{A_{21}}P,\; {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $, $ P = Q $. 而当$ P = Q $时, 由式(1)和式(2)可得, $ {A_{12}} = {P^{\text{T}}}{A_{22}}P $, 与$ {A_{12}} \ne {P^{\text{T}}}{A_{22}}P $的假设矛盾. 总之, $ {A_{12}} \ne {P^{\text{T}}}{A_{22}}P $的假设不成立.
综上可知: 当$ {A_{12}} = {P^{\text{T}}}{A_{22}}P $时, $ P = Q $; 由式(2)可得$ {A_1} = {Q^{\text{T}}}{A_2}Q $, 再由引理2可得, $ {G_1} \cong {G_2} $.
设$ {G_1} \cong {G_2} $. 由引理2可知, 存在$ n $阶置换矩阵$ Q \in \Omega $, 使得$ {A_1} = {Q^{\text{T}}}{A_2}Q $. 因$ {G_1} $和$ {G_2} $均是复杂无向连通图, 如充分性证明可设, $ {A_1} = {A_{11}} + {A_{12}} $, $ {A_2} = {A_{21}} + {A_{22}} $, 由此, $ {A_{11}} + {A_{12}} = {Q^{\text{T}}}({A_{21}} + {A_{22}})Q $. 因$ Q $是正交矩阵, 故$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $. 设$ {A_{11}} \ne {Q^{\text{T}}}{A_{21}}Q $, 则简单无向连通图$ {G_{11}} $和$ {G_{21}} $不同构, 进而可得$ {G_1} $和$ {G_2} $不同构, 与假设矛盾. 当$ {A_{11}} = {Q^{\text{T}}}{A_{21}}Q $时, 由引理2可知, $ {G_{11}} \cong {G_{21}} $; 再由引理6可得, $ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $. 综上, 当$ {G_1} \cong {G_2} $时, $ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $且$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $.
□ 比较引理6和定理3可知, 简单无向连通图的同构条件不同于复杂无向连通图的同构条件.
由定理3的证明过程可知, 当定理3中的$ {G_1} $和$ {G_2} $均是简单无向连通图时, $ {G_1} = {G_{11}} $, $ {G_2} = {G_{21}} $, $ {A_{12}} = {A_{22}} = 0 $, $ {A_1} = {A_{11}} $, $ {A_2} = {A_{21}} $. 由引理6可知: 当$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $时, $ {G_1} \cong {G_2} $; 再由引理2可知, 存在$ Q \in \Omega $, 使得$ {A_1} = {Q^{\text{T}}}{A_2}Q $, 进而可得$ {f_\lambda }({A_1}) = {f_\lambda }({A_2}) $. 由此, 当$ {G_1} $和$ {G_2} $均是简单无向连通图时, 定理3中的条件可简化为$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $; 定理3退化为引理6. 这表明定理3也适合简单无向连通图.
因为求解距离矩阵$ D $的算法复杂度是$ {\mathrm{O}}({n^3}) $[12−13], 求解特征多项式的算法复杂度是$ {\mathrm{O}}({n^3}) $[16−17], 故定理3判定条件的算法复杂度是$ 4{\mathrm{O}}({n^3}) $.
设$ {G_1} $和$ {G_2} $是两个复杂无向不连通图且分别由$ m $个连通子图$ {G_{ij}} $$ (i = 1,\;2;{\text{ }}1 \le j \le m) $组成, $ {G_1} $与$ {G_2} $同构是指$ {G_1} $中的连通子图$ {G_{1j}} $与$ {G_2} $中的连通子图$ {G_{2j}} $一一对应同构. 不难理解, 将定理3用于复杂无向不连通图的各个连通子图, 就可解决复杂无向不连通图的同构判定问题.
比较定理2和定理3可知: 1) 定理2适合一切无向图, 而定理3仅适合复杂无向连通图; 2) 若将定理2限定在复杂无向连通图上, 则定理2与定理3等价; 3) 就一般复杂无向图的同构判定问题而言, 定理2比定理3具有更低的算法复杂度, 因此也更便于实际应用.
1) $ {G_1} $和$ {G_2} $均是复杂无向连通图. 设$ {G_1} $和$ {G_2} $的邻接矩阵分别是$ {A_{11}} $和$ {A_{12}} $, 距离矩阵分别是$ {D_1} $和$ {D_2} $. 按图中顶点标号, 经计算可得
$$ {A_{11}} = \left[ {\begin{array}{*{20}{c}} 1&1&1 \\ 1&1&1 \\ 1&1&1 \end{array}} \right] ,\; {A_{12}} = \left[ {\begin{array}{*{20}{c}} 1&1&1 \\ 1&0&2 \\ 1&2&0 \end{array}} \right] $$ $$ {D_1} = {D_2} = \left[ {\begin{array}{*{20}{c}} 0&1&1 \\ 1&0&1 \\ 1&1&0 \end{array}} \right] $$ $$ {f_\lambda }({A_{11}} + {A_3}) = {\lambda ^3} - 3{\lambda ^2} - 9\lambda - 5\qquad\qquad $$ $$ {f_\lambda }({A_{12}} + {A_3}) = {\lambda ^3} - {\lambda ^2} - 17\lambda - 15 \qquad\quad\;\;$$ $$ {f_\lambda }({A_{11}}) = {\lambda ^3} - 3{\lambda ^2}, {f_\lambda }({A_{12}}) = {\lambda ^3} - {\lambda ^2} - 6\lambda$$ 其中, $ {A_3} $是3顶点无向完全图的邻接矩阵.
因$ {f_\lambda }({A_{11}} + {A_3}) \ne {f_\lambda }({A_{12}} + {A_3}) $, 由定理2可以判定$ {G_1} $和$ {G_2} $不同构. 因$ {f_\lambda }({D_1}) = {f_\lambda }({D_2}) $, 但$ {f_\lambda }({A_{11}}) \ne {f_\lambda }({A_{12}}) $, 由推论1和定理3均可判定$ {G_1} $和$ {G_2} $不同构.
2) $ {G_3} $和$ {G_4} $均是复杂无向连通图. 设$ {G_3} $的邻接矩阵和距离矩阵分别是$ {A_{31}} $和$ {D_3} $, $ {G_4} $的邻接矩阵和距离矩阵分别是$ {A_{41}} $和$ {D_4} $. 按图中顶点标号, 经计算可得
$$ {A_{31}} = {A_{41}} = \left[ {\begin{array}{*{20}{c}} 1&0&0&0&0&1&1&1 \\ 0&0&0&0&2&0&1&1 \\ 0&0&0&1&0&1&0&1 \\ 0&0&1&0&1&0&1&0 \\ 0&2&0&1&0&1&0&0 \\ 1&0&1&0&1&0&0&0 \\ 1&1&0&1&0&0&0&0 \\ 1&1&1&0&0&0&0&0 \end{array}} \right] $$ $$ {D_3} = {D_4} = \left[ {\begin{array}{*{20}{c}} 0&2&2&2&2&1&1&1 \\ 2&0&2&2&1&2&1&1 \\ 2&2&0&1&2&1&2&1 \\ 2&2&1&0&1&2&1&2 \\ 2&1&2&1&0&1&2&2 \\ 1&2&1&2&1&0&2&2 \\ 1&1&2&1&2&2&0&2 \\ 1&1&1&2&2&2&2&0 \end{array}} \right] $$ 设$ {A_8} $是8顶点无向完全图的邻接矩阵. 因$ {f_\lambda }({A_{31}} + {A_8}) = {f_\lambda }({A_{41}} + {A_8}) $, 由定理2可以判定$ {G_3} \cong {G_4} $. 因$ {f_\lambda }({D_3}) = {f_\lambda }({D_4}) $且$ {f_\lambda }({A_{31}}) = $$ {f_\lambda }({A_{41}}) $, 故由定理3亦可判定$ {G_3} \cong {G_4} $.
3) $ {G_5} $和$ {G_6} $均是复杂无向连通图. 设$ {G_5} $的邻接矩阵和距离矩阵分别是$ {A_{51}} $和$ {D_5} $, $ {G_6} $的邻接矩阵和距离矩阵分别是$ {A_{61}} $和$ {D_6} $. 按图中顶点标号, 经计算可得
$$ {A_{51}} = {A_{61}} = \left[ {\begin{array}{*{20}{c}} 1&0&0&1&1&1 \\ 0&0&0&1&1&1 \\ 0&0&0&1&1&2 \\ 1&1&1&0&0&0 \\ 1&1&1&0&0&0 \\ 1&1&2&0&0&0 \end{array}} \right] $$ $$ {D_5} = {D_6} = \left[ {\begin{array}{*{20}{c}} 0&2&2&1&1&1 \\ 2&0&2&1&1&1 \\ 2&2&0&1&1&1 \\ 1&1&1&0&2&2 \\ 1&1&1&2&0&2 \\ 1&1&1&2&2&0 \end{array}} \right] $$ 设$ {A_6} $是6顶点无向完全图的邻接矩阵. 因$ {f_\lambda }({A_{51}} + {A_6}) = {f_\lambda }({A_{61}} + {A_6}) $, 由定理2可以判定$ {G_5} \cong {G_6} $. 因$ {f_\lambda }({A_{51}}) = {f_\lambda }({A_{61}}) $且$ {f_\lambda }({D_5}) = $$ {f_\lambda }({D_6}) $, 由定理3亦可判定$ {G_5} \cong {G_6} $.
4) $ {G_7} $和$ {G_8} $均是无向树. 设$ {G_7} $和$ {G_8} $的邻接矩阵分别是$ {A_{71}} $和$ {A_{81}} $, 距离矩阵分别是$ {D_7} $和$ {D_8} $. 按图中顶点标号, 经计算可得
$$ {A_{71}} = \left[ {\begin{array}{*{20}{c}} 0&1&1&1&1&0&0&0 \\ 1&0&0&0&0&1&1&1 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 0&1&0&0&0&0&0&0 \\ 0&1&0&0&0&0&0&0 \\ 0&1&0&0&0&0&0&0 \end{array}} \right] \; $$ $$ {A_{81}} = \left[ {\begin{array}{*{20}{c}} 0&1&1&1&1&1&0&0 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 1&0&0&0&0&0&1&0 \\ 0&0&0&0&0&1&0&1 \\ 0&0&0&0&0&0&1&0 \end{array}} \right] $$ $$ {D_7} = \left[ {\begin{array}{*{20}{c}} 0&1&1&1&1&2&2&2 \\ 1&0&2&2&2&1&1&1 \\ 1&2&0&2&2&3&3&3 \\ 1&2&2&0&2&3&3&3 \\ 1&2&2&2&0&3&3&3 \\ 2&1&3&3&3&0&2&2 \\ 2&1&3&3&3&2&0&2 \\ 2&1&3&3&3&2&2&0 \end{array}} \right] $$ $$ {D_8} = \left[ {\begin{array}{*{20}{c}} 0&1&1&1&1&1&2&3 \\ 1&0&2&2&2&2&3&4 \\ 1&2&0&2&2&2&3&4 \\ 1&2&2&0&2&2&3&4 \\ 1&2&2&2&0&2&3&4 \\ 1&2&2&2&2&0&1&2 \\ 2&3&3&3&3&1&0&1 \\ 3&4&4&4&4&2&1&0 \end{array}} \right] $$ 设$ {A_8} $是8顶点无向完全图的邻接矩阵, 可得$ \det ({A_{71}} + {A_8}) = 17 $, $ \det ({A_{81}} + {A_8}) = 21 $. 由此, $ {f_\lambda }({A_{71}} + {A_8}) \ne {f_\lambda }({A_{81}} + {A_8}) $, 由定理2可以判定$ {G_7} $和$ {G_8} $不同构. 另外, 还可求得: $ {f_\lambda }({A_{71}}) = {f_\lambda }({A_{81}}) = {\lambda ^8} - 7{\lambda ^6} + 9{\lambda ^4} $; $ \det ({D_7}) = $$- 1\,048$, $\det ({D_8}) = 1\,600$. 因$ \det ({D_7}) \ne \det ({D_8}) $, 故$ {f_\lambda }({D_7}) \ne {f_\lambda }({D_8}) $. 由此, $ {f_\lambda }({A_{71}}) = {f_\lambda }({A_{81}}) $, 但$ {f_\lambda }({D_7}) \ne {f_\lambda }({D_8}) $, 由定理3可以判定$ {G_7} $和$ {G_8} $不同构.
3. 结束语
图的同构关系是一种等价关系, 凡与图的结构相关的分类、聚类、识别和学习等问题均与图的同构判定问题有关. 时至今日, 图的同构判定问题仍然具有重要的理论和应用价值.
文献[10]将基于邻接矩阵的同构判定条件(引理2)推广到简单无向图距离矩阵(引理6和引理7), 解决了简单无向图的同构判定问题. 但引理6和引理7不能用于复杂无向图的同构判定, 原因在于复杂无向图的同构关系不能由其距离矩阵唯一确定.
本文的主要思路和贡献可概括为: 1) 证明了对角线元素为0或1而其他元素均为正整数的对称矩阵在非同构正交变换下不再是非负整数对称矩阵(定理1); 利用无向完全图邻接矩阵在矩阵同构变换下保持不变的特性, 给出了引理2的另一种等价表示(推论2); 基于定理1和推论2, 给出了基于邻接矩阵之和的特征多项式判定条件(定理2). 2) 针对复杂无向连通图的同构判定问题, 使用图及邻接矩阵的分解方法, 给出了基于邻接矩阵特征多项式和距离矩阵特征多项式的同构判定条件(定理3). 将该条件用于复杂无向不连通图的各个连通子图, 就可解决复杂无向不连通图的同构判定问题. 定理2和定理3中的判定条件均是充要条件且均具有多项式时间复杂度. 需要再次说明的是: 定理2所给的判定条件具有一般普适性, 即对任意的简单、复杂(每一顶点最多允许有一个自环)、连通和不连通无向图均适用; 定理3既适合复杂无向连通图也适合简单无向连通图.
与文献[10]中的结果相比, 定理2和定理3是无向图同构研究方面的又一重要进展. 定理2和定理3的另一理论价值表明, 无向图的同构判定问题是 P 问题. 需要说明的是, 虽然我们解决了无向图的同构判定问题, 但有向图的同构判定是 P 问题还是 NP 问题仍然没有得到解决.
今后我们将针对有向图的同构判定问题开展研究, 期望得到一些有理论和实用价值的新结果.
-
表 1 多节点数据缺失补偿结果 (×10−5)
Table 1 Multi-node data imputation results (×10−5)
补偿节点 MAE MSE MPE 电节点9 1.4852 1.4948 1.4136 电节点12 1.5093 1.5188 1.4418 气节点7 1.5250 1.5362 2.1993 表 2 不同数量的缺失数据补偿结果 (×10−5)
Table 2 Imputation results of different numbers of missing data (×10−5)
缺失数量 MAE MSE MPE 1 1.5022 1.4926 1.5008 3 1.5190 1.5205 1.5063 5 1.5183 1.5194 1.5253 7 1.5852 1.5933 1.5757 9 1.6232 1.6201 1.6193 表 3 不同方法补偿结果对比 (×10−5)
Table 3 Comparison of different data imputation methods (×10−5)
补偿方法 MAE MSE MPE CNN 2.3248 2.3003 2.2741 DAE 2.2428 2.1892 2.1505 DCGAN 1.9255 1.8864 1.8469 DCGAN-L1 1.8421 1.7605 1.7844 Pix2Pix 1.7274 1.6148 1.6303 本文方法 1.5934 1.4835 1.4492 表 4 不同节点的状态判断结果(%)
Table 4 State judgment results of different nodes (%)
变化节点 (0, 1%) (1%, 2%) (2%, 3%) (3%, 4%) (4%, 5%) 电节点17 0 60 100 100 100 电节点21 0 70 100 100 100 热节点18 0 70 100 100 100 热节点30 0 70 100 100 100 -
[1] 孙秋野, 滕菲, 张化光. 能源互联网及其关键控制问题. 自动化学报, 2017, 42(2): 176−194Sun Qiu-Ye, Teng Fei, Zhang Hua-Guang. Energy internet and its key control issues. Acta Automatica Sinica, 2017, 42(2): 176−194 [2] Heinen S, Burke D, O'Malley M. Electricity, gas, heat integration via residential hybrid heating technologies — an investment model assessment. Energy, 2016, 109: 906−919 doi: 10.1016/j.energy.2016.04.126 [3] Sun H B, Guo Q L, Zhang B M, Wu W C, Wang B, Shen X W, Wang J H. Integrated energy management system: concept, design, and demonstration in China. IEEE Electrification Magazine, 2018, 6(2): 42−40 doi: 10.1109/MELE.2018.2816842 [4] Hibbard P J, Schatzki T. The interdependence of electricity and natural gas: Current factors and future prospects. Electricity Journal, 2012, 25(4): 6−17 doi: 10.1016/j.tej.2012.04.012 [5] Fairley P. The troubled link between gas and electricity grids. IEEE Spectrum, 2016, 53(6): 11−12 doi: 10.1109/MSPEC.2016.7473135 [6] 王平, 王尧. 台湾大停电的“锅”谁来背. 两岸关系, 2017, (9): 30−30 doi: 10.3969/j.issn.1006-5679.2017.09.008Wang Ping, Wang Yao. Taiwan power failure “pot” who will carry. Cross-Strait Relations, 2017, (9): 30−30 doi: 10.3969/j.issn.1006-5679.2017.09.008 [7] Augutis J, Krikštolaitis R, Martišauskas L, Pečiulytė S, Žutautaitė I. Integrated energy security assessment. Energy, 2017, 109: 890−901 [8] Wang D, Liu L, Jia H J, Wang W L, Zhi Y Q, Meng Z J, Zhou B Y. Review of key problems related to integrated energy distribution systems. CSEE Journal of Power and Energy Systems, 2018, 4(2): 130−145 doi: 10.17775/CSEEJPES.2018.00570 [9] 陈胜, 卫志农, 孙国强, 王丹, 臧海祥. 电−气互联综合能源系统安全分析与优化控制研究综述. 电力自动化设备, 2019, 39(8): 3−11Chen Sheng, Wei Zhi-Nong, Sun Guo-Qing, Wang Dan, Zang Hai-Yang. Review on security analysis and optimal control of electricity-gas integrated energy system. Electric Power Automation Equipment, 2019, 39(8): 3−11 [10] 董今妮, 孙宏斌, 郭庆来, 盛同天, 乔铮. 面向能源互联网的电−气耦合网络状态估计技术. 电网技术, 2018, 42(2): 400−408Dong Jin-Ni, Sun Hong-Bin, Guo Qing-Lai, Sheng Tong-Tian, Qiao Zheng. State estimation of combined electric-gas networks for energy internet. Power System Technology, 2018, 42(2): 400−408 [11] 陈艳波, 郑顺林, 杨宁, 杨晓楠, 刘铠诚. 基于加权最小绝对值的电−气综合能源系统抗差状态估计. 电力系统自动化, 2019, 43(13): 61−74 doi: 10.7500/AEPS20180428003Chen Yan-Bo, Zheng Shun-Lin, Yang Ning, Yang Xiao-Nan, Liu Kai-Cheng. Robust state estimation of electric-gas integrated energy system based on weighted least absolute value. Automation of Electric Power Systems, 2019, 43(13): 61−74 doi: 10.7500/AEPS20180428003 [12] Du Y X, Zhang W, Zhang T T. ADMM-based distributed state estimation for integrated energy system. CSEE Journal of Power and Energy Systems, 2019, 5(2): 275−283 [13] Liu Y B, Su Y C, Xiang Y, Liu J Y, Wang L F, Xu W T. Operational reliability assessment for gas-electric integrated distribution feeders. IEEE Transactions on Smart Grid, 2019, 10(1): 1091−1100 doi: 10.1109/TSG.2018.2844309 [14] Zhou K L, Fu C, Yang S L. Big data driven smart energy management: from big data to big insights. Renewable and Sustainable Energy Reviews, 2016, 56: 215−225 doi: 10.1016/j.rser.2015.11.050 [15] 孙秋野, 杨凌霄, 张化光. 智慧能源—人工智能技术在电力系统中的应用与展望. 控制与决策, 2018, 33(5): 938−949Sun Qiu-Ye, Yang Ling-Xiao, Zhang Hua-Guang. Smart energy-applications and prospects of artificial intelligence technology in power system. Control and Decision, 2018, 33(5): 938−949 [16] He X, Qiu R C, Chu L, Ai Q, Ling Z N, Zhang J. Invisible units detection and estimation based on random matrix theory. IEEE Transactions on Power Systems, 2020, 35(3): 1846−1855 doi: 10.1109/TPWRS.2019.2935739 [17] Huang T E, Guo Q L, Sun H B, Tan C W, Hu T Y. A deep spatial-temporal data-driven approach considering microclimates for power system security assessment. Applied Energy, 2019, 237: 36−48 doi: 10.1016/j.apenergy.2019.01.013 [18] Li M S, Deng W M, Xiahou K S, Ji T Y, Wu Q H. A data-driven method for fault detection and isolation of the integrated energy-based district heating system. IEEE Access, 2020, 8: 23787−23801 doi: 10.1109/ACCESS.2020.2970273 [19] Liu J H, Qu F M, Hong X W, Zhang H G. A small-sample wind turbine fault detection method with synthetic fault data using generative adversarial nets. IEEE Transactions on Industrial Informatics, 2019, 15(7): 3877−3888 doi: 10.1109/TII.2018.2885365 [20] Shi X, Qiu R, Mi T B, He X, Zhu Y L. Adversarial feature learning of online monitoring data for operational risk assessment in distribution networks. IEEE Transactions on Power Systems, 2020, 35(2): 975−985 doi: 10.1109/TPWRS.2019.2941162 [21] Ghahramani Z. Supervised learning from incomplete data via an EM approach. Advances in Neural Information Processing Systems, 1984, 6: 120−127 [22] Xie K, Wang X, Liu X L, Wen J G, Cao J N. Interference-aware cooperative communication in multi-radio multi-channel wireless networks. IEEE Transactions on Computers, 2016, 65(5): 1528−1542 doi: 10.1109/TC.2015.2448089 [23] Chen H B, Grant-Muller S, Mussone L, Montgomery F. A study of hybrid neural network approaches and the effects of missing data on traffic forecasting. Neural Computing and Applications, 2001, 10(3): 277−286 [24] Jaques N, Taylor S, Sano A, Picard R. Multimodal autoencoder: a deep learning approach to filling in missing sensor data and enabling better mood prediction. In: Proceedings of the 2017 International Conference on Affective Computing and Intelligent Interaction, San Antonio, TX, USA: IEEE, 2017. 202−208 [25] Zhuang Y F, Ke R M, Wang Y H. Innovative method for traffic data imputation based on convolutional neural network. IET Intelligent Transport Systems, 2019, 13(4): 605−613 doi: 10.1049/iet-its.2018.5114 [26] 王守相, 陈海文, 潘志新, 王建明. 采用改进生成式对抗网络的电力系统量测缺失数据重建方法. 中国电机工程学报, 2019, 39(1): 56−64Wang Shou-Xiang, Chen Hai-Wen, Pan Zhi-Xin, Wang Jian-Ming. A reconstruction method for missing data in power system measurement using an improved generative adversarial network. Proceedings of the CSEE, 2019, 39(1): 56−64 [27] Ren C, Xu Y. A fully data-driven method based on generative adversarial networks for power system dynamic security assessment with missing data. IEEE Transactions on Power Systems, 2019, 34(6): 5044−5052 doi: 10.1109/TPWRS.2019.2922671 [28] Li Y C, Wang Y Y, Hu S Y. Online generative adversary network based measurement recovery in false data injection attacks: A cyber-physical approach. IEEE Transactions on Industrial Informatics, 2020, 16(3): 2031−2043 doi: 10.1109/TII.2019.2921106 [29] Qu F M, Liu J H, Ma Y J, Zang D, Fu M R. A novel wind turbine data imputation method with multiple optimizations based on GANs. Mechanical Systems and Signal Processing, 2020, 139: Article 106610 doi: 10.1016/j.ymssp.2019.106610 [30] Goodfellow I J, Pougetabadie J, Mirza M. Generative adversarial networks. Advances in Neural Information Processing Systems, 2014, 3: 2672−2680 [31] 王坤峰, 苟超, 段艳杰, 林懿伦, 郑心湖, 王飞跃. 生成式对抗网络GAN的研究进展与展望. 自动化学报, 2017, 43(3): 321−332Wang Kun-Feng, Gou Chao, Duan Yan-Jie, Lin Yi-Lun, Zheng Xin-Hu, Wang Fei-Yue. Generative adversarial networks: The state of the art and beyond. Acta Automatica Sinica, 2017, 43(3): 321−332 [32] 刘建伟, 谢浩杰, 罗雄麟. 生成对抗网络在各领域应用研究进展. 自动化学报, 2020, DOI: 10.16383/j.aas.c180831Liu Jian-Wei, Xie Hao-Jie, Luo Xiong-Lin. Research progress on application of generative adversarial networks in various fields. Acta Automatica Sinica, 2020, DOI: 10.16383/j.aas.c180831 [33] 孙秋野, 胡旌伟, 杨凌霄, 张化光. 基于GAN技术的自能源混合建模与参数辨识方法. 自动化学报, 2018, 44(5): 901−914Sun Qiu-Ye, Hu Jing-Wei, Yang Ling-Xiao, Zhang Hua-Guang. We-energy hybrid modeling and parameter identification with GAN technology. Acta Automatica Sinica, 2018, 44(5): 901−914 [34] Mirza M, Osindero S. Conditional generative adversarial nets. arXiv preprint arXiv: 1411.1784, 2014. [35] Isola P, Zhu J Y, Zhou T H, Efros A A. Image-to-image translation with conditional adversarial networks. In: Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1125−1134 [36] 黄雨佳, 孙秋野, 王睿, 黄博南. 面向综合能源系统的静态电压稳定性分析. 中国电机工程学报, 2019, 39(s): 44−53Huang Yu-Jia, Sun Qiu-Ye, Wang Rui, Huang Bo-Nan. Static voltage stability analysis for integrated energy system. Proceedings of the CSEE, 2019, 39(s): 44−53 [37] Ronneberger O, Fischer P, Brox T. U-net: Convolutional networks for biomedical image segmentation. In: Proceedings of the 2015 International Conference on Medical Image Computing and Computer-assisted Intervention. Springer, Cham, 2015. 234−241 -