|
|
- #!/usr/bin/env python3
-
- import randomSAT as rdSAT
-
- kSATInstance = rdSAT.generateRandomKSAT(5, 4, 3)
-
- print(kSATInstance.toString())
-
- print("conflicts:")
-
- for conflict in kSATInstance.getConflicts():
- conflictVerified = False
-
- clause1 = kSATInstance.getClause(conflict[0][0])
- clause2 = kSATInstance.getClause(conflict[1][0])
-
- for binding in clause2:
- if binding == conflict[0][1] * -1:
- conflictVerified = True
-
- print(conflict[0], conflict[1], conflictVerified)
-
|