Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free Propagation #50

Open
MaxOstrowski opened this issue Nov 17, 2020 · 4 comments
Open

Free Propagation #50

MaxOstrowski opened this issue Nov 17, 2020 · 4 comments
Labels

Comments

@MaxOstrowski
Copy link
Member

{a}.
&diff{x} >= y+10 :- a.
&diff{x} >= y+15 :- not a.
&diff{x} <= y+9.

Given this simple sample program, clingo-dl (by default) can not determine unsat without a choice.
The connection that "At least one of x>=y+10 and x>=y+15" is not yet made visible to the solver I guess.
At least in the case where the same literal is used (with reversed sign) for two edges going in the same direction, one constraint can be simplified. In the example above, this would mean that &diff{x} >= y+10 is always true. This can lead to stronger propagation without changing the Algorithm, just by posting different constraints.

I could not spot this behaviour in the wild (haven't check for my multishot instances) but assume a path where you can chose to take the short route or the long route. If the literal is shared (or equality is detected by clasp) this could improve performance for such examples. Of course it would be great to have a more general "at least one of ..." restriction detection in case of multiple branches or missing equality preprocessing.

@rkaminsk
Copy link
Member

rkaminsk commented Nov 17, 2020

If x - y <= 9 is true, then both x - y >= 10 and x - y >= 15 must be false. It is a form of bounds propagation that could easily be implemented in clingo-dl. Interestingly, this form of propagation was suggested in the SAT modulo simplex paper I was reading, recently. The partial propagation of clingo-dl should give you this kind of propagation. I do not know why clasp counts a conflict but exactly two edges are propagated false..

@MaxOstrowski
Copy link
Member Author

Thats true, but this needs extra propagation.
The method I described should capture this with the already builtin check from clingo-dl, right ?
Given that you have several of these choices a long a path I think not even bound propagation can handle this.
In the end, clingo-dl does not know if maybe none of x>=y+10 and x>=y+15 are true, in which case this does not give unsat.

@rkaminsk
Copy link
Member

rkaminsk commented Nov 17, 2020

I was just looking at the example. Yes, you could equivalently write it as

{a}.
&diff{x} >= y+10.
&diff{x} >= y+15 :- not a.
&diff{x} <= y+9.

This is typically the stuff we do when encoding. Remember the last paper Torsten send around? One could probably also compute some unsatisfiable cores to find sets of literals where at least one literal is true.

@rkaminsk
Copy link
Member

rkaminsk commented Sep 7, 2021

I keep this one open because it would be a very simple to implement preprocessing technique that just requires a hash table + one pass over the edges.

@rkaminsk rkaminsk added the good first issue Good for newcomers label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants