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

3 minute read

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


P-and-NP

โ€œP and NPโ€ ํฌ์ŠคํŠธ์—์„œ $\textbf{NP}$ ๋ฌธ์ œ๋Š” non-deterministic and polynomial-time solvableํ•œ ๋ฌธ์ œ๋ฅผ ๋งํ–ˆ๋‹ค. ๋˜๋Š” set of all search problems๋ผ๊ณ ๋„ ํ–ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์œ„์˜ ๊ทธ๋ฆผ์„ ๋ณด๋ฉด, $\textbf{P}$์™€ $\textbf{NP}$ ์™ธ์—๋„ โ€œ$\textbf{NP-complete}$โ€, โ€œ$\textbf{NP-hard}$โ€๋ผ๋Š” ํด๋ž˜์Šค๊ฐ€ ๋ˆˆ์— ๋ณด์ธ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” ๊ทธ๋“ค์— ๋Œ€ํ•ด ์‚ดํŽด๋ณด๊ฒ ๋‹ค.


NP-hard

Complexity Space๋ฅผ ํ‘œํ˜„ํ•œ ์œ„์˜ ๊ทธ๋ฆผ์„ ๋ณด๋ฉด, $\textbf{NP-complete}$๊ฐ€ $\textbf{NP}$์™€ $\textbf{NP-hard}$์˜ ๊ต์ง‘ํ•ฉ์ธ ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ž˜์„œ $\textbf{NP-complete}$๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด์„  $\textbf{NP-hard}$๋ฅผ ์ดํ•ดํ•ด์•ผ ํ•œ๋‹ค.

Definition. $\textbf{NP-hard}$

A problem $x$ is $\textbf{NP-hard}$ if every problem $y \in \textbf{NP}$ reduces to $x$.

์ฆ‰, $\textbf{NP}$์— ์†ํ•˜๋Š” ๋ชจ๋“  ๋ฌธ์ œ๋ฅผ polynomial-time reduction ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฌธ์ œ๋ผ๋ฉด, ๊ทธ ๋ฌธ์ œ๊ฐ€ $\textbf{NP-hard}$๋ผ๋Š” ๋ง์ด๋‹ค. Reduction์˜ ์˜๋ฏธ๋ฅผ ์ƒ๊ฐํ–ˆ์„ ๋•Œ, $A \le_p B$๊ฐ€ โ€œ๋ฌธ์ œ $B$๊ฐ€ ๋ฌธ์ œ $A$๋ณด๋‹ค ๋” ์–ด๋ ต๋‹คโ€๋Š” ์‚ฌ์‹ค์„ ๋งํ•ด์ฃผ๋‹ˆ, ๋ชจ๋“  ๋ฌธ์ œ๊ฐ€ ํ™˜์›๋˜๋Š” ๋Œ€์ƒ์ด๋ผ๋ฉด ๊ทธ ๋ฌธ์ œ๋Š” ์ •๋ง์ •๋ง์ •๋ง๋กœ ์–ด๋ ค์šด ๋ฌธ์ œ์ผ ๊ฒƒ์ด๋‹ค. ๊ทธ๋ž˜์„œ โ€œhardโ€๋ผ๋Š” ํ‘œํ˜„์ด ๋ถ™์—ˆ๋‹ค.

$\textbf{NP-hard}$ is โ€˜harderโ€™ than any problem of $\textbf{NP}$, in other words, โ€˜harderโ€™ than any search problem.


$\textbf{NP-hard}$์— ์†ํ•˜๋Š” ๋Œ€ํ‘œ์ ์ธ ๋ฌธ์ œ๋กœ๋Š” <Halting Problem>์ด ์žˆ๋‹ค. CS์—์„œ ์›Œ๋‚™ ์œ ๋ช…ํ•œ Undecidable ๋ฌธ์ œ์ด๊ธฐ์— ํ•ด๋‹น ๋ฌธ์ œ์— ๋Œ€ํ•ด ์ž˜ ์„ค๋ช…ํ•œ ์˜์ƒ์œผ๋กœ ์„ค๋ช…์„ ๋Œ€์ฒดํ•œ๋‹ค.

