Algebrite icon indicating copy to clipboard operation
Algebrite copied to clipboard

Solving equations with modular arithmetic

Open jarble opened this issue 5 years ago • 3 comments

I tried to solve an equation with modular arithmetic, but there seems to be a syntax error here:

(x % 4)+1=3

(x % ?  4)+1=3
Stop: ) expected

Is Algebrite able to solve equations that include modular arithmetic?

jarble avatar May 02 '19 20:05 jarble

Hi @jarble, not right now I'm afraid.

If you mean finding roots/factoring/determine irreducibility of polynomials over Z/n or N (seems to be your example), then yes it's in the roadmap.

If you have something more general in mind, then can you give more examples of what you'd like to achieve?

davidedc avatar May 03 '19 10:05 davidedc

One of my goals is to solve Zhegalkin polynomials, which are Boolean formulas written in terms of modular arithmetic.

jarble avatar May 03 '19 16:05 jarble

@jarble if you want to find the solutions of a1*x + a0 = 0 (mod n) (with all coefficients and n in N or maybe even Z, and n of "reasonable" size), that could be done with coming work on polynomials that I mentioned.

If you want to do it earlier, this seems to be a "specified enough" problem that you could try to make an Algebrite function f(a1,a0,n) (returning the array of solutions, if n is of a "reasonable" size) that does that - there are enough functions in Algebrite that would seem to make that possible.

davidedc avatar May 03 '19 16:05 davidedc