# Алгоритмы для NP-трудных задач, осень 2009: Алгоритмы расщепления

• View
87

1

Embed Size (px)

Transcript

• NP- 8:

.

Computer Science http://logic.pdmi.ras.ru/infclub/

. (Computer Science ) 8. 1 / 20

http://logic.pdmi.ras.ru/~infclub/

• 1

2

. (Computer Science ) 8. 2 / 20

• 1

2

. (Computer Science ) 8. 2 / 20

• 1

2

. (Computer Science ) 8. 3 / 20

• 2-

2- (maximum 2-satisfiability) , 2- ( ). NP- ( 2-). 2- .

. (Computer Science ) 8. 4 / 20

• 2-

2- (maximum 2-satisfiability) , 2- ( ).

NP- ( 2-). 2- .

. (Computer Science ) 8. 4 / 20

• 2-

2- (maximum 2-satisfiability) , 2- ( ). NP- ( 2-).

2- .

. (Computer Science ) 8. 4 / 20

• 2-

2- (maximum 2-satisfiability) , 2- ( ). NP- ( 2-). 2- .

. (Computer Science ) 8. 4 / 20

• n K L

n m

, . .

. (Computer Science ) 8. 5 / 20

• n K L

n m

, . .

. (Computer Science ) 8. 5 / 20

• : K K2

(x a) (x b) (x c) (x d) (x e) . . .XXXXXXXXz

9x = 1 x = 0(d) (e) . . . (a) (b) (c) . . .

K = 3 K = 2

K2 = 5 K2 = 5

K2 K

K2 : K2(F ) = 0, F

. (Computer Science ) 8. 6 / 20

• : K K2

(x a) (x b) (x c) (x d) (x e) . . .XXXXXXXXz

9x = 1 x = 0(d) (e) . . . (a) (b) (c) . . .

K = 3 K = 2

K2 = 5 K2 = 5

K2 KK2 : K2(F ) = 0, F

. (Computer Science ) 8. 6 / 20

• : K K2

(x a) (x b) (x c) (x d) (x e) . . .XXXXXXXXz

9x = 1 x = 0(d) (e) . . . (a) (b) (c) . . .

K = 3 K = 2

K2 = 5 K2 = 5

K2 KK2 : K2(F ) = 0, F

. (Computer Science ) 8. 6 / 20

• : K K2

(x a) (x b) (x c) (x d) (x e) . . .XXXXXXXXz

9x = 1 x = 0(d) (e) . . . (a) (b) (c) . . .

K = 3 K = 2

K2 = 5 K2 = 5

K2 KK2 : K2(F ) = 0, F

. (Computer Science ) 8. 6 / 20

• Ni , i2-.

2-: K2 =Ni=1

i2Ni

: = N3 + 1.9 N4 +Ni=5

i2Ni

K2 -q q q q q q qN1 N2 N3 N4 N5 N60 0.5 1 1.5 2 2.5 3

-q q q q q qN1,N2 N3 N4 N5 N6

. (Computer Science ) 8. 7 / 20

• 2K/5.5

MAX-2-SAT poly(K ) 2K/5.5, K F .

2/5.5; , K2 K , 5.5

. (Computer Science ) 8. 8 / 20

• 2K/5.5

MAX-2-SAT poly(K ) 2K/5.5, K F .

2/5.5; , K2 K , 5.5

. (Computer Science ) 8. 8 / 20

• 2K/5.5

MAX-2-SAT poly(K ) 2K/5.5, K F .

2/5.5; , K2 K

, 5.5

. (Computer Science ) 8. 8 / 20

• 2K/5.5

MAX-2-SAT poly(K ) 2K/5.5, K F .

2/5.5; , K2 K , 5.5

. (Computer Science ) 8. 8 / 20

• 0 1 1.9 2.5 3 -q qq qq qq qq q

N1,N2 N3 N4 N5 N6

, 2-

2-: 3+ 6 0.5 = 6 2-: 2.5+ 5 0.6 = 5.5 2-: 1.9+ 4 0.9 = 5.5

. (Computer Science ) 8. 9 / 20

• 0 1 1.9 2.5 3 -q qq qq qq qq q

N1,N2 N3 N4 N5 N6s s

, 2- 2-: 3+ 6 0.5 = 6

2-: 2.5+ 5 0.6 = 5.5 2-: 1.9+ 4 0.9 = 5.5

. (Computer Science ) 8. 9 / 20

• 0 1 1.9 2.5 3 -q qq qq qq qq q

N1,N2 N3 N4 N5 N6s s

, 2- 2-: 3+ 6 0.5 = 6 2-: 2.5+ 5 0.6 = 5.5

2-: 1.9+ 4 0.9 = 5.5

. (Computer Science ) 8. 9 / 20

• 0 1 1.9 2.5 3 -q qq qq qq qq q

N1,N2 N3 N4 N5 N6s s

, 2- 2-: 3+ 6 0.5 = 6 2-: 2.5+ 5 0.6 = 5.5 2-: 1.9+ 4 0.9 = 5.5

. (Computer Science ) 8. 9 / 20

• (n, 3)-MAX-2-SAT

F 2- F , 2-; , (F ) = N(F ) , ( )

. (Computer Science ) 8. 10 / 20

• (n, 3)-MAX-2-SAT

F 2-

F , 2-; , (F ) = N(F ) , ( )

. (Computer Science ) 8. 10 / 20

• (n, 3)-MAX-2-SAT

F 2- F , 2-; ,

(F ) = N(F ) , ( )

. (Computer Science ) 8. 10 / 20

• (n, 3)-MAX-2-SAT

F 2- F , 2-; , (F ) = N(F )

, ( )

. (Computer Science ) 8. 10 / 20

• (n, 3)-MAX-2-SAT

F 2- F , 2-; , (F ) = N(F ) ,

( )

. (Computer Science ) 8. 10 / 20

• (n, 3)-MAX-2-SAT

F 2- F , 2-; , (F ) = N(F ) , ( )

. (Computer Science ) 8. 10 / 20

• 1

2

. (Computer Science ) 8. 11 / 20

• , , , , .

{y = 0}

(x y z) (x y) (y z) (y z).

. (Computer Science ) 8. 12 / 20

• , , , , .

{y = 0}

(x y z) (x y) (y z) (y z).

. (Computer Science ) 8. 12 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n. t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2. , cnk .

. (Computer Science ) 8. 13 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n. t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2. , cnk .

. (Computer Science ) 8. 13 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n. t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2. , cnk .

. (Computer Science ) 8. 13 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n.

t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2. , cnk .

. (Computer Science ) 8. 13 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n. t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2.

, cnk .

. (Computer Science ) 8. 13 / 20

• k-SAT 2n ?

(x1 x2 xt) F k- F [x1 = 1],F [x1 = 0, x2 = 1],F [x1 = 0, x2 = 0, x3 = 1],. . .F [x1 = 0, x2 = 0, . . . , xt1 = 0, xt = 1].

(1, 2, . . . , t)- n. t k , (1, 2, . . . , t) (1, 2, . . . , k) = ck < 2. , cnk .

. (Computer Science ) 8. 13 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)

F [a = 0] = F C1 Cp F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

,

F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , .

F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a).

, F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0.

F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• F = F (a C1) (a Cp) (a D1) . . . (a Dq)F [a = 0] = F C1 Cp

F0

, F [a = 1] = F D1 Dq F1

, F0 , . F0 , F [a = 0] ( 1 a). , F0. F [a = 0] , , F . , F [a = 1].

. (Computer Science ) 8. 14 / 20

• :

F

F F0 F F1

a = 0 a = 1

. (Computer Science ) 8. 15 / 20

• :

F

F F0 F F1

a = 0 a = 1

F0

. (Computer Science ) 8. 15 / 20