Ask Your Question
0

In booleanpolynomialring how we can find coefficient?

asked 2019-10-28 05:48:35 +0200

Rahul gravatar image

Let x1 ,x2,x3, v1,v2,v3 be the variable in a booleanpolynomialring. Let F = 1+ x1v1v2 + x2v1v2 + x1v3+ x2x3+ v1

Now what is the coefficient of v1v2? In this case it will be x1+x2. How can I find this using sagemath. I try to use F.coefficient(v1v2). But it not work. Plese help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-29 07:47:48 +0200

Emmanuel Charpentier gravatar image

Homework ?

Just a hint, for now: if I understand you correctly, you're trying to use v1, v2, v3 as the indeterminates of a (boolean) polynomial whose coefficients are themselves boolean polynomials. Try to implement that...

edit flag offensive delete link more

Comments

i write this code: from sage.crypto.boolean_function import BooleanFunction
B.<x1,x2,x3,v1,v2,v3> = BooleanPolynomialRing()
x = B.gens()
F = 1+ x1v1v2 + x2v1v2 + x1v3+ x2x3 + v1
F.coefficient(v1*v2)

but it shows :

Traceback (click to the left of this block for traceback)
...
AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object
has no attribute 'coefficient'

Rahul gravatar imageRahul ( 2019-10-30 12:47:49 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-10-28 05:48:35 +0200

Seen: 268 times

Last updated: Oct 29 '19