# 同配性

## 同配性计算

### 余平均度

${\displaystyle (k)=\sum _{k'=k_{min}}^{k_{max}}k'P_{c}(k'|k)={\frac {1}{q_{k}}}\sum _{k'=k_{min}}^{k_{max}}k'e_{kk'}}$

${\displaystyle (k)={\frac {\sum _{j}je_{jk}}{\sum _{j}e_{jk}}}={\frac {\sum _{j}jq_{j}q_{k}}{q_{k}}}=\sum _{j}jq_{j}=\sum _{j}j{\frac {jp_{j}}{}}={\frac {}{}}}$[1]

### 同配系数

${\displaystyle -=\sum _{j,k}jk(e_{jk}-q_{j}q_{k})}$

${\displaystyle \sigma _{q}^{2}=\sum _{k}k^{2}q_{k}-(\sum _{k}kq_{k})^{2}}$

${\displaystyle r={\frac {\sum _{j,k}jk(e_{jk}-q_{j}q_{k})}{\sigma _{q}^{2}}}}$

${\displaystyle \displaystyle r={\frac {cov(x_{i},x_{j})}{\sigma _{x}^{2}}}={\frac {\displaystyle \sum _{i,j}(a_{ij}-{\frac {k_{i}k_{j}}{2M}})x_{i}x_{j}}{\displaystyle \sum _{i,j}(k_{i}\delta _{ij}-{\frac {k_{i}k_{j}}{2M}})x_{i}x_{j}}}={\frac {\displaystyle \sum _{i,j}(a_{ij}-{\frac {k_{i}k_{j}}{2M}})k_{i}k_{j}}{\displaystyle \sum _{i,j}(k_{i}\delta _{ij}-{\frac {k_{i}k_{j}}{2M}})k_{i}k_{j}}}}$
${\displaystyle \displaystyle ={\frac {S_{1}S_{e}-S_{2}^{2}}{S_{1}S_{3}-S_{2}^{2}}}={\frac {\displaystyle (\sum _{i}k_{i})(2\sum _{(i,j)\in E}k_{i}k_{j})-(\sum _{i}k_{i}^{2})^{2}}{\displaystyle (\sum _{i}k_{i})(\sum _{i}k_{i}^{3})-(\sum _{i}k_{i}^{2})^{2}}}}$

### 例子

N点星型网络，其中包括度为N-1的1个点，度为1的N-1个点

${\displaystyle P(N-1,1)=P(1,N-1)={\dfrac {1}{2}}}$

${\displaystyle q_{1}={\dfrac {1}{2}},q_{N-1}={\dfrac {1}{2}}}$

${\displaystyle \displaystyle \sum _{j,k}jk(e_{jk}-q_{j}q_{k})=(1)^{2}(-{\frac {1}{4}})+2(1)(N-1)({\frac {1}{4}})+(N-1)^{2}(-{\frac {1}{4}})={\frac {-(N-2)^{2}}{4}}}$

${\displaystyle \displaystyle \sigma _{q}^{2}=\sum _{k}k^{2}q_{k}-(\sum _{k}kq_{k})^{2}=(1)^{2}({\frac {1}{2}})+(N-1)^{2}({\frac {1}{2}})-({\frac {N}{2}})^{2}={\frac {(N-2)^{2}}{4}}}$

${\displaystyle r={\frac {\sum _{j,k}jk(e_{jk}-q_{j}q_{k})}{\sigma _{q}^{2}}}=-1}$

${\displaystyle S_{1}=2(N-1),S_{2}=N(N-1),S_{3}=(N-1)[(N-1)^{2}+1],S_{e}=2(N-1)^{2}}$

${\displaystyle r={\dfrac {S_{1}S_{e}-S_{2}^{2}}{S_{1}S_{3}-S_{2}^{2}}}={\dfrac {4(N-1)^{3}-N^{2}(N-1)^{2}}{2(N-1)^{2}[(N-1)^{2}+1]-N^{2}(N-1)^{2}}}}$

${\displaystyle ={\dfrac {4(N-1)-N^{2}}{2[(N-1)^{2}+1]-N^{2}}}={\dfrac {-(N-2)^{2}}{(N-2)^{2}}}=-1}$

## 参考资料

1. 汪小帆 陈关荣. 网络科学导论.
2. ^ M. E. J. Newman. Assortative mixing in networks (PDF).
3. ^ M. E. J. Newman. Mixing patterns in networks.