Ask Your Question
1

How to convert boolean polynomials to DIMACS format?

asked 6 years ago

Hridya gravatar image

In sage, boolean polynomials can be solved by solvers supporting the DIMACS input. Can we convert boolean polynomials to DIMACS format using sage?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

rburing gravatar image

Yes, see the documentation Sat » Converters.

Preview: (hide)
link

Comments

1

I have very large number of clauses in a list. Is there any other method to add clauses other than repeating the following for each clause? e.clauses_sparse(a*b + a + 1)

Hridya gravatar imageHridya ( 6 years ago )

From the documentation of CNFEncoder it seems that you can do e(F) where F is an iterable (e.g. list) of boolean polynomials.

rburing gravatar imagerburing ( 6 years ago )
1

This gives a DIMACS file but how can we figure out boolean variables corresponding to the variable numbers in the DIMACS format?

Hridya gravatar imageHridya ( 6 years ago )

From the same documentation: see e.phi.

rburing gravatar imagerburing ( 6 years ago )

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 356 times

Last updated: Jan 04 '19