2020-1ํ•™๊ธฐ, ๋Œ€ํ•™์—์„œ โ€˜์•Œ๊ณ ๋ฆฌ์ฆ˜โ€™ ์ˆ˜์—…์„ ๋“ฃ๊ณ  ๊ณต๋ถ€ํ•œ ๋ฐ”๋ฅผ ์ •๋ฆฌํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์ง€์ ์€ ์–ธ์ œ๋‚˜ ํ™˜์˜์ž…๋‹ˆ๋‹ค :)

8 minute read

2020-1ํ•™๊ธฐ, ๋Œ€ํ•™์—์„œ โ€˜์•Œ๊ณ ๋ฆฌ์ฆ˜โ€™ ์ˆ˜์—…์„ ๋“ฃ๊ณ  ๊ณต๋ถ€ํ•œ ๋ฐ”๋ฅผ ์ •๋ฆฌํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์ง€์ ์€ ์–ธ์ œ๋‚˜ ํ™˜์˜์ž…๋‹ˆ๋‹ค :)


Circuit-SAT is NP-complete

Circuit-SAT

๋จผ์ € Circuit-SAT๊ฐ€ ๋ฌด์—‡์ธ์ง€๋ถ€ํ„ฐ ์‚ดํŽด๋ณด์ž.

Definition. Circuit-SAT

Given a combinatorial circuit build out of $\text{AND}$, $\text{OR}$ and $\text{NOT}$ gates, is there a way to set the circuit inputs so that the output is $1$?

Circuit-SAT๋Š” ๊ทธ์ € boolean formula๊ฐ€ $\text{true}$์ธ์ง€ $\text{false}$์ธ์ง€๋ฅผ ํŒ๋‹จํ•˜๋Š” ๋ฌธ์ œ๋‹ค. SAT ๋ฌธ์ œ๊ฐ€ CNF ๊ผด์˜ boolean formula๊ฐ€ $\text{true}$์ธ์ง€ $\text{false}$์ธ์ง€๋ฅผ ํŒ๋‹จํ•˜๋Š” ๋ฌธ์ œ์ด๊ธฐ ๋•Œ๋ฌธ์— Circuit-SAT๋Š” SAT ๋ฌธ์ œ๋ฅผ generalizationํ•œ ๊ฒƒ์ธ ์…ˆ์ด๋‹ค. ์‹ค์ œ๋กœ SAT ๋ฌธ์ œ๋ฅผ Circuit-SAT ๋ฌธ์ œ๋กœ ํ‘œํ˜„ํ•˜๋Š” ๊ฒƒ์€ $\text{AND}$, $\text{OR}$, $\text{NOT}$ ๊ฒŒ์ดํŠธ๋ฅผ ์ ์ ˆํžˆ ์‚ฌ์šฉํ•ด ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Œ์„ ์‰ฝ๊ฒŒ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋‹ค.

\[\text{SAT} \le_P \text{Circuit-SAT}\]

Overview

์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ ์šฐ๋ฆฌ์˜ ๋ชฉ์ ์€ ๋ชจ๋“  $\textbf{NP}$ ๋ฌธ์ œ๊ฐ€ SAT ๋ฌธ์ œ๋กœ ํ™˜์›๋˜๋Š” ๊ฒƒ์„ ๋ณด์ด๋Š” ๊ฒƒ์ด๋‹ค. ์ด๊ฒƒ์€ SAT๊ฐ€ $\textbf{NP-complete}$์ž„์„ ์ฆ๋ช…ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋ฅผ ์ฆ๋ช…ํ•˜๊ธฐ ์œ„ํ•ด์„  ํ•˜๋‚˜์˜ ์ค‘๊ฐ„ ๋‹จ๊ณ„๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š”๋ฐ ๊ทธ๊ฒƒ์ด ๋ฐ”๋กœ <Circuit-SAT>์ด๋‹ค! ์šฐ๋ฆฌ๋Š” ๋ชจ๋“  $\textbf{NP}$ ๋ฌธ์ œ๊ฐ€ Circuit-SAT ๋ฌธ์ œ๋กœ ํ™˜์›๋จ์„ ๋ณด์ด๊ณ , Circuit-SAT ๋ฌธ์ œ๋ฅผ SAT๋กœ ํ™˜์›ํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ดํŽด๋ณผ ๊ฒƒ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ตœ์ข…์ ์œผ๋กœ SAT ๋ฌธ์ œ๊ฐ€ 3-SAT ๋ฌธ์ œ๋กœ ํ™˜์›๋จ์„ ๋ณด์ผ ๊ฒƒ์ด๋‹ค. ์ด๊ฒƒ์€ ์šฐ๋ฆฌ๊ฐ€ Reduction (2), Reduction (3) ํฌ์ŠคํŠธ์—์„œ ์‚ดํŽด๋ณธ <Independent Set>, <Vertex Cover> ๋“ฑ์˜ ๋ฌธ์ œ๊ฐ€ $\textbf{NP-complete}$์— ์†ํ•จ์„ ๋งํ•œ๋‹ค.

