我对伽罗瓦域2中矩阵的取幂感到困惑。假设我有一个用伽罗瓦域2(GF2)表示的矩阵。我想取幂数为30.也就是说,
A^30
在matlab中我们有两种方法可以做到。
首先,我们执行A power 30并取2的mod(注意A是双矩阵)
A1=mod(A^30,2)
第二种方法,我们将A转换为galois矩阵并取幂运算
A=gf(A,2)
A2=A^30
实际上,两种方式必须相同。但是,当我检查A1和A2时。他们有不同的结果。这里发生了什么?谢谢 让我看看我的A矩阵
A =
1 1 0 1 1 1 0 1 0 0 0 1 0 1 0
0 0 0 1 0 1 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1 0 1 0 0 0 1
1 0 1 1 0 0 0 0 0 0 1 1 1 0 0
1 0 1 0 0 0 0 1 0 0 0 0 0 0 0
0 1 0 1 1 1 1 1 0 1 1 1 1 0 1
0 0 0 1 0 0 0 1 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 1 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 1 1
1 0 1 0 0 0 0 0 0 0 1 0 0 0 1
0 1 0 0 0 0 0 1 0 0 0 0 0 0 0
1 0 1 1 1 1 1 1 1 0 1 1 1 0 1
0 1 0 0 0 1 0 0 0 1 0 0 0 1 0
1 0 0 1 0 1 0 0 0 1 0 0 0 1 1
方法一:
A1=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 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