第四章 4.2矩阵乘法的Strassen算法(分治)

注意:虽然联系4.2-3、4.2-4和4.2-5是关于Strassen算法的变形的,但你应该先阅读4.5节,然后再尝试求解这几个问题。
####4.2-1 使用Strassen算法计算如下矩阵乘法: [ 1 3 7 5 ] [ 6 8 4 2 ] \begin{bmatrix}1&3\\ 7&5\end{bmatrix} \begin{bmatrix}6&8\\4&2 \end{bmatrix} [1735][6482]给出计算过程。

S 1 = B 12 − B 22 = 8 − 2 = 6 S 2 = A 11 + A 12 = 1 + 3 = 4 S 3 = A 21 + A 22 = 7 + 5 = 12 S 4 = B 21 − B 11 = 4 − 6 = − 2 S 5 = A 11 + A 22 = 1 + 5 = 6 S 6 = B 11 + B 22 = 6 + 2 = 8 S 7 = A 12 − A 22 = 3 − 5 = − 2 S 8 = B 21 + B 22 = 4 + 2 = 6 S 9 = A 11 − A 21 = 1 − 7 = − 6 S 10 = B 11 + B 12 = 6 + 8 = 14 P 1 = A 11 ⋅ S 1 = 6 P 2 = S 2 ⋅ B 22 = 8 P 3 = S 3 ⋅ B 11 = 72 P 4 = A 22 ⋅ S 4 = − 10 P 5 = S 5 ⋅ S 6 = 48 P 6 = S 7 ⋅ S 8 = − 12 P 7 = S 9 ⋅ S 1 0 = − 84 C 11 = P 5 + P 4 − P 2 + P 6 = 48 − 10 − 8 − 12 = 18 C 12 = P 1 + P 2 = 6 + 8 = 14 C 21 = P 3 + P 4 = 72 − 10 = 62 C 22 = P 5 + P 1 − P 3 − P 7 = 48 + 6 − 72 + 84 = 66 综上所述,计算出的矩阵值为 [ 18 14 62 66 ] S_1=B_{12}-B_{22}=8-2=6 \\ S_2=A_{11}+A_{12}=1+3=4 \\ S_3=A_{21}+A_{22}=7+5=12 \\ S_4=B_{21}-B_{11}=4-6=-2 \\ S_5=A_{11}+A_{22}=1+5=6 \\ S_6=B_{11}+B_{22}=6+2=8 \\ S_7=A_{12}-A_{22}=3-5=-2 \\ S_8=B_{21}+B_{22}=4+2=6 \\ S_9=A_{11}-A_{21}=1-7=-6 \\ S_{10}=B_{11}+B_{12}=6+8=14 \\ P_1=A_{11}·S_1=6 \\ P_2=S_2·B_{22}=8 \\ P_3=S_3·B_{11}=72 \\ P_4=A_{22}·S_4=-10 \\ P_5=S_5·S_6=48 \\ P_6=S_7·S_8=-12 \\ P_7=S_9·S_10=-84 \\ C_{11}=P_5+P_4-P_2+P_6=48-10-8-12=18 \\ C_{12}=P_1+P_2=6+8=14 \\ C_{21}=P_3+P_4=72-10=62 \\ C_{22}=P_5+P_1-P_3-P_7=48+6-72+84=66 \\综上所述,计算出的矩阵值为 \begin{bmatrix}18&14\\62&66 \end{bmatrix} S

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值