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

  • View
    250

  • Download
    7

Embed Size (px)

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

  • NP- 3: NP-

    .

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

    . (Computer Science ) 3. NP- 1 / 42

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

  • 1

    2 NP-

    3

    . (Computer Science ) 3. NP- 2 / 42

  • 1

    2 NP-

    3

    . (Computer Science ) 3. NP- 2 / 42

  • 1

    2 NP-

    3

    . (Computer Science ) 3. NP- 2 / 42

  • 1

    2 NP-

    3

    . (Computer Science ) 3. NP- 3 / 42

  • , , , , ( n, n2,n3) . (,, ) : n! n n , n nn2 , , , s t.

    . (Computer Science ) 3. NP- 4 / 42

  • , , , , ( n, n2,n3) .

    (,, ) : n! n n , n nn2 , , , s t.

    . (Computer Science ) 3. NP- 4 / 42

  • , , , , ( n, n2,n3) . (,, ) : n! n n , n nn2 , , , s t.

    . (Computer Science ) 3. NP- 4 / 42

  • , , . , 2n , . , , .

    . (Computer Science ) 3. NP- 5 / 42

  • , , . , 2n , .

    , , .

    . (Computer Science ) 3. NP- 5 / 42

  • , , . , 2n , . , , .

    . (Computer Science ) 3. NP- 5 / 42

  • (satisfiabilityproblem, SAT) :

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

    .

    . (Computer Science ) 3. NP- 6 / 42

  • (satisfiabilityproblem, SAT) :

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

    .

    . (Computer Science ) 3. NP- 6 / 42

  • (satisfiabilityproblem, SAT) :

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

    .

    . (Computer Science ) 3. NP- 6 / 42

  • (searchproblem). (instance) I ( , ; ) (solution) S(, ; ). , . S I .

    . (Computer Science ) 3. NP- 7 / 42

  • (searchproblem).

    (instance) I ( , ; ) (solution) S(, ; ). , . S I .

    . (Computer Science ) 3. NP- 7 / 42

  • (searchproblem). (instance) I ( , ; ) (solution) S(, ; ). , .

    S I .

    . (Computer Science ) 3. NP- 7 / 42

  • (searchproblem). (instance) I ( , ; ) (solution) S(, ; ). , . S I .

    . (Computer Science ) 3. NP- 7 / 42

  • , , I S |I | . , S I , (I , S) = true.

    . (Computer Science ) 3. NP- 8 / 42

  • (traveling salesman problem, TSP) n 1, . . . , n n(n 1)/2 , b. , ( ) b, , . , (1), . . . , (n),

    d(1),(2) + d(2),(3) + + d(n),(1) b .

    . (Computer Science ) 3. NP- 9 / 42

  • (traveling salesman problem, TSP) n 1, . . . , n n(n 1)/2 , b.

    , ( ) b, , . , (1), . . . , (n),

    d(1),(2) + d(2),(3) + + d(n),(1) b .

    . (Computer Science ) 3. NP- 9 / 42

  • (traveling salesman problem, TSP) n 1, . . . , n n(n 1)/2 , b. , ( ) b, , .

    , (1), . . . , (n),

    d(1),(2) + d(2),(3) + + d(n),(1) b .

    . (Computer Science ) 3. NP- 9 / 42

  • (traveling salesman problem, TSP) n 1, . . . , n n(n 1)/2 , b. , ( ) b, , . , (1), . . . , (n),

    d(1),(2) + d(2),(3) + + d(n),(1) b .

    . (Computer Science ) 3. NP- 9 / 42

  • , ? , . TSP, b, ?

    . (Computer Science ) 3. NP- 10 / 42

  • , ?

    , . TSP, b, ?

    . (Computer Science ) 3. NP- 10 / 42

  • , ? , .

    TSP, b, ?

    . (Computer Science ) 3. NP- 10 / 42

  • , ? , . TSP, b, ?

    . (Computer Science ) 3. NP- 10 / 42

  • : b T ,

    (i ,j)T

    dij b .

    , , , . .

    . (Computer Science ) 3. NP- 11 / 42

  • : b T ,

    (i ,j)T

    dij b .

    , , , . .

    . (Computer Science ) 3. NP- 11 / 42

  • : b T ,

    (i ,j)T

    dij b .

    , , , .

    .

    . (Computer Science ) 3. NP- 11 / 42

  • : b T ,

    (i ,j)T

    dij b .

    , , , . .

    . (Computer Science ) 3. NP- 11 / 42

  • ,

    (independent set problem) g g , , . (vertex cover problem) b, b , ( b , ). (clique problem) g g , .

    . (Computer Science ) 3. NP- 12 / 42

  • ,

    (independent set problem) g g , , .

    (vertex cover problem) b, b , ( b , ). (clique problem) g g , .

    . (Computer Science ) 3. NP- 12 / 42

  • ,

    (independent set problem) g g , , . (vertex cover problem) b, b , ( b , ).

    (clique problem) g g , .

    . (Computer Science ) 3. NP- 12 / 42

  • ,

    (independent set problem) g g , , . (vertex cover problem) b, b , ( b , ). (clique problem) g g , .

    . (Computer Science ) 3. NP- 12 / 42

  • , (longest path problem)? , s t, g . s t g .

    . (Computer Science ) 3. NP- 13 / 42

  • , (longest path problem)?

    , s t, g . s t g .

    . (Computer Science ) 3. NP- 13 / 42

  • , (longest path problem)? , s t, g .

    s t g .

    . (Computer Science ) 3. NP- 13 / 42

  • , (longest path problem)? , s t, g . s t g .

    . (Computer Science ) 3. NP- 13 / 42

  • (knapsack problem): w1, . . . ,wn N v1, . . . , vn N n . W g . , W , g . , O(nW ). , W , logW .

    . (Computer Science ) 3. NP- 14 / 42

  • (knapsack problem): w1, . . . ,wn N v1, . . . , vn N n . W g .

    , W , g . , O(nW ). , W , logW .

    . (Computer Science ) 3. NP- 14 / 42

  • (knapsack problem): w1, . . . ,wn N v1, . . . , vn N n . W g . , W , g .

    , O(nW ). , W , logW .

    . (Computer Science ) 3. NP- 14 / 42

  • (knapsack problem): w1, . . . ,wn N v1, . . . , vn N n . W g . , W , g . , O(nW ). , W , logW .

    . (Computer Science ) 3. NP- 14 / 42

  • , , , ., 12 IIIIIIIIIIII . , , , (unaryknapsack). , .

    . (Computer Science ) 3. NP- 15 / 42

  • , , , .

    , 12 IIIIIIIIIIII . , , , (unaryknapsack). , .

    . (Computer Science ) 3. NP- 15 / 42

  • , , , ., 12 IIIIIIIIIIII .

    , , , (unaryknapsack). , .

    . (Computer Science ) 3. NP- 15 / 42

  • , , , ., 12 IIIIIIIIIIII . , , , (unaryknapsack).

    , .

    . (Computer Science ) 3. NP- 15 / 42

  • , , , ., 12 IIIIIIIIIIII . , , , (unaryknapsack). , .

    . (Computer Science ) 3. NP- 15 / 42

  • . , W g . , (subset sum problem), W . , . ?

    . (Computer Science ) 3. NP- 16 / 42

  • . , W g .

    , (subset sum problem), W . , . ?

    . (Computer Science ) 3. NP- 16 / 42

  • . , W g . , (subset sum problem), W . , . ?

    . (Computer Science ) 3. NP- 16 / 42

  • NP-

    1

    2 NP-

    3

    . (Computer Science ) 3. NP- 17 / 42

  • NP-

    (NP-) ( P)

    3-SAT 2-SAT, Horn SAT

    . (Computer Science ) 3. NP- 18 / 42

  • NP-

    , , , , . . , . : , .

    . (Computer Science ) 3. NP- 19 / 42

  • NP-

    , , , , . .

    , . : , .

    . (Computer Science ) 3. NP- 19 / 42

  • NP-

    , , , , . . , .

    : , .

    . (Computer Science ) 3. NP- 19 / 42

  • NP-

    , , , , . . , . : , .

    . (Computer Science ) 3. NP- 19 / 42

  • NP-

    P NP

    NP .P , .

    . (Computer Science ) 3. NP- 20 / 42

  • NP-

    P NP

    NP .

    P , .

    . (Computer Science ) 3. NP- 20 / 42

  • NP-

    P NP

    NP .P , .

    . (Computer Science ) 3. NP- 20 / 42

  • NP-

    , P =NP, ? , , ( , )? (reductions), . , , , . , , , NP: , NP. , , P =NP, .

    . (Computer Science ) 3. NP- 21 / 42

  • NP-

    , P =NP, ? , , ( , )?

    (reductions), . , , , . , , , NP: , NP. , , P =NP, .

    . (Computer Science ) 3. NP- 21 / 42

  • NP-

    , P =NP,