Implementation Problems in the 2-Satisfaction Problem

I want to implement a 2-SAT problem for 100,000 literals. Thus, there would be 200,000 peaks. So I was stuck with having an array of all reachable vertices from each vertex, a space complexity O(200000^2)that is not feasible. Therefore, please suggest a solution for this. And please, shed some light on the effective implementation of the problem with 2-SAT.

+3
source share
2 answers

From wikipedia :

... 2-feasibility can be solved in polynomial time. As noted by Aspvall, Plass and Tarjan (1979) , a 2-satisfiability instance is decidable if and only if each instance variable belongs to a different strongly-connected component of the implication graph than the negation of the same variable. Since strongly coupled components can be found in linear time by an algorithm based on the first depth search, the same linear time boundary is also applicable to 2-satisfiability.

, , , , , 2-SAT ( ). , 20 . , , !

update: PDF . liori .

+5

. , 2- , - . 2-sat , 200 000 (200000 * 199999)/2, , , , , ( , , ).

+1

Source: https://habr.com/ru/post/1721754/


All Articles