• Nenhum resultado encontrado

A Polynomial Algorithm for 3-sat

N/A
N/A
Protected

Academic year: 2022

Share "A Polynomial Algorithm for 3-sat"

Copied!
15
0
0

Texto

(1)

A Polynomial Algorithm for 3-sat

M Angela Weiss Draft Version

weiss@ime.usp.br, Universidade de S˜ao Paulo, S˜ao Paulo - Brasil

Abstract

We present a new method for solving 3-sat formulas where the formulas are grouped in digraphs representing unsatisfiable2-satfor- mulas in which we decide satisfiability of the whole formula. We show that using this method we polynomially decide if a given formula3-sat is satisfiable or not, solving, in this way, the classic question whether P=NP.

MSC 03D15 Keywords: Computational Complexity, SAT, Boolean Logic

1 Introduction

In this paper, we present a polynomial (in time and space) algorithm to decide 3-sat. The class of sat problems was shown to be NP-complete.

See Cook, in [1] and Cook and Reckhow in [2] and seminal papers of L.

Levin, in [5] and [4]. The goals are to establish lower bounds in complexity, see Meyer and Sotckmeyer in [7] and Meyer in [6]. The literature in this area is rich of very nice surveys, like [3] and [8].

A preliminary version of this paper was published as a technical report in [10]. Previous versions of this paper, the algorithms based on it as well as examples are posted in

www.ime.usp.br/∼weiss

The version, presented here was written following some advises of Profes- sor Lew Gordeew, to whom I am deeply thankful.

Given a3-sat formula the idea is to group clauses with at most the dis- junction of two literals then we decide if the groups do represent all possible

(2)

choices of grouping the formulas (undecidable) or no (decidable). All the procedures we describe are polynomially bounded.

2 Basic Definitions

Definition 2.1 (SAT) A formula χ in Boolean Logic is said satisfiable if there is a valuation v onto the set of atoms of χ so that v(χ) is true. If no such valuation exists, that is v(χ) isfalse for any valuation, then we say that χ is unsatisfiable.

Definition 2.2 A 3-sat formulaΨ is a conjunctions of a number, sayn, of a disjunction of at most three literals. We write

Ψ≡(l11∨l21 ∨l31)∧ · · · ∧(l1n∨l2n∨l3n)≡C1∧ · · · ∧Cn A subformula Ck ≡lk1∨l2k∨l3k, 1≤k ≤n of Ψ is called a clause.

The set of literals of a formula Ψ is denoted by Letter(Ψ).

A pair of a literal together with its negation is called a conjugated pair.

Note: We require that no clauseCkof Ψ, 1≤k ≤nhave a pair of conjugated literals among its literals. Indeed, if Ck ≡l1k∨p∨ ¬p, then Ck ≡l1k.

Lemma 2.3 Let Ψ≡C1∧ · · · ∧Cm∧Cm+1· · · ∧Cn be so thatLetter(Ψ) = {p1, . . . , pr, q1,¬q1, . . . , qs,¬qs} and Ψ ≡C1∧ · · · ∧Cm, where {C1, . . . , Cm} are the clauses of Ψ that do not contain literals from the set {p1, . . . , pr} among their literals. Then, Ψis unsatisfiable if and only ifΨ is unsatisfiable.

Proof: Clearly if Ψ is unsatisfiable, then Ψ ≡ Ψ ∧(Cm+1 ∧ · · · ∧Cn) is unsatisfiable. On the other side, if Ψ is unsatisfiable, then any valuation wold make it false. In particular, all the valuationsvwhere for alls∈ {p1, . . . , pr}, v(s) is true. Thus, the conjunction χ ≡ Cm+1 ∧ · · · ∧Cn is so that v(χ) is true and all the valuations v, restricted to the literals {q1,¬q1, . . . , qs,¬qs}

make Ψ false. Hence, Ψ is unsatisfiable. ⊣

Notation 2.4 Consider the 3-sat formula

ψ ≡(p∨q11∨q12)∧(p∨q21∨q22)∧ · · · ∧(p∨qt1∨qt2)

(3)

Thefactorization of ψ by p, denoted p∨Sp, is the rewritten of Ψ as (the equivalent) formula

p∨ (q11∨q12)∧(q21∨q22)∧ · · · ∧(qt1 ∨qt2)

