How to read a CNF file?

500 Views Asked by At

i'm working on argumentation system made by Dung how to read this file content? it's a cnf file describe an abstract argumentation framework

enter image description here

1

There are 1 best solutions below

0
srv236 On BEST ANSWER

The file defines Boolean expressions written in Conjuctive Normal Form. Basically it’s clauses joined by AND, with each variable in the clause ORed together.

The first line of the file format (.cnf) starts with

p cnf num_variables num_clauses

So In your example 7 is the number of variables, 12 is the number of clauses.

Then each line defines a clause. For example:

(A v B v C) ^ (A v D v E) ^ (B v C v D) 

number of variables is 5 (ABCDE), number of clauses is 3 (separated by AND) The variable indexing starts from 1, wirh each clause on a seperate line. Each line ends with a 0 to signify end of the clause. To show a negation, add a “-“ (negative sign) before the variable.

p cnf 5 3
1 2 3 0
1 4 5 0
2 3 4 0

I don’t know what the e is in the first line.