<Halting Problem>์˜ ๊ฒฝ์šฐ Search Problem์ด ์•„๋‹ˆ๊ธฐ์— $\textbf{NP}$์— ์†ํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ $\textbf{NP}$์— ์†ํ•˜๋Š”, ์ฆ‰ search problem์ธ $\textbf{NP-hard}$ ๋ฌธ์ œ๋„ ์กด์žฌํ•œ๋‹ค. ๊ทธ๊ฒƒ์ด ๋ฐ”๋กœ ์•„๋ž˜์—์„œ ์‚ดํŽด๋ณผ $\textbf{NP-complete}$ ๋ฌธ์ œ๋‹ค!


NP-complete

Definition. $\textbf{NP-complete}$

A problem $x$ is $\textbf{NP-hard}$ if $x \in \textbf{NP}$ and $x \in \textbf{NP-hard}$.

$\textbf{NP}$์™€ $\textbf{NP-hard}$์˜ ๊ต์ง‘ํ•ฉ๋ผ๋Š” ์˜๋ฏธ๋ฅผ ๊ทธ๋Œ€๋กœ ๋‹ด์€ $\textbf{NP-complete}$์˜ ์ •์˜๋‹ค. Search Problem์— ์†ํ•˜๋Š” $\textbf{NP-hard}$๋ผ๋Š” ์˜๋ฏธ์ธ๋ฐ, ๋Œ€ํ‘œ์ ์ธ ๋ฌธ์ œ๋กœ SAT ๋ฌธ์ œ๊ฐ€ $\textbf{NP-complete}$ ๋ฌธ์ œ๋‹ค.

์ด์ „ ํฌ์ŠคํŠธ์—์„œ๋Š” $\textbf{NP-complete}$๋ฅผ ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์˜ํ–ˆ๋Š”๋ฐ, ์ด๊ฒƒ๋„ ๋งž๋Š” ํ‘œํ˜„์ด๋‹ค.

Definition. $\textbf{NP-complete}$

A search problem is $\textbf{NP-complete}$ if all other search problems reduce to it.

๋ชจ๋“  Search Problem, ์ฆ‰ $\textbf{NP}$ Problem์ด ํ•ด๋‹น ๋ฌธ์ œ๋กœ Reduction ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด, ํ•ด๋‹น ๋ฌธ์ œ๋Š” $\textbf{NP-complete}$๋ผ๋Š” ๋ง์ด๋‹ค. ๋†€๋ž๊ฒŒ๋„ <Reduction>์„ ํ†ตํ•ด $\textbf{NP-complete}$์— ์†ํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ SAT ๋ฌธ์ œ ํ•˜๋‚˜๊ฐ€ ์•„๋‹ˆ๊ณ , 3-SAT, Independent-Set, 3D-Matching ๋ฌธ์ œ ๋“ฑ์ด SAT ๋ฌธ์ œ๋กœ๋ถ€ํ„ฐ ํ™˜์›๋˜๋ฉฐ, ๋˜ SAT๋กœ ๋ฌธ์ œ๋กœ ํ™˜์›๋จ์ด ์ฆ๋ช…๋˜์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์ง€๊ธˆ๊นŒ์ง€ ๋ช‡ ๊ฐœ์˜ ํฌ์ŠคํŠธ์— ๊ฑธ์ณ ์‚ดํŽด๋ณด์•˜๋˜ $\textbf{NP}$ ๋ฌธ์ œ๋“ค์€ ๋ชจ๋‘ $\textbf{NP-complete}$์ด๋‹ค!


๊ฒฐ๊ตญ $\textbf{NP-complete}$๋ฅผ ์˜จ์ „ํžˆ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด์„œ ๊ฐ์ข… $\textbf{NP}$ ๋ฌธ์ œ๋ถ€ํ„ฐ, $\textbf{NP-hard}$์˜ ๊ฐœ๋…๊นŒ์ง€ ์ˆ™์ง€ํ•ด์•ผ ํ–ˆ๋‹ค. ๋‹ค์Œ ํฌ์ŠคํŠธ๋ถ€ํ„ฐ ๊ฐ์ข… $\textbf{NP}$ ๋ฌธ์ œ๋“ค์ด ์–ด๋–ป๊ฒŒ Reduction ๋˜๋Š”์ง€๋ฅผ ํ•˜๋‚˜ํ•˜๋‚˜ ์‚ดํŽด๋ณด์ž.

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

Categories:

Updated: