Discussion:
Case of 0 clauses or variables?
(too old to reply)
Diego Huang
2004-02-03 00:15:42 UTC
Permalink
Hi,

Should we handle the case where there's 0 clauses or variables? For
example:

---file.cnf---
p cnf 0 4
---EOF---

or

---file.cnf---
p cnf 4 0
---EOF---

The CNF files are in the right format, since they have no clauses and no
variables. But I don't know what the output should be? UNDETERMINED?
error?

Thanks,

Diego
Alexander Smith
2004-02-03 04:40:19 UTC
Permalink
Hi Diego,

I just noticed this problem myself. (There's one more case you missed: a
clause with no literals.) The lab handout does not state what to do in
these cases. I will get an "official" answer to your question and update
the lab handout accordingly within the next couple of days. In the
meantime, you can continue to work on the rest of the lab assuming for now
that these cases won't happen. They will, but you will be able to take
care of them with only a few extra lines of code when the lab handout is
updated.

Alexander
Post by Diego Huang
Hi,
Should we handle the case where there's 0 clauses or variables? For
---file.cnf---
p cnf 0 4
---EOF---
or
---file.cnf---
p cnf 4 0
---EOF---
The CNF files are in the right format, since they have no clauses and no
variables. But I don't know what the output should be? UNDETERMINED?
error?
Thanks,
Diego
Continue reading on narkive:
Loading...