Solve Matrix Multiplication Equation on Quotient Polynomial Ring

asked 1 year ago

updated 0 years ago

FrédéricC gravatar image

How to solve matrix multiplication equation on quotient polynomial ring? my try:

## polynomial ring
K = 4
L = 4
N = 256

F = GF(8380417)
R = F['x']
S = R.quotient(x^N+1, 'x')

A = random_matrix(S, K, L, distribution='gen')

s1_coef = [ [randint(0, 2) for i in range(N+1)] for _ in range(L)]
s1 = vector([S(_) for _ in s1_coef])
t = A*s1 

A.solve_right(t) # get X for AX = Y

And I got TypeError: base ring must be an integral domain or a ring of integers mod n

Preview: (hide)

Comments

Your quotient ring S has divisors of zero, hence the error. In particular, division or fraction field are not well defined for S. And with no division, there is no way to solve matrix equations.

Max Alekseyev gravatar imageMax Alekseyev ( 1 year ago )