Skip to content

Instantly share code, notes, and snippets.

@realazthat
Created October 21, 2013 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realazthat/9f28b11a67c34a48925e to your computer and use it in GitHub Desktop.
Save realazthat/9f28b11a67c34a48925e to your computer and use it in GitHub Desktop.
digraph sat2 {
//implication graph
rankdir=LR;
node[width=0]
#{¬xvy}, {¬yvz}, {¬zvw} ,{¬wvu},{¬uv¬x},{xvw},{¬wvx}
nx[label="-x"];
ny[label="-y"];
nz[label="-z"];
nu[label="-u"];
nw[label="-w"];
x -> y;
ny -> nx;
y -> z;
nz -> y;
z -> w;
nw -> nz;
w -> u;
nu -> nw;
u -> nx;
x -> nu;
#{xvw},{¬wvx}
nx -> w;
nw -> x;
w -> x;
nx -> nw;
}
http://cs.stackexchange.com/questions/16311/2-sat-proof-with-boolean-literals
digraph sat2 {
//strongly connected component
rankdir=LR;
node[width=0]
#{¬xvy}, {¬yvz}, {¬zvw} ,{¬wvu},{¬uv¬x},{xvw},{¬wvx}
nx[label="-x"];
nz[label="-z"];
nu[label="-u"];
nw[label="-w"];
x -> y;
y -> z;
nz -> y;
z -> w;
nw -> nz;
w -> u;
nu -> nw;
u -> nx;
x -> nu;
#{xvw},{¬wvx}
nx -> w;
nw -> x;
w -> x;
nx -> nw;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment