1 |
Martin Vaeth <martin@×××××.de> wrote: |
2 |
|
3 |
Let me be more precise to avoid misunderstandings: |
4 |
|
5 |
> For the "standard" 2SAT case, one first determines the strongly |
6 |
> connected components in the implication graph (linear time). |
7 |
> Then for each such component one either _enables_ or _disables_ |
8 |
> all vertices. |
9 |
> The only difference to this "standard" 2SAT case is that we do |
10 |
> not want a random choice here |
11 |
|
12 |
This choice applies of course only to the _roots_ of the |
13 |
reduced implication graph (which has strongly connected |
14 |
components collapsed to vertices). In other words: Only for |
15 |
those strongly connected components which have no predecessor |
16 |
in the reduced implication graph, we can apply the subsequent |
17 |
algorithm. (For the other components, one has to follow the |
18 |
arrows in the reduced implication graph, of course.) |
19 |
|
20 |
> Look for that implication arrow in the strongly connected component |
21 |
> which occurs first in the specified ENFORCE_USE string; if |
22 |
> the starting vertex of this arrow is enabled, then enable also |
23 |
> the rest, otherwise disable it. |
24 |
|
25 |
By "starting vertex" I meant here that vertex which is written |
26 |
in front of ?. For instance, in a? ( b ) the "starting vertex" |
27 |
is "a" while in !b? ( !a ) the "starting vertex" is "!b". |
28 |
(Recall that every USE-flag "a" occurs as 2 vertices in the |
29 |
implication graph: Once as "a" and once as its negation "!a".) |
30 |
|
31 |
The 2-clause || ( a b ) has to be interpreted as !b? ( a ), of course. |
32 |
For ^^ ( a b ) it does probably not matter whether it is interpreted as |
33 |
a? ( !b ) !b? ( a ) |
34 |
or in the opposite order |
35 |
!b? ( a ) a? ( !b ) |