gf(2) Berlekamp Algorithm
If possible, factor polynomial, including at least one irreducible factor.
f = b0000000000000000000000000000000000000000000000000000000000110111
f = 0x0000000000000037
f = x5 + x4 + x2 + x + 1
Calculate vn = x2n (mod f) for n=0 to 5
v0 = x0 (mod f)v0 = b00000000000000000000000000000001
v0 = 0x00000001
v0 = 1
v1 = x2 (mod f)v1 = b00000000000000000000000000000100
v1 = 0x00000004
v1 = x2
v2 = x4 (mod f)v2 = b00000000000000000000000000010000
v2 = 0x00000010
v2 = x4
v3 = x6 (mod f)v3 = b00000000000000000000000000011001
v3 = 0x00000019
v3 = x4 + x3 + 1
v4 = x8 (mod f)v4 = b00000000000000000000000000001010
v4 = 0x0000000a
v4 = x3 + x
Represent v0-v4 as matrix Q
Q = 00001
00100
10000
11001
01010
Represent 5x5 identity matrix I
I = 00001
00010
00100
01000
10000
M = Q-I
M = 00000
00110
10100
10001
11010
Find null basis vectors of M
nv0 = b00000000000000000000000000000001
nv0 = 0x00000001
nv0 = 1
Only null basis is trivial 1, so f is irreducible.
See also: