# ่ญๆ 0โ1 Integer Programming Problem ็บ NP-Complete ## Exercises 34.5โ2 Given an integer ๐ ร ๐ matrix ๐ด , and an integer ๐-vector ๐, the 0-1 integer-programming problem asks whether there exists an integer ๐-vector ๐ฅ with elements in the set {0, 1} such that ๐ด๐ฅ โค ๐. Prove that 0-1 integer programming problem is NP-complete (Hint: Reduce from 3-CNF-SAT.)  ๅ้ก๏ผๆฏๅฆๅญๅจไธๅคงๅฐ็บ n ็ vector ๐ฅ๏ผ๐ฅ ไธญ็ๅ ็ด ็็บ0ๆ1๏ผไฝฟๅพ ๐ด๐ฅ โค ๐ ๏ผ 1. ่ญๆ 0-1 IP โ NP ็ตฆๅฎไธๅคงๅฐ็บ n ็ vector ๐ฅ๏ผ๐ฅ ไธญ็ๅ ็ด ็็บ0ๆ1๏ผ๏ผๆฌฒ้ฉ่ญ ๐ด๐ฅ โค ๐ ๆฏๅฆๆ็ซ๏ผๅช้ๅฐ ๐ด๐ฅ ็ธไน๏ผไธฆๅฐ็ตๆ่ ๐ ไธไธๆฏๅฐใๆ้่ค้ๅบฆ็บ O(mn) + O(m)๏ผๅฏๆผ polynomial time ๅฎๆใ 2. ่ญๆ 3-CNF-SAT โค~p~ 0-1-IP ๆ3-CNF-SATๅ้ก่ฝๆ็บ0-1-IPๅ้ก: - ๅ่จญ ฮฆ ๆ m clauses ๅ n variablesใ - ๆๅๅฏไปฅๆๆฏๅ clause (๐ฅ~1~ โจ ยฌ๐ฅ~2~ โจ ยฌ๐ฅ~3~) ่ฝๆๆไธ็ญๅผ ๐ฅ~1~ + (1 - ๐ฅ~2~) + (1 - ๐ฅ~3~) โฅ 1๏ผๅๆด็็บ - ๐ฅ~1~ + ๐ฅ~2~ + ๐ฅ~3~ โค 1ใ - ้้่งๅฏๅฏ็ผ็พ๏ผๆฒๆๅ not ้็ฎ็ variable ๆไนไธ -1๏ผๆ็ถ้ not ้็ฎ็ variable ๅไนไธ 1ใ - ่ไธ็ญๅผๅณ้็ๅผ๏ผๅ็บ not ็ๆธ้ - 1ใ - ๅพๅบ็ฉ้ฃ ๐ด ็่ฝๆ Function: $$a_{i,j} = \left\{ \begin{aligned} -1 & & if \ x_j โ C_i\\ 1 & & if \ ยฌx_j โ C_i\\ 0 & & otherwise \end{aligned} \right.$$ - ่ vector ๐ ็่ฝๆ็บ: $$b_i = \sum\limits_{j = 1}^n{max(0, a_{i,j}) - 1}$$ ่ญๆๅญๅจไธๅn-vector ๐ฅ: ๐ด๐ฅ โค ๐ โบ ฮฆใ ่ฝๆ็ๆ้่ค้ๅบฆ็บO(mn)๏ผๅฏๆผ polynomial time ๅฎๆใ ็ฑ 1. ๅ 2. ๅฏๅพ็ฅ๏ผๅฏไปฅๅฐ 3-CNF-SAT ๅ้ก reduce ๅฐ 0-1 Integer-Programming ๅ้ก๏ผ0-1 Integer-Programming ๅ้ก็บNP-Complete ๅ้กใ Example: ฮฆ = (๐ฅ~1~ โจ ๐ฅ~2~ โจ ยฌ๐ฅ~3~) โง (๐ฅ~1~ โจ ๐ฅ~3~ โจ ๐ฅ~4~) โง (ยฌ๐ฅ~2~ โจ ยฌ๐ฅ~3~ โจ ยฌ๐ฅ~4~) $$ \left[ \begin{array}{cccc} -1 & -1 & 1 & 0 \\ -1 & 0 & -1 & -1 \\ 0 & 1 & 1 & 1 \end{array} \right] ร \left[ \begin{array}{cccc} x_1 \\ x_2 \\ x_3 \\ x_4 \end{array} \right] โค \left[ \begin{array}{cccc} 0 & -1 & 2 \end{array} \right] $$ > [name=ไป้บผ] ็ถๅๅฏซ้้ก็ๆๅ็ๅพๅพ็่ฆๆไปฅ่ฉฆๅ้ ็ฆๅพไบบใๆ๏ผๅธๆๅฏไปฅๅนซไธๅฟใ --- ๅ่่ณๆ๏ผ[Proving 0-1 integer programming is NP-complete (using reduction from 3-CNF-SAT)](https://gnarlyware.com/blog/proving-0-1-integer-programming-is-np-complete-using-reduction-from-3-cnf-sat/)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up