์ฆ๋ช…์€ ์œ„-์•„๋ž˜ ์ˆœ์„œ๋Œ€๋กœ ํ•˜์ง€ ์•Š๊ณ , ๋ณธ์ธ์ด ์ดํ•ดํ•˜๊ธฐ ํŽธํ–ˆ๋˜ ์ˆœ์„œ๋Œ€๋กœ ์ง„ํ–‰ํ•˜๊ฒ ๋‹ค.

  1. SAT โ†’ 3-SAT
  2. Circuit-SAT โ†’ 3-SAT
  3. All of NP โ†’ Circuit-SAT: Cook-Levin Theorem

SAT โ†’ 3-SAT

์ œ์ผ ๋จผ์ € <SAT>๊ฐ€ <3-SAT>๋กœ ํ™˜์›๋จ์œผ๋กœ ๋ณด์ด์ž. ์ด ๊ฒฝ์šฐ๋Š” ์ข€ ํŠน์ดํ•œ ์ƒํ™ฉ์ธ๋ฐ, <SAT>๋Š” <3-SAT>๋Š” generalization์ธ ๋ฐ˜๋ฉด์— <3-SAT>๋Š” <SAT>์˜ special case์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ๊ทธ๋ž˜์„œ

\[\text{3-SAT} \le_P \text{SAT}\]

๋Š” generalization๊ณผ special case์— ์˜ํ•ด ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์œ ๋„๋˜๋Š”๋ฐ, ์šฐ๋ฆฌ๊ฐ€ ์ฆ๋ช…ํ•  ๊ฒƒ์€

\[\text{SAT} \le_P \text{3-SAT}\]

์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋†€๋ž๊ฒŒ๋„ ์ด Reduction์ด ๊ฐ€๋Šฅํ•˜๋‹ค!

Proof

[Problem Transformation]

3๊ฐœ ์ด์ƒ์˜ literal์„ ๊ฐ€์ง„ clause $(a_1 \lor a_2 \lor \cdots \lor a_k) \, (k > 3)$๋ฅผ ์•„๋ž˜์˜ ๋ฐฉ์‹์œผ๋กœ 3-SAT์œผ๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค.

\[(a_1 \lor a_2 \lor \cdots \lor a_k) = (a_1 \lor a_2 \lor y_1)(\bar{y}_1 \lor a_3 \lor y_2)(\bar{y}_2 \lor a_4 \lor y_3) \cdots (\bar{y}_{k-3} \lor a_{k-1} \lor a_k)\]

์ด๋•Œ, $y_i$๋Š” ๋ชจ๋‘ ์ƒˆ๋กœ์šด boolean variable์ด๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์ด๋Ÿฐ ๋ณ€ํ™˜์ด ๋ง์ด ๋˜๋Š” ๊ฑธ๊นŒ? Why this work?

[Solution Transformation]

clause $(a_1 \lor a_2 \lor \cdots \lor a_k) = \text{true}$๊ฐ€ ๋˜๋ ค๋ฉด, ์ ์–ด๋„ ํ•˜๋‚˜์˜ $a_i$๋Š” $\text{true}$์—ฌ์•ผ ํ•œ๋‹ค.

  1. ๊ทธ๋Ÿฌ๋‚˜ ๋งŒ์•ฝ $a_i$ ๋ชจ๋‘ $\text{false}$๋ผ๋ฉด, ๋ชจ๋“  $y_i$๋Š” $\text{true}$๊ฐ€ ๋˜๋”๋ผ๋„, ๋งˆ์ง€๋ง‰ clause \((\bar{y}_{k-3} \lor a_{k-1} \lor a_k)\)๊ฐ€ $\text{false}$๊ฐ€ ๋˜์–ด์„œ 3-SAT์œผ๋กœ ๋ณ€ํ™˜ํ•œ clause๊ฐ€ not satisfying ํ•˜๋‹ค.

  2. ๋งŒ์•ฝ ์–ด๋–ค $a_i=\text{true}$๋ผ๊ณ  ํ•˜์ž. ๊ทธ๋Ÿฌ๋ฉด, $y_1, y_2, \dots, y_{i-2}$๊นŒ์ง€ ๋ชจ๋‘ $\text{true}$์ด๊ณ , $y_{i-1}$๋ถ€ํ„ฐ ๋ชจ๋‘ $\text{false}$๊ฐ€ ๋˜๋ฉด, 3-SAT์œผ๋กœ ๋ณ€ํ™˜ํ•œ clause๊ฐ€ satisfying ํ•œ๋‹ค.

์ฆ‰, 3-SAT transformed SAT๊ฐ€ satisfiableํ•˜๋ฉด, ์œ„์˜ ํŠน์„ฑ์„ ํ™œ์šฉํ•ด ์›๋ณธ SAT์˜ satisfiability์™€ truth assignment๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค!


Circuit-SAT โ†’ 3-SAT

์šฐ๋ฆฌ๋Š” ์ด๋ฏธ <Circuit-SAT>๊ฐ€ <SAT>์˜ generalization์ž„์„ ์•ˆ๋‹ค.

\[\text{SAT} \le_P \text{Circuit-SAT}\]

๊ทธ๋Ÿฌ๋‚˜ ์ด๋ฒˆ์— ์ฆ๋ช…ํ•˜๋Š” ๊ฑด, ๋ฐ˜๋Œ€ ๋ฐฉํ–ฅ์ธ

\[\text{Circuit-SAT} \le_P \text{SAT}\]

์ด๋‹ค. ๋ฐ”๋กœ ์œ„์—์„œ ์‚ดํŽด๋ณธ โ€œSAT โ†’ 3-SATโ€์ฒ˜๋Ÿผ special case๋ฅผ generalization์œผ๋กœ ํ™˜์›ํ•˜๋Š” ๊ฒƒ์ด๋‹ค!

Proof

[Problem Transformation]

Circuit Instance $k$์— ๋Œ€ํ•ด ๊ฐ ๋…ธ๋“œ๋ฅผ ๋ชจ๋‘ 3-SAT variable $x_i$๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค. ๊ทœ์น™์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

All of NP โ†’ Circuit-SAT: Cook-Levin Theorem

โ€˜๋ชจ๋“ โ€™ NP ๋ฌธ์ œ๋ผ๋‹ˆ! ์ง€๊ธˆ๊นŒ์ง€ ๋‹ค๋ฃฌ ํ™˜์› ์ค‘์—์„œ ๊ฐ€์žฅ ์ถ”์ƒ์ ์ธ ํ˜•ํƒœ์˜ ํ™˜์›์ด๋‹ค. ํ๋ฆ„์„ ์ž˜ ๋”ฐ๋ผ๊ฐ€๋Š”๊ฒŒ ์ค‘์š”ํ•œ๋ฐ, ์ผ๋‹จ ๋ณธ๊ฒฉ์ ์ธ ์ฆ๋ช…์„ ํ•˜๊ธฐ ์ „์— ์•„๋ž˜์˜ ๋…ผ์ฆ์„ ๋จผ์ € ์ดํ•ดํ•˜์ž.


์–ด๋–ค ๋ฌธ์ œ $X$๊ฐ€ $\textbf{NP}$์— ์†ํ•œ๋‹ค๋Š” ๊ฑด, ๋ฌธ์ œ $X$๊ฐ€ Search Problem์ด๋ผ๋Š” ๋ง์ด๋‹ค. Problem $X$๊ฐ€ Search Problem์ด๋ฏ€๋กœ polynomial-time algorithm์ธ verifier๊ฐ€ ์กด์žฌํ•œ๋‹ค, ๊ทธ๊ฒƒ์„ verifier $V$๋ผ๊ณ  ํ•˜์ž. verifier $V$๋Š” 2๊ฐ€์ง€๋ฅผ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›๋Š”๋ฐ, Problem $X$์˜ instance $x \in X$, ๊ทธ๋ฆฌ๊ณ  ์–ด๋–ค solution $s$์ด๋‹ค: $V(x, s)$.

์ด๋•Œ, ๊ณ ์ •๋œ ํฌ๊ธฐ์˜ $n$ bits๋ฅผ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์€ $\text{yes}/\text{no}$๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์–ด๋–ค ์•Œ๊ณ ๋ฆฌ์ฆ˜๋„ ํšŒ๋กœ(circuit)์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜, ์ด ํšŒ๋กœ ๋ณ€ํ™˜ ๊ณผ์ •์€ ์ž…๋ ฅ ๋น„ํŠธ $n$์— ๋Œ€ํ•ด polynomial-time ๋งŒ์— ๊ฐ€๋Šฅํ•˜๊ณ , ๊ทธ ํšŒ๋กœ์˜ ํฌ๊ธฐ๋„ ์ž…๋ ฅ ๋น„ํŠธ $n$์— ๋Œ€ํ•ด polynomial-size์ด๋‹ค. (๋ณธ์ธ์€ ๋Œ€์ถฉ computer๋กœ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์œผ๋‹ˆ ํšŒ๋กœ(circuit)์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ดํ•ดํ–ˆ๋‹ค.)

์œ„์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํšŒ๋กœ ๋ณ€ํ™˜๋กœ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์‚ฌ์‹ค์„ ๋ฐ”ํƒ•์œผ๋กœ verifier $V(x, s)$๋ฅผ circuit $C(x, s)$๋กœ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

์ž, ์ด์ œ ์ค€๋น„ ๊ณผ์ •์€ ๋๋‚ฌ๊ณ , ๋ณธ๊ฒฉ์ ์œผ๋กœ Problem $X$๋ฅผ <Circuit-SAT>๋กœ ํ™˜์›ํ•ด๋ณด์ž!

Proof

[Problem Transformation]

์•ž์„  ๋…ผ์˜๋ฅผ ํ†ตํ•ด Search Problem $X$์˜ Vertifier $V(x, s)$๋ฅผ circuit $C(x, s)$๋กœ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์ž, ์ด์ œ ๊ทธ circuit $C(x, s)$๊ฐ€ ์–ด๋–ป๊ฒŒ ์ƒ๊ฒผ๋Š”์ง€ ์‚ดํŽด๋ณด์ž.

์ฒซ์งธ, problem instance์ธ $x$๋ฅผ hard-coded input์ด๋‹ค. ๋‘˜์งธ, problem solution $s$๋Š” Circuit-SAT ๋ฌธ์ œ๊ฐ€ ์ฐพ์•„์•ผ ํ•˜๋Š” truth assignment์ด๋‹ค!

์˜ˆ๋ฅผ ๋“ค๋ฉด, ์œ„์™€ ๊ฐ™์€ <Indenpendent Set> ๋ฌธ์ œ์—์„œ ์™ผํŽธ์˜ Graph Instance๊ฐ€ $x$๋กœ hard-coded๋˜์–ด circuit ์ž…๋ ฅ์œผ๋กœ ๋“ค์–ด๊ฐ„๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ์ฐพ๊ณ ์ž ํ•˜๋Š” solution $s$๋Š” circuit์—์„œ ๋น„์›Œ์ ธ ์žˆ๋Š” ์ž…๋ ฅ๊ฐ’์œผ๋กœ ๋“ค์–ด๊ฐ€ Circuit-SAT๋ฅผ ํ‘ธ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ†ตํ•ด ๊ทธ ๊ฐ’์„ ์ฐพ์•„์•ผ ํ•œ๋‹ค!

์ •๋ฆฌํ•˜๋ฉด, ์ด๋ ‡๋‹ค.

โ€œTo solve a problem instance $x \in X$, take a circuit corresponding to $C(x, \cdot)$. Then, use a Circuit-SAT algorithm for this circuit to find a solution (if exist).โ€

์ฆ‰, ์–ด๋–ค Search Problem์„ ์ ์ ˆํ•œ Circuit-SAT ๋ฌธ์ œ๋กœ ๋ฐ”๊ฟ”์„œ, Circuit-SAT๋ฅผ ํ’€๋ฉด ํ•ด๋‹น Search Problem์„ ํ’€ ์ˆ˜ ์žˆ๋Š” ํ˜•ํƒœ๋กœ ํ™˜์›ํ–ˆ๋‹ค!

์ด ์ •๋ฆฌ๋ฅผ ํ†ตํ•ด <Circuit-SAT>๊ฐ€ $\textbf{NP-complete}$์ž„์„ ๋ณด์ด๊ฒŒ ๋˜๊ณ , ์ด์— ๋”ฐ๋ผ <Circuit-SAT> ๋˜๋Š” <SAT>๋กœ๋ถ€ํ„ฐ ํ™˜์›๋˜๋Š” ๋ชจ๋“  Search Problem๋“ค์ด $\textbf{NP-complete}$์— ์†ํ•˜๊ฒŒ ๋œ๋‹ค! ์ด ์ •๋ฆฌ๋ฅผ <Cookโ€“Levin Theorem>๋ผ๊ณ  ํ•˜๋Š”๋ฐ, ๋ณธ ํฌ์ŠคํŠธ์˜ ์ฆ๋ช…์€ ์ด ์ •๋ฆฌ๋ฅผ ์ •๋ง ๊ฐ„๋žตํ•˜๊ฒŒ ๊ธฐ์ˆ ํ•œ ๊ฒƒ์— ๋ถˆ๊ณผํ•˜๋‹ค ๐Ÿ™


์ž! ์ด๊ฒƒ์œผ๋กœ โ€œNP & NP-completeโ€ ๋‹จ์›์˜ ๋‚ด์šฉ์„ ๋ชจ๋‘ ์‚ดํŽด๋ดค๋‹ค! ํ˜„์žฅ ์ˆ˜์—…์—์„œ ๋“ค์„ ๋•Œ๋„ ์ œ์ผ ์–ด๋ ค์› ๋˜ ๋‹จ์›์ด๋ผ ์ œ๋Œ€๋กœ ์ดํ•ด๋„ ๋ชป ํ•˜๊ณ  ์‹œํ—˜์„ ๋ดค๋˜ ๊ธฐ์–ต์ด ์žˆ๋‹ค ๐Ÿ˜ข ๊ทธ๋ž˜์„œ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ˆ˜์—…์˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋ฉด, ๊ผญ ์ •๋ณตํ•˜๊ณ  ์‹ถ์—ˆ๋˜ ๋‹จ์›์„ ๋งˆ๋ฌด๋ฆฌ ํ•˜๊ฒŒ ๋˜์–ด ๋ฟŒ๋“ฏํ•˜๋‹ค. ์ด์ œ ๋งˆ์ง€๋ง‰ ๋‹จ์›๋งŒ ๋‚จ๊ฒจ๋‘์—ˆ๋Š”๋ฐ, ๋๊นŒ์ง€ ํž˜๋‚ด๋ณด์ž ๐Ÿ‘

ํ•จ๊ป˜๋ณด๊ธฐ

Reference

Categories:

Updated: