Эффективные алгоритмы, осень 2007: Приближённые алгоритмы

Embed Size (px)

Text of Эффективные алгоритмы, осень 2007: Приближённые...

  • / 4:

    .

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

    . (CS ) 4. 1 / 25

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

  • 1

    2

    . (CS ) 4. 2 / 25

  • 1

    2

    . (CS ) 4. 2 / 25

  • 1

    2

    . (CS ) 4. 3 / 25

  • (vertex cover problem) , .

    2- . 2- ., 2-, , .

    . (CS ) 4. 4 / 25

  • (vertex cover problem) , .

    2- . 2- ., 2-, , .

    . (CS ) 4. 4 / 25

  • (vertex cover problem) , .

    2- .

    2- ., 2-, , .

    . (CS ) 4. 4 / 25

  • (vertex cover problem) , .

    2- . 2- .

    , 2-, , .

    . (CS ) 4. 4 / 25

  • (vertex cover problem) , .

    2- . 2- ., 2-, , .

    . (CS ) 4. 4 / 25

  • Rand-Approx-Vertex-Cover(G )

    C = , C C

    Rand-Approx-Vertex-Cover 2-.

    . (CS ) 4. 5 / 25

  • Rand-Approx-Vertex-Cover(G )

    C =

    , C C

    Rand-Approx-Vertex-Cover 2-.

    . (CS ) 4. 5 / 25

  • Rand-Approx-Vertex-Cover(G )

    C = , C

    C

    Rand-Approx-Vertex-Cover 2-.

    . (CS ) 4. 5 / 25

  • Rand-Approx-Vertex-Cover(G )

    C = , C C

    Rand-Approx-Vertex-Cover 2-.

    . (CS ) 4. 5 / 25

  • Rand-Approx-Vertex-Cover(G )

    C = , C C

    Rand-Approx-Vertex-Cover 2-.

    . (CS ) 4. 5 / 25

  • Copt . , , Copt., C Copt 1/2. ., |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt .

    , , Copt., C Copt 1/2. ., |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt . , , Copt.

    , C Copt 1/2. ., |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt . , , Copt., C Copt 1/2.

    ., |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt . , , Copt., C Copt 1/2. .

    , |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt . , , Copt., C Copt 1/2. ., |Copt| .

    , . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • Copt . , , Copt., C Copt 1/2. ., |Copt| ., . ( |C |) 2|Copt|.

    . (CS ) 4. 6 / 25

  • G = (V ,E ), v w(v). .

    2- , : (u, v) ,

    1w(u)(

    1w(u) +

    1w(v)

    )1

    u, 1w(v)(

    1w(u) +

    1w(v)

    )1 v .

    . (CS ) 4. 7 / 25

  • G = (V ,E ), v w(v).

    .

    2- , : (u, v) ,

    1w(u)(

    1w(u) +

    1w(v)

    )1

    u, 1w(v)(

    1w(u) +

    1w(v)

    )1 v .

    . (CS ) 4. 7 / 25

  • G = (V ,E ), v w(v). .

    2- , : (u, v) ,

    1w(u)(

    1w(u) +

    1w(v)

    )1

    u, 1w(v)(

    1w(u) +

    1w(v)

    )1 v .

    . (CS ) 4. 7 / 25

  • G = (V ,E ), v w(v). .

    2- , : (u, v) ,

    1w(u)(

    1w(u) +

    1w(v)

    )1

    u, 1w(v)(

    1w(u) +

    1w(v)

    )1 v .

    . (CS ) 4. 7 / 25

  • G = (V ,E ), v w(v). .

    2- , : (u, v) ,

    1w(u)(

    1w(u) +

    1w(v)

    )1

    u, 1w(v)(

    1w(u) +

    1w(v)

    )1 v .

    . (CS ) 4. 7 / 25

  • minvV

    w(v)x(v)

    x(v1) + x(v2) 1, (v1, v2) E

    x(v) {0, 1}, v V

    . (CS ) 4. 8 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 .

    {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV .

    :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}.

    ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.

    w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • x(v) {0, 1} x(v) 0 . {x(v)}vV . :

    x(v) =

    {1, x(v) 1/20,

    C = {v V |x(v) = 1}. ( ), (u, v) x(u) + x(v) 1, , x(u) 1/2 x(v) 1/2.w(C ) =

    vV w(v)x(v) 2

    vV w(v)x(v) 2w(Copt).

    . (CS ) 4. 9 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C =

    (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}

    I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1)

    I w(v2) = w(v2) 0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-1(G , w)

    C = (v1, v2), w(v1) > 0 w(v2) > 0, :

    I = min{w(v1),w(v2)}I w(v1) = w(v1) I w(v2) = w(v2)

    0

    . (CS ) 4. 10 / 25

  • Weighted-Vertex-Cover-2(G , w)

    (v1, v2) E w(v1) = 0, w(v2) = 0, 0 , w(v1) > 0 w(v2) > 0 :

    (v) =

    {min{w(v1),w(v2)}, v {v1, v2}0,

    Weighted-Vertex-Cover-2(G , w )

    . (CS ) 4. 11 / 25

  • Weighted-Vertex-Cover-2(G , w)

    (v1, v2) E w(v1) = 0, w(v2) = 0, 0

    , w(v1) > 0 w(v2) > 0 :

    (v) =

    {min{w(v1),w(v2)}, v {v1, v2}0,

    Weighted-Vertex-Cover-2(G , w )

    . (CS ) 4. 11 / 25

  • Weighted-Vertex-Cover-2(G , w)

    (v1, v2) E w(v1) = 0, w(v2) = 0, 0 , w(v1) > 0 w(v2) > 0

    :

    (v) =

    {min{w(v1),w(v2)}, v {v1, v2}0,

    Weighted-Vertex-Cover-2(G , w )

    . (CS ) 4. 11 / 25

  • Weighted-Vertex-Cover-2(G , w)

    (v1, v2) E w(v1) = 0, w(v2) = 0, 0 , w(v1) > 0 w(v2) > 0 :

    (v) =

    {min{w(v1),w(v2)}, v {v1, v2}0,

    Weighted-Vertex-Cover-2(G , w )

    . (CS ) 4. 11 / 25

  • Weighted-Vertex-Cover-2(G , w)

    (v1, v2) E w(v1) = 0, w(v2) = 0, 0 , w(v1) > 0 w(v2) > 0 :

    (v) =

    {min{w(v1),w(v2)}, v {v1, v2}0,

    Weighted-Vertex-Cover-2(G , w )

    . (CS ) 4. 11 / 25

  • Weighted-Vertex-Cover-2 2-.

    OPT(w), OPT(w ), OPT() w , w , , , Copt, Cwopt , C opt .

    w(Copt) = (w )(Copt) + (Copt) (w )(Cwoptw) + (Copt)

    OPT(w) OPT(w ) + OPT()

    vV w(v).

    0, .

    . (CS ) 4. 12 / 25

  • Weighted-Vertex-Cover-2 2-.

    OPT(w), OPT(w ), OPT() w , w , , , Copt, Cwopt , C opt .

    w(Copt) = (w )(Copt) + (Copt) (w )(Cwoptw) + (Copt)

    OPT(w) OPT(w ) + OPT()

    vV w(v).

    0, .

    . (CS ) 4. 12 / 25

  • Weighted-Vertex-Cover-2 2-.

    OPT(w), OPT(w ), OPT() w , w , , , Copt, Cwopt , C opt .

    w(Copt) = (w )(Copt) + (Copt) (w )(Cwoptw) + (Copt)

    OPT(w) OPT(w ) + OPT()

    vV w(v).

    0, .

    . (CS ) 4. 12 / 25

  • Weighted-Vertex-Cover-2 2-.

    OPT(w), OPT(w ), OPT() w , w , , , Copt, Cwopt , C opt .

    w(Copt) = (w )(Copt) + (Copt) (w )(Cwoptw) + (Copt)

    OPT(w) OPT(w ) + OPT()

    vV w(v).

    0, .

    . (CS ) 4. 12 / 25

Recommended

View more >