I'm trying to figure out why the constraints in this example render the formula UNSAT. Without the NoMoreThanKInARow constraint, the formula is SAT. Additionally, it's only UNSAT when using 3 levels for text and color. The example using only two colors is SAT with the constraint. (But unigen doesn't like it because there are too few solutions.)
I decided to make sure my assumptions about how the low-level requests are interpreted were correct before going any further. In doing so, I discovered that the behavior seems to be inconsistent. To facilitate this, I used a small helper script to take a JSON request to the backend, and output a satisfying assignment for the corresponding CNF formula:
Backend Request Inconsistencies
I'm trying to figure out why the constraints in this example render the formula UNSAT. Without the
NoMoreThanKInARow
constraint, the formula is SAT. Additionally, it's only UNSAT when using 3 levels for text and color. The example using only two colors is SAT with the constraint. (But unigen doesn't like it because there are too few solutions.)I decided to make sure my assumptions about how the low-level requests are interpreted were correct before going any further. In doing so, I discovered that the behavior seems to be inconsistent. To facilitate this, I used a small helper script to take a JSON request to the backend, and output a satisfying assignment for the corresponding CNF formula:
To start with, I did a few tests with
EQ
requests, as I believe those are working correctly.EQ
Testseq-0.json
:eq-1.json
:eq-2.json
:eq-3.json
:All those look good. The
EQ
request correctly constrains the right number of variables to be true.LT
Testslt-0.json
:As expected, this one is clearly unsatisfiable.
The next question I had was whether or not
LT
means<
, or<=
. So to answer that, I did this test:lt-1.json
:Interesting, apparently it means
<=
? (Whether intentionally or not, I can't say.)So if that's the case, then I should also be able to force
1 2 -3
as a solution like this:lt-2.json
:Yet for some reason, that is unsatisfiable. How about if I only require one variable to be true?
lt-2-1.json
:Works. Interesting. So is it that
LT
means<=
whenk = 1
, but<
whenk > 1
? Does that hold true whenk = 3
?lt-3.json
:Apparently not, since
LT
meant<=
here.Can I force a solution with only two true variables then?
lt-3-2.json
:Apparently not. It's like it wants to treat the
LT
likeEQ
in this case.I'm not sure how this relates to the example yet, since that one only uses
LT
withk = 1
, but it's unsettling all the same.