Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ and $y_0,..,y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. I want to write $x_i$ in terms of $y$ variables. I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations. I tried this idea:

n = 5

RING = PolynomialRing(GF(2),2*n,['x%d'%(i) for i in range(n)] + ['y%d'%(i) for i in range(n)])

RING.inject_variables()

Z = list(RING.gens())

E=[y0==x0+x1, y1==x1+x2, y2==x2+x3, y3==x3+x4, y4==x4+x0]

solve(E, x0,x1,x2,x3,x4)

It is not working.

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ and $y_0,..,y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. I want to write $x_i$ in terms of $y$ variables. I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations. I tried this idea:

n = 5

RING = PolynomialRing(GF(2),2*n,['x%d'%(i) for i in range(n)] + ['y%d'%(i) for i in range(n)])

RING.inject_variables()

Z = list(RING.gens())

E=[y0==x0+x1, y1==x1+x2, y2==x2+x3, y3==x3+x4, y4==x4+x0] E=[y0==x0x1+x2, y1==x1x2+x3, y2==x2x3+x4, y3==x3x4+x0, y4==x4*x0+x_1]

solve(E, x0,x1,x2,x3,x4)

It is not working. working.

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ and $y_0,..,y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. I want to write $x_i$ in terms of $y$ variables. I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations. I tried this idea:

n = 5

RING = PolynomialRing(GF(2),2*n,['x%d'%(i) for i in range(n)] + ['y%d'%(i) for i in range(n)])

RING.inject_variables()

Z = list(RING.gens())

E=[y0==x0E=[y0==x_0x1+x2, y1==x1x_1+x_2, y_1==x_1x2+x3, y2==x2x_2+x_3, y_2==x_2x3+x4, y3==x3x_3+x_4, y_3==x_3x4+x0, y4==x4*x0+x_1] x_4+x_0, y_4==x_4*x_0+x_1]

solve(E, x0,x1,x2,x3,x4)

It is not working.

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ and $y_0,..,y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. I want to write $x_i$ in terms of $y$ variables. I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations. I tried this idea:

n = 5

RING = PolynomialRing(GF(2),2*n,['x%d'%(i) for i in range(n)] + ['y%d'%(i) for i in range(n)])

RING.inject_variables()

Z = list(RING.gens())

E=[y0==x_0$E=[y_0==x_0x_1+x_2, y_1==x_1x_2+x_3, y_2==x_2x_3+x_4, y_3==x_3x_4+x_0, y_4==x_4*x_0+x_1] $

solve(E, x0,x1,x2,x3,x4)

It is not working.

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ and $y_0,..,y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. I want to write $x_i$ in terms of $y$ variables. I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations. I tried this idea:

n = 5

RING = PolynomialRing(GF(2),2*n,['x%d'%(i) for i in range(n)] + ['y%d'%(i) for i in range(n)])

RING.inject_variables()

Z = list(RING.gens())

$E=[y_0==x_0E=[y_0==x_0x_1+x_2, y_1==x_1x_2+x_3, y_2==x_2x_3+x_4, y_3==x_3x_4+x_0, y_4==x_4*x_0+x_1] $

solve(E, x0,x1,x2,x3,x4)

It is not working.

Solve system of symbolic binary nonlinear equations

I have 10 binary variables $x_0, ..,,x_4$ $x_0$, ..., $x_4$ and $y_0,..,y_4$. $y_0$, ..., $y_4$. I know $y_i=x_i+x_{(i+1)\bmod 5}$. $y_i = x_i + x_{(i+1)\bmod 5}$.

I want to write $x_i$ in terms of $y$ variables. variables.

I know for this toy case we can use Gaussian elimination. elimination. But in actual case $y_i$s are nonlinear equations.

equations.

I tried this idea:

n = 5 

RING 5 xy = PolynomialRing(GF(2),2*n,['x%d'%(i) [f'x{i}' for i in range(n)] + ['y%d'%(i) [f'y{i}' for i in range(n)])

range(n)] R = PolynomialRing(GF(2), 2*n, xy) R.inject_variables() Z = list(R.gens()) E = [y_0 == x_0*x_1 + x_2,

RING.inject_variables()

y_1 == x_1*x_2+x_3,

Z = list(RING.gens())

y_2 == x_2*x_3+x_4,

E=[y_0==x_0x_1+x_2, y_1==x_1x_2+x_3, y_2==x_2x_3+x_4, y_3==x_3x_4+x_0, y_4==x_4*x_0+x_1]

y_3 == x_3*x_4+x_0,

y_4 == x_4*x_0+x_1] solve(E, x0,x1,x2,x3,x4)

x0, x1, x2, x3, x4)

It is not working.