(1) The literal p is called the factor of Sp.

Case ψ ≡p, then Sp ≡ ⊤.

Definition 2.5 Given a 3-sat formulaΨ, apartition of Ψby a set of labels Label ⊆ {q1,¬q1, . . . , qk,¬qk} (a set of literals in Ψ) is a formula Ψ ≡ (V

lLabel(l∨Sl))∧S so that Ψis satisfiable iff Ψ is satisfiable as well. We require,

• Sl is a factorization of some clauses of Ψ by a literal l ∈ Label, the symbol ⊥ or the symbol ⊤;

• For all 1≤l1 < l2 ≤k, ql1 and ¬ql1 do not belong to the set of literals of Sql2 or S¬ql2;

• S is at most a 2-sat formula.

Proposition 2.6 Any 3-sat formula Ψ≡C1∧ · · · ∧Cn admits a partition.

Proof: Due to Lemma 2.3, we can assume thatLetter(Ψ) is so that iflis a lit- eral of Ψ, so is its negation¬l. Suppose thatLetter(Ψ) ={l1,¬l1, . . . , ls,¬ls}.

Choose the pair Label0 ={q01,¬q01, . . . , q0k0,¬q0k0} ⊆Letter(Ψ) so that we partition the set of clauses {C1, . . . , Cm} into

{Dq01, D¬q01, . . . , Dq0k0, D¬q0k0, D1}

whereDlis the set of clauses that containsl ∈Label0 among their literals,D1 is the set of clauses that do not contain literals of Label0 among their literals and, moreover, for all C ∈D1, for all literals p∈C, there is a l ∈Label0 so that either p or¬p is a literal of some clause of Dl.

For all l ∈ Label0, Sl is the factorization of ∧CDlC by l. Observe that if a set Dl is unitary, Dl = {C} and C ≡ l, then C ≡ l ∨ ⊥, so Sl = ⊥.

Obtain a set of conjugated pairs Label0 ={q01,¬q01, . . . , q0k0,¬q0k0}and the (equivalent to Ψ) formula

(q01∨Sq01)∧(¬q01∨S¬q01)∧ · · · ∧S0k0∨Sq0k0)∧(¬q0k∨S¬q0k0)∧(∧CD1C)

(4)

where eachSl is the factorization of the clauses of Ψ that containl ∈Label0. ConsiderLabel1 ={q11,¬q11, . . . , q1k1,¬q1k1}a set conjugated literals and the formula

(q11∨Sq11)∧(¬q11∨S¬q11)∧ · · · ∧(q1k1 ∨Sq1k1)∧(¬q1k∨S¬q1k0)∧(∧CD2C) where each Sl is either the factorization of the clauses of D1 that contain l ∈ Label1 = {q11,¬q11, . . . , q1k1,¬q1k1} or the symbol ⊤, case no clause of D2 contain l among its literals. Besides,

1. For all 1≤i, j ≤k1, the literalsq1i and ¬q1i do not belong to the sets of literals of Sq1j, S¬q1j nor to any C ∈D2;

2. For all C ∈ D2, for all literals l ∈ C, there is a l ∈ Label0∪Label1 so that either q or ¬q is a literal of Sl;

For all l∈Label1, there is a p∈Label0 so thatl or¬l is a literal of Sp. Case Sl is not the symbol ⊥, we say that l∈Label1 belong to the set of labels.

If (∧C∈D2C) is at most a 2-sat formula, stop the procedure, else, keep repeating the above procedure for the sets of literals

{q21,¬q21, . . . , q2k2,¬q2k2}. . .{qs1,¬qs1, . . . , qsks,¬qsks} until obtain a formula

(q01∨Sq01)∧(¬q01∨S¬q01)∧ · · · ∧(q0k0 ∨Sq0k0)∧(¬q0k∨S¬q0k0)∧

(q21∨Sq21)∧(¬q21∨S¬q21)∧ · · · ∧(q2k2 ∨Sq2k2)∧(¬q2k2 ∨S¬q2k2)∧. . . (qs1∨Sqs1)∧(¬qs1∨S¬qs1)∧ · · · ∧(qsks ∨Sq

sks)∧(¬qsks ∨Sq

sks)∧

(∧CNC)

where the ∧CNC, denoted S, is a 2-sat formula,

1. For all 1 ≤ i ≤ j ≤ s, 1 ≤ t ≤ ki and 1 ≤ r ≤ kj the literals qit and

¬qit do not belong to the sets of literals of Sqjr, S¬qjr;

2. For all 1≤ i ≤s and 1 ≤ r ≤ki, there is a 0 ≤j < i and 1 ≤ t ≤kj so that either qir or ¬qir belongs to Spjt or to S¬pjt;

3. For all pir, there is apjs, j < sso that pir or¬pir is a literal of Spjs or of S¬pjs.

(5)

The label associated toS is⊤. ⊣ We work with a partitioned formula Ψ whose set of labels, from now on denoted Label ={q1, . . . , qk}, is fixed.

Definition 2.7 If there is a formula Sp and a literal l ∈ Label so that l is a literal of Sp, then l is called necessarily false. The set of necessarily false literals is denoted by NecF ls.

Observation 2.8 If C = {C1, . . . , Cn} is the set of clauses of Ψ, we have shown in Proposition 2.6 that there is a partition of C by sets PT T ⊆ {Dq1, D¬q1, . . . , Dqk, D¬qk, T}, T the clauses of Ψ with at most two literals, Dl, l ∈ {qi,¬qi}, clauses in Ψ that contain l.

The sets of clauses in PT T are pairwise disjoint.

Proposition 2.9 Ψ is unsatisfiable if and only if a partitioned version of it is unsatisfiable.

Proof: Our claim follows on noticing that at each step of factorization, Ψ is replaced by an equivalent formula. More precisely, we wrote a partition of the clauses of Ψ, PT T ⊆ {Dq1, D¬q1, . . . , Dqk, D¬qk, T}. Some of the sets Dl are the symbol l∨ ⊤, that will not spoil our valuation for l∨ ⊤ is always true. We have that

Ψ ≡ C1∧ · · · ∧Cm ≡V

lLabel(V

{C ∈Dl})∧(V

{C∈T})≡ V

lLabel(l∨Sl)∧(S)

⊣ Definition 2.10 Given a partitioned3-satformula Ψ, define the cylindrical digraph Clndr-graph generated by Ψ, (L,⇒) as

• L⊆Letter(Ψ)∪ {⊥,⊤};

• If a∨b is a clause ofSl1, . . . , Slk, l∈Label orl =⊤, then{a,¬a, b,¬b}

is contained in the set of vertexes, ¬a ⇒ b and ¬b ⇒a are edges and both have as label the set {l1. . . lk};

• If a≡a∨ ⊥ is a clause of Sl1, . . . , Slk, then {a,¬a,⊤,⊥} is contained in the set of vertexes, ⊤ ⇒ a and ¬a ⇒ ⊥ are edges in Clndr-graph both with label {l1. . . lk};

(6)

• If a is necessarily false, then {a,¬a,⊤,⊥} is contained in the set of vertexes, a ⇒ ⊥ and ⊤ ⇒ ¬a are edges of Clndr-graph with label {a};

• If ⊤=Sl, form no edge;

• For all p so that Sp ≡ ⊥, then ⊥ ⇒ ⊤ is an edge whose label contains p.

Definition 2.11 Let a and b be two vertexes of the cylindrical digraph.

1. A path from a to b is a subdigraph of the form a⇒c1 ⇒c2 ⇒ · · · ⇒ck ⇒b

2. An interval betweena andb is the (non empty) subdigraph that contains all paths from a to b. Denote the interval [a, b]. A path in the interval [a, b] is the set of all paths starting at a and ending at b.

A path between two edges e1 and ek+1, denoted e1, . . . , ek+1 is a sequence like the above sequence with e1 =a⇒c1, e2 =c1 ⇒c2, . . ., ek =ck ⇒b

If there is no path between a and b, we say that there is no interval between them.

Definition 2.12 Recall that literal r∈ Label∩(∪Letter(Ψ) is called neces- sarily false literal. The set of necessarily false literals is denoted by NecF ls.

If an interval [¬a, a] is non-empty digraph, then a is called a necessarily true literal. The set of necessarily true literals is denoted by Nec.

If¬a∈NecF ls ora is an isolated clause, we consider the edges ¬a⇒ ⊥ and⊤ ⇒ain our computation. Ifais an isolated clause, thenais necessarily true and its interval, [¬a, a] contains the (unique) path

¬a⇒ ⊥ ⇒ ⊤ ⇒a

If Sp ≡ ⊥, then⊥ ⇒ ⊤ forms a closed interval whose label is p.

Notation 2.13 Given a cylindrical digraph, denote 1 [¬a, a] →[a,¬b]→[¬b, b]

2 [¬a, a] →[a, c]→[c,⊥]

3 [⊤,¬d]→[¬d, c]→[c,⊥]

(7)

respectively, the smallest subdigraph of the cylindrical digraph that contains, respectively the intervals,

1 [¬a, a], [a,¬b] and [¬b, b], for all a, b∈Nec;

2 [¬a, a], [a, c] and [c,⊥], for all a∈Nec, c∈NecF ls;

3 [⊤,¬d], [¬d, c] and [c,⊥], for all d, c∈NecF ls.

Digraphs as above are called generators.

Definition 2.14 Given a cylindrical digraph, and the set of natural numbers, N, its set of closed digraphs, CSD is defined as the set of digraphsCSD = (V, E, label(a, b)), where, for all generator I as in notation 2.13 there is one and only one natural number j, called index of I so that if x and (x, y) are a vertex and a edge of I, then, (x, j) and ((x, j),(y, j)) are, respectively a vertex and a edge of CSD.

Definition 2.15 Given a closed digraph generated by I = [a, b] → [b, c] → [c, d], with indexj, a (maximal) path in I is a path P that starts at(a, j)and ends at (d, j) and passes through (contains as an element) (b, j) and (c, j),

seq = (a0, j)⇒l1 (a1, j)⇒l2 (a2, j)⇒ · · · ⇒(ar1, j)⇒lr (ar, j) (2) where b and cbelongs to {a1, a2, ar1}, a0 =a and ar=d.

Definition 2.16 Let C = {p1, . . . , pm} ⊆ Label be a consistent set and F the set of all mappings assigning to each 1≤i≤m a number between 0and hi, the number of clauses of Spi. Denote by (ql∨rl)p the lth clause of Sp

For each f ∈ F, let Φf be the formula

m

^

i=1

(qf(pi)∨rf(pi))pi

We are particularly interested in the maximal path in Formula 2.

Definition 2.17 Consider P, the set of all maximal paths in the intervals in CSD. To each seq ∈ P, let Pseq be the set of all consistent sets so that v ∈ Pseq iff for all edge (c, j) ⇒ (d, j) in seq, there is a literal l ∈ v that belongs to the set of labels of (c, j)⇒(d, j).

LetV be the set of all valuations so thatv ∈ V iff there is a maximal path seq and a consistent set v∈Pseq in which v(p) =⊥ for all p∈v.

(8)

In Definition 2.17, the set C is a (consistent) set so that for each label li in the path 2 there is an element ofli inC and, reciprocally each literal inC belongs to a label in 2 and, associated toseq in 2, we have the2-satformula Φseq,

(¬a0∨a1)∧(¬a1 ∨a2)∧ · · · ∧(¬ar1∨ar) (3) We have that Pseq is a subset of {Φf|f ∈ F }. We show that Pseq is a kernel of unsatisfiable formulas of {Φf|f ∈ F }, as below stated.

Theorem 2.18 For all maximal path seq, for all consistent choiceC in seq, Ψseq is unsatisfiable.

Theorem 2.19 If Φf is unsatisfiable, then there is a formula of χ∈Φseq so that χ is a subformula of Ψf.

Use the following (well known) Proposition to prove the above Theorems.

Observation 2.20 Once we distinguish intervals by using its index, we omit writing its index to avoid overload our proofs.

Proposition 2.21 (Papadimitreou, [9]) LetΦ≡(a0 ⇒a2)∧(a3 ⇒a4)∧

· · · ∧(an ⇒an+1) be a 2-sat formula (use only implies andand as Boolean connectives). Consider a digraph whose vertexes are the union of the literals ofΦtogether with their negations and whose edges areai ⇒ai+1and¬ai+1

¬ai, 0 ≤ 1 < n. Then Φ is unsatisfiable iff there are paths from ai to ¬ai

and from ¬ai to ai for some 0≤i < n.

Proof of 2.18 and 2.19:

2.18: Applying Definition 2.14, we obtain three kind of formulas, associated, respectively, to cases 1, 2 and 3,

(a∨p1)∧(¬p1∨p2)∧ · · · ∧(¬pr∨a)∧(¬a∨pr+1)∧(¬pr+1∨pr+2)∧

· · · ∧(¬ps1∨ ¬b)∧(b∨ps+1)∧(¬ps+1∨ps+2)∧ · · · ∧(¬pt1∨b) (4) (a∨p1)∧(¬p1∨p2)∧ · · · ∧(¬pr∨a)∧(¬a∨pr+1)∧(¬pr+1∨pr+2)∧

· · · ∧(¬ps1∨c)∧ ¬c (5)

¬d∧(d∨pr)∧(¬pr∨pr+1)∧ · · · ∧(¬pr1∨c)∧ ¬c (6)

(9)

The above three formulas are clearly unsatisfiable, but the associated pair of paths are not so clear. Observe that

¬d∧(d∨pr)∧(¬pr∨pr+1)∧ · · · ∧(¬pr1∨c)∧ ¬c≡

(⊥ ∨ ¬d)∧(d∨pr)∧(¬pr∨pr+1)∧ · · · ∧(¬pr1∨c)∧(⊥ ∨ ¬c) and that ⊥ ⇒ ⊤belongs to any path.

Digraph associated, respectively, to formulas 4, 5 and 6,

(¬a⇒p1),(p1 ⇒p2), . . . ,(pr ⇒a),(a⇒pr+1),(pr+1 ⇒pr+2), . . . , (ps1 ⇒ ¬b),(¬b ⇒ps+1),(ps+1 ⇒ps+2), . . . ,(pt1 ⇒b)

(¬p1 ⇒a),(¬p2 ⇒ ¬p1), . . . ,(¬a⇒ ¬pr),(¬pr+1 ⇒ ¬a),

(¬pr+2 ⇒ ¬pr+1), . . . ,(b⇒ ¬ps−1),(¬ps+1 ⇒b),(¬ps+2 ⇒ ¬ps+1), . . . , (¬b ⇒ ¬pt1)

(¬a⇒p1),(p1 ⇒p2), . . . ,(pr⇒ a),(a⇒pr+1),(pr+1 ⇒pr+2), . . . , (ps1 ⇒c),(c⇒ ⊥)

(¬p1 ⇒a),(¬p2 ⇒ ¬p1), . . . ,(¬a⇒ ¬pr),(¬pr+1 ⇒ ¬a), (¬pr+2⇒ ¬pr+1), . . . ,(¬c⇒ ¬ps1),(⊤ ⇒ ¬c)

(⊤ ⇒ ¬d),(¬d⇒pr),(pr⇒pr+1), . . . ,(pr1 ⇒c),(c⇒ ⊥) (d⇒ ⊥),(¬pr ⇒d),(¬pr+1 ⇒ ¬pr), . . . ,(¬c⇒ ¬pr−1),(⊤ ⇒ ¬c) and the respective pair of paths,

(¬a ⇒p1),(p1 ⇒p2), . . . ,(pr⇒a)

(a⇒pr+1),(pr+1 ⇒pr+2), . . . ,(ps1 ⇒ ¬b),(¬b ⇒ps+1),(ps+1⇒ps+2), . . . ,(pt1 ⇒b),(b ⇒ ¬ps1), . . . ,(¬pr+2 ⇒ ¬pr+1),(¬pr+1 ⇒ ¬a)

⊥ ⇒ ⊤

(⊤ ⇒ ¬c),(¬c⇒ ¬ps1), . . . ,(¬pr+2 ⇒ ¬pr+1),(¬pr+1⇒ ¬a), (¬a⇒p1),(p1 ⇒p2), . . . ,(pr⇒ a),(a⇒pr+1),(pr+1 ⇒pr+2), . . . , (ps−1 ⇒c),(c⇒ ⊥)

⊥ ⇒ ⊤

(⊤ ⇒ ¬d),(¬d⇒pr),(pr⇒pr+1), . . . ,(pr1 ⇒c),(c⇒ ⊥)

2.19: Given a unsatisfiable2-satformula Φf,f ∈ F, consider a pair of paths associated to Φf,

(a ⇒b1),(b1 ⇒b2), . . . ,(bn⇒ ¬a) (¬a⇒c1),(c1 ⇒c2), . . . ,(cn2 ⇒a)

(10)

write

(a ⇒b1),(b1 ⇒b2), . . . ,(bn ⇒ ¬a),(¬a⇒c1),(c1 ⇒c2), . . . ,(cn2 ⇒a) Choose literalsηandζ so that there are pathsηto¬ηandζ to¬ζ so that for no conjugated pair µand ¬µthere is a path betweenµand ¬µcontained in between the paths between η and ¬η or in between ζ to ¬ζ. Observe that at least a and ¬a, ¬a and a can form paths, so, the smallest path can be written. Truncate the above sequence erasing all elements before η and erasing all elements after ¬ζ. Obtain intervals

[η,¬η]→[¬η,¬ζ]→[¬ζ, ζ]

where the first and third intervals are associated to necessarily false or nec-

essarily true, according to Definition 2.14. ⊣

Conclude (Theorems 2.18 and 2.19) that valuations inV are the valuations that falsify Ψ. Thus, Ψ is unsatisfiable iff V entails all possible consistent combinations over the set of literals. We resume our decision problem on the verification whether V ⊆2Label, the set of all mappings from Label onto {0,1}, contains all possible consistent combination over the set of labels.

The setV is contained in the set of consistent sets of literals, τ ≡ {cttcsd|∃seq∈ P∀label ∈seq∃p∈label(p∈cttcsd)}

Denoting here the complementary of a set by the symbol∼,

∼ τ ≡ {cttcsd|∀seq ∈ P∃label ∈seq∀p∈label(¬p∈cttcsd)}

Observe thatτ ⊆ 2Label and its complementary set is∼τ. So, we reduce our search to the verification whether all the sets in ∼ τ are inconsistent (and Ψ is not valid) or no (Ψ is valid).

Definition 2.22 A set of set of edges A = {e1, . . . , en} is incompatible if there is a conjugated pair of literals pand ¬p in the union of its set of labels,

∪{li|1 ≤ i ≤ n}. If otherwise, we say that C is compatible and denote Ξ(e1, . . . , en).

If some li contains ⊤ then C is incompatible.

All the sets in∼τ are inconsistent iff all antichains (over a natural partial order generated by the closed digraphs) are incompatible. So, we search for antichains in the paths in the closed digraph. The task of deciding if Ψ is satisfiable resumes on finding an compatible antichain in CSD.

(11)

3 Polynomial Decision Algorithm

Notice that from now on, we are working with the set of closed digraphs, CSD, and that a vertex or an edge in the cylindrical digraph, a or (a, b) can be replied and renamed (a,1), . . . ,(a, r) and ((a,1),(b,1)), . . . ,((a, r),(b, r)).

Each vertex and edges are pairwise distinct accordingly to that combination in Notation 2.13. We now search for sets of antichains whose set of labels is incompatible over all the possible sequences in CSD. Our search can be expsize long if we choose to name all possible sequences.

Definition 3.1 Given a CSD = (V, E,⇒) its sets of source, spillway and roots, F, S and R is given, respectively, by

F= {a| ∃c∈V∃c ∈V(c6=c)∧(a⇒c∈E)∧(a⇒c ∈E)

∨ 6 ∃c(c⇒a∈E)}

S= {b| ∃c∈V∃c ∈V(c6=c)∧(c⇒b ∈E)∧(c ⇒b∈ E)

∨ 6 ∃c(b⇒ c∈E)}

R= {a∈V| 6 ∃b(b ⇒a∈E)} ⊆F

Definition 3.2 Given an edge e, up(e) is the set of all edges s so that s = x⇒y, x∈F and there is a path, s, b1, . . . , bn, e between s and e.

Definition 3.3 Given two edges a and b, we say that a andb are compara- ble, comp(a, b) if either

• up(a)(up(b)or up(a) =up(b) and there is a path between a andb or;

• up(b)(up(a) or up(a) =up(b) and there is a path between b and a.

If otherwise, a and b are said incomparable, incomp(a, b).

A set of vertexesV has an antichain if for any vertex sin the set of closes intervals, there is a vertex a∈V so that comp(s, v).

Proposition 3.4 There is a polynomial algorithm to verify if a set L of edges has an antichain in the set of closed digraphs

Proof: For all e1 ∈ CSD, search if there is a comparable e2 ∈ L. If the procedure ends with an empty set, there is an antichain, else, there is an edge e1 ∈ CSD not comparable with any edge ofL, soL has no antichain. ⊣

(12)

Definition 3.5 A set of edges {e1, . . . , ek} is said complete if it contains an antichain.

Definition 3.6 For all edgee in CSD, defineN est(e)as the set of all edges incomparable and compatible with e. In other words

Nest(e) ={c∈E|imcomp(e, c)∧Ξ(e, c)}

Algorithm 3.7 For all incomparable pair of edges (e1, e2) whileNest(e1)∩ Nest(e2) is not complete, then erase both e1 from Nest(e2).

If all labels were erased, stop the computation with the outputThere is no compatible antichain. Else, the computation stops because the set of label was kept unchanged and the output is There are compatible antichains.

Obtain the output Solve, a list with Nest from all labels.

Definition 3.8 If the solution of a CSD (Algorithm 4.2) is non empty, its solution set,Sol, is the set of all set of edges contained inSolve,{e1, . . . , es}, so that for all 1≤i, j ≤s each edge ei ∈Nest(ej).

Theorem 3.9 The solution set coincides with the set of all compatible an- tichains in CSD.

Proof: Suppose that S = {e1, . . . , es} is a set of incomparable edges with compatible labels. Clearly S belongs to the solution set.

Reciprocally, we must show that a non empty output generates only an- tichains of compatible labels. Once we made a choice of a incomparable set of edges whose labels are compatible, say T={e1, . . . , es}, if we cannot extend our choice to a antichain by adding to T a compatible edge es+1, then all

labels in T would be erased. ⊣

Henceforth, we can take for granted that an output ∅ means that there is no compatible antichain and conversely. Naming all antichains is an (un- necessary) expsize task.

4 Bounds in Computation

Summarily, we followed the polynomially bounded steps 1. Factorize Ψ (Definition 2.5);

(13)

2. Write the cylindrical digraph (Definition 2.10);

3. Write the set of closed digraph (Definition 2.14), CSD and estimate the size of Nectrue and Necfalse

4. Search for source, spillway and roots (Definition 3.3);

5. Perform Algorithm 4.2.

Observation: The size ofCyl is given by

• V, the set of vertexes, is bounded by L, the number of literals of Ψ;

• E, the set of edges. For each a ∈V, there are at most L edges of the form a⇒b, b∈V, thus |E| ≤L2.

Lemma 4.1 Writing a partition is polynomially bounded.

Proof: Making the choices of literals {qi1,¬qi1, . . . , qiki,¬qiki}causes, in the worse case, the elimination of the clauses of Ψ one by one, thus, again, the order square in the number of clauses of Ψ and, therefore, the order square

in the number of literals of Ψ. ⊣

Lemma 4.2 The number of intervals given in Definition 2.14, denoted by I is bounded by the square of the number of vertexes of the cylindrical digraph.

Proof: The number of intervals given in Definition 2.14 is bounded by all combinations of

1 [¬a, a], [a,¬b] and [¬b, b], for all a, b∈Nec;

2 [¬a, a], [a, c] and [c,⊥], for all a∈Nec, c∈NecF ls;

3 [⊤,¬d], [¬d, c] and [c,⊥], for all d, c∈NecF ls.

and the number of intervals generated by the three combinations in bounded by the square of the number of vertexes V, that is V2 and, thus, the number of edges of that cylindrical digraph is bounded by the square of the edges of Ψ, that is bounded by the square of vertexes of Ψ, thus, V4. ⊣ Lemma 4.3 Writing the set of roots, spillway, sources and the intervals MAXLIN is a polynomial task.

Proof: Given aCSD, let E be its set of edges and V be its set of vertexes.

(14)

1. The search for source and spillway requires a search over the edges, a linear search;

2. The search for the roots is a linear search over the set of sources;

3. Marking each path withpath labeldepends on writing intervals, a poly- size task;

4. Writing the ordered set of labels, U, depends on writing intervals, a polysize operation. The number of paths is bounded by the number of edges in a closed digraph.

Lemma 4.4 There is a polynomial algorithm to decide whether there is an antichain in a set of vertexes V.

Proof: Comparison between two elements of the set of vertexes in the closed digraph, Uand V demands a|V| × |U| ≤ |U|2 operations. ⊣ Proposition 4.5 The search for antichains in a set of labelsV is polynomi- ally bounded.

Proof: The search depends on comparison between the sets Uand V, again

bounded by the square of |U|. ⊣

Proposition 4.6 Algorithm 4.2 is polynomially bounded.

Proof: Perform a polysize search over the Cartesian product of the set edges.

In step 2, we compare sets of the size of the set of labels while performing the operations Nest(e1)∩Nest(e2).

In the worse case, we erase edge by edge in the set of all Nest, which can demand a search over space. If |E| is the number of edges, the space is

|E|2 in the set of all Nest. Thus, erasing edge by edge, we spend a number square of the space, that is, |E|4. The number of closed digraphs, given in Definition 2.14 is, at most, the order square of the literals in Ψ and the number of edges in each interval is bounded by the square of the number of

edges in a cylindrical digraph. ⊣

(15)

References

[1] Cook S.A. The complexity of theorem proving procedures. Proc 3rd STOC, pages 151–158, 1971.

[2] Cook S.A. Reckhow A.R. The relative efficiency of propositional proof systems. J. of Symbolic Logic, 44(1):36–50, 1979.

[3] Stockmeyer L. J. Classifying the computational complexity problems.

The Journal of Symbolic Logic, 52 No 1:1–43, 1987.

[4] Levin, Leonid. Universal sorting problems. problems of information transmission. Problemy Peredachi Informatsii, 9:265266, 1973.

[5] Levin, Leonid. ”universal search problems”. Problemy Peredachi Infor- matsii, 6(4):265–266, 1984.

[6] Meyer A.R. weak monadic second-ordet theory of successor is not ele- mentary recursive. In R Parikh, editor, Lecture Notes in Mathematics, volume vol 453, pages 132–154. Spring-Verlag, New York, 1972-73.

[7] Meyer A.R. Stockmeyer L. J. The equivalence problem for regular ex- pressions with squaring requires exponential space. Proceedings of the 13th IEEE Symposium on Switching and Automata Theory, pages 125–

129, 1972.

[8] Pudlak P. Satisfiability - algorithms and logic. In Mathematical Foun- dations of Computer Science, pages 129–141. Springer, 1998.

[9] Papadimitriou, C. H. Computational Complexity. Addison-Wesley, 1994.

[10] M. A. Weiss. A polynomial algorithm for deciding 3-sat. Technical re- port, IME-USP. Mathematics Department, Universidade de Sao Paulo, 2007. weiss@ime.usp.br.

Referências

Documentos relacionados

Ao Dr Oliver Duenisch pelos contatos feitos e orientação de língua estrangeira Ao Dr Agenor Maccari pela ajuda na viabilização da área do experimento de campo Ao Dr Rudi Arno

Neste trabalho o objetivo central foi a ampliação e adequação do procedimento e programa computacional baseado no programa comercial MSC.PATRAN, para a geração automática de modelos

Ousasse apontar algumas hipóteses para a solução desse problema público a partir do exposto dos autores usados como base para fundamentação teórica, da análise dos dados

The probability of attending school four our group of interest in this region increased by 6.5 percentage points after the expansion of the Bolsa Família program in 2007 and

No campo, os efeitos da seca e da privatiza- ção dos recursos recaíram principalmente sobre agricultores familiares, que mobilizaram as comunidades rurais organizadas e as agências

didático e resolva as ​listas de exercícios (disponíveis no ​Classroom​) referentes às obras de Carlos Drummond de Andrade, João Guimarães Rosa, Machado de Assis,

If, on the contrary, our teaching becomes a political positioning on a certain content and not the event that has been recorded – evidently even with partiality, since the

Mas, apesar das recomendações do Ministério da Saúde (MS) sobre aleitamento materno e sobre as desvantagens de uso de bicos artificiais (OPAS/OMS, 2003), parece não