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

1 minute read

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


Given a graph, find a cycle that passes through every vertex exactly once.

์ฆ‰, ํŽœ์„ ํ•œ๋ฒˆ๋„ ๋–ผ์ง€ ์•Š๊ณ  ๋ชจ๋“  ์ •์ ์„ ๋ฐฉ๋ฌธํ•  ์ˆ˜ ์žˆ๋ƒ์— ๋Œ€ํ•œ ์งˆ๋ฌธ์ด๋‹ค.

DP ์ฑ•ํ„ฐ์—์„œ ๋‹ค๋ฃฌ <์™ธํŒ์› ์ˆœํšŒ๋ฌธ์ œ; Traveling Salesman Problem>์™€ ๋น„์Šทํ•˜๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์™ธํŒ์› ๋ฌธ์ œ๋Š” ํ•ด๋ฐ€ํ„ด ์‚ฌ์ดํด์„ ์ฐพ๋˜, ๊ทธ ์ค‘์—์„œ ๊ฐ€์žฅ ์ž‘์€ ๋น„์šฉ์„ ๊ฐ–๋Š” ์‚ฌ์ดํด์„ ์ฐพ์•„์•ผ ํ•œ๋‹ค. ์ฆ‰, ์™ธํŒ์› ๋ฌธ์ œ๋Š” ํ•ด๋ฐ€ํ„ด ์‚ฌ์ดํด ๋ฌธ์ œ์—์„œ ์ตœ์ ํ•ด์— ๋Œ€ํ•œ ์กฐ๊ฑด์ด ๋” ๋ถ™์€ ๊ฒƒ์ด๋‹ค.

๊ฐ„์„ (edge)์„ ๋ชจ๋‘ ๋ฐฉ๋ฌธํ•ด์•ผ ํ•˜๋Š” <์˜ค์ผ๋Ÿฌ ๊ฒฝ๋กœ ๋ฌธ์ œ; Euler Path Problem>์™€ ๋น„๊ตํ•˜๋ฉด, ์ •์ (vertex)์„ ๋ฐฉ๋ฌธํ•˜๋Š” ํ•ด๋ฐ€ํ„ด ๊ฒฝ๋กœ ๋ฌธ์ œ ์ชฝ์ด ๋” ์‰ฌ์›Œ ๋ณด์ผ์ง€๋„ ๋ชจ๋ฅธ๋‹ค. ๋ณดํ†ต ๊ทธ๋ž˜ํ”„์—์„œ ๊ฐ„์„ ์ด ์ •์ ๋ณด๋‹ค ์ˆ˜๊ฐ€ ๋งŽ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ํ•ด๋ฐ€ํ„ด ๊ฒฝ๋กœ ๋ฌธ์ œ ์ชฝ์ด ํ›จ-์”ฌ ์–ด๋ ต๊ณ , poly-time algorithm๋„ ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๊ฒƒ์€ ์ •์ ์„ ํ•œ๋ฒˆ์”ฉ๋งŒ ๋ฐฉ๋ฌธํ•˜๋Š” ๊ฒƒ์ด ๊ฐ„์„ ์„ ํ•œ๋ฒˆ์”ฉ๋งŒ ๋ฐฉ๋ฌธํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ๋” ๊ฐ•ํ•œ ์กฐ๊ฑด์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค!

NP ๋ฌธ์ œ์ธ๊ฐ€?

<์™ธํŒ์› ๋ฌธ์ œ>์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ <ํ•ด๋ฐ€ํ„ด ๊ฒฝ๋กœ ๋ฌธ์ œ> ๋ฌธ์ œ๋„ class NP์— ์†ํ•œ๋‹ค. solution $S$๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ ๊ฒ€์‚ฐ์€ poly-time์— ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, solution์„ ์ฐพ๋Š” poly-time ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋ž˜์„œ <ํ•ด๋ฐ€ํ„ด ๊ฒฝ๋กœ ๋ฌธ์ œ>๋„ NP ๋ฌธ์ œ์— ํ•ด๋‹นํ•œ๋‹ค. P, NP์— ํ•ด๋‹น ๋‚ด์šฉ์€ โ€œP and NPโ€ ํฌ์ŠคํŠธ๋ฅผ ์ฐธ๊ณ ํ•˜์ž.

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

Categories:

Updated: