3-PARTITION problem

后端 未结 6 1982
醉酒成梦
醉酒成梦 2020-12-05 05:56

here is another dynamic programming question (Vazirani ch6)

Consider the following 3-PARTITION problem. Given integers a1...an, we want to determine whet

6条回答
  •  情深已故
    2020-12-05 06:17

    I think by reduction it goes like this:

    Reducing 2-partition to 3-partition:

    Let S be the original set, and A be its total sum, then let S'=union({A/2},S). Hence, perform a 3-partition on the set S' yields three sets X, Y, Z. Among X, Y, Z, one of them must be {A/2}, say it's set Z, then X and Y is a 2-partition. The witnesses of 3-partition on S' is the witnesses of 2-partition on S, thus 2-partition reduces to 3-partition.

提交回复
热议问题