Ask Your Question
1

How to convert boolean polynomials to DIMACS format?

asked 2019-01-04 10:29:14 +0100

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-01-04 12:17:02 +0100

rburing gravatar image

Yes, see the documentation Sat » Converters.

edit flag offensive delete link more

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 ( 2019-01-04 12:38:52 +0100 )edit

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 ( 2019-01-04 13:42:52 +0100 )edit
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 ( 2019-01-09 06:41:37 +0100 )edit

From the same documentation: see e.phi.

rburing gravatar imagerburing ( 2019-01-09 08:13:45 +0100 )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

1 follower

Stats

Asked: 2019-01-04 10:29:14 +0100

Seen: 314 times

Last updated: Jan 04 '19