Software Application/Social Network

[Social Network] Strongly Connected Component (๊ฐ•๊ฒฐํ•ฉ)

๐ŸงSocial Network Analysis

 

๐Ÿ’ก ๊ฐ•๊ฒฐํ•ฉ (Strongly Connected)?

  • ๋ฐฉํ–ฅ์„ฑ ๊ทธ๋ž˜ํ”„์ผ ๋•Œ ์–ด๋– ํ•œ ๋…ธ๋“œ๋ผ๋„ ๋‹ค๋ฅธ ๋…ธ๋“œ๋กœ ๊ฐ€๋Š” ๊ธธ์ด ์กด์žฌ
  • ์•ฝ๊ฒฐํ•ฉ์€ ๋ฐฉํ–ฅ์„ฑ ์—†๋Š” ๊ทธ๋ž˜ํ”„์ผ ๋•Œ ๋‹ค๋ฅธ ๋…ธ๋“œ๋กœ ๊ฐ€๋Š” ๊ธธ์ด ์กด์žฌํ•˜๋ฉด ๋œ๋‹ค.

 

๐Ÿ’ก ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ (Strongly Connected Component) ๋ž€ ?

  • ๋ชจ๋“  ๋…ธ๋“œ์˜ ์Œ์€ ์„œ๋กœ ์—ฐ๊ฒฐ๋ผ ์žˆ๋‹ค.
  • ์œ„ ํŠน์„ฑ๊ณผ ํ•จ๊ป˜ ๋” ํฐ SCC๋Š” ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค.
  • ์•„๋ž˜ ๊ทธ๋ฆผ์—์„œ์˜ ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ = {A,B,C,G} , {E}, {F}, {D}

๋ชจ๋“  ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ๊ฐ„์˜ ๊ฐ„์„ ์„ ์ด์œผ๋ฉด DAG(Directed Acyclic Graph)๊ฐ€ ๋œ๋‹ค.

 

๐Ÿ” Proof by contradiction(์ˆ˜ํ•™์  ๊ท€๋ฅ˜๋ฒ•)์„ ์ด์šฉํ•œ ์ฆ๋ช…

 

์ฆ๋ช… 1.

  • ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ๊ฐ„์„ ์ด์€ G'๊ฐ€ ๋‘๊ฐœ(S, S')๊ฐ€ ์žˆ์œผ๋ฉฐ,  ๋‘ ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ๊ฐ„ ์ •์  v๋ฅผ ๊ณต์œ ํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜์ž 

  • ์œ„์™€ ๊ฐ™์ด ์ •์  v๊ฐ€ ๊ฒน์น˜๋ฉด ๋˜ ํ•˜๋‚˜์˜ SCC๊ฐ€ ๋งŒ๋“ค์–ด์ง„๋‹ค.
  • => SCC๋Š” ๋งŒ์กฑํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋” ํฐ SCC๊ฐ€ ์กด์žฌํ•˜๋ฉด ์•ˆ๋œ๋‹ค. ๋”ฐ๋ผ์„œ ๋ชจ์ˆœ(Contradiction)์ด๋‹ค.

์ฆ๋ช… 2.

  • G'๊ฐ€ DAG๊ฐ€ ์•„๋‹ˆ๋ผ๊ณ  ๊ฐ€์ •ํ•˜์ž.

  • DAG๊ฐ€ ์•„๋‹Œ G'์€ ๊ฐ•๊ฒฐํ•ฉ ์ปดํฌ๋„ŒํŠธ๋“ค ์‚ฌ์ด์— ๊ฐ„์„ ์ด ์ƒ๊ฒจ ํ•˜๋‚˜์˜ SCC๋กœ ๋ฌถ์—ฌ์ง€๋Š” ๋ชจ์ˆœ์ด ๋ฐœ์ƒํ•œ๋‹ค.

 

 

๐Ÿ” ์ •์  v๊ฐ€ ํฌํ•จ๋œ SCC์— ์†ํ•œ ๋‹ค๋ฅธ ์ •์ ๋“ค ์‰ฝ๊ฒŒ ์ฐพ๊ธฐ

 

์‰ฝ๊ฒŒ ์ฐพ๊ธฐ ์œ„ํ•ด์„œ๋Š”  v์—์„œ ๋‚˜์˜ฌ ์ˆ˜ ์žˆ๋Š” ์›์†Œ์™€ v์—์„œ ๋“ค์–ด ์˜ฌ ์ˆ˜ ์žˆ๋Š” ์›์†Œ ๊ฐ„ ๊ต์ง‘ํ•ฉ๋˜๋Š” ์›์†Œ๋“ค์„ ์ฐพ์œผ๋ฉด ๋œ๋‹ค.

ํ•˜์ง€๋งŒ In(v)๋ฅผ ์ฐพ๊ธฐ์—๋Š” ๊ณ„์‚ฐํ•˜๋Š”๋ฐ ๋งŽ์€ ๋น„์šฉ์ด ๋ฐœ์ƒํ•œ๋‹ค. ( Computational issue )

 

G ๊ทธ๋ž˜ํ”„์˜ ๊ฐ„์„ ๋“ค์˜ ๋ฐฉํ–ฅ์„ ๋’ค์ง‘์€ ๊ทธ๋ž˜ํ”„์˜ Out(v)๊ฐ€ ์›๋ž˜ G์˜ In(v)์™€ ๊ฐ™์Œ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

๋”ฐ๋ผ์„œ In(v)๋ฅผ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ ๋Œ€์‹ ์— ๊ฐ„์„ ๋“ค์˜ ๋ฐฉํ–ฅ์„ ๋’ค์ง‘์€ ๊ทธ๋ž˜ํ”„์˜ Out(v)๋ฅผ ๊ตฌํ•ด์ฃผ์ž.

์œ„์˜ ๋ฐฉ์‹์˜ ๊ณ„์‚ฐ ๋น„์šฉ์ด ๋” ์ ๊ฒŒ ๋‚˜์™€ ๋” ํšจ์œจ์ ์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

 

์ž๋ฃŒ ์ถœ์ฒ˜ : cc224w.stanford.edu

 

๊ถ๊ธˆํ•˜์‹  ๊ฒƒ์ด ์žˆ์œผ์‹œ๋ฉด ์–ธ์ œ๋“ ์ง€ ๋Œ“๊ธ€ ๋‹ฌ์•„์ฃผ์„ธ์š”!

 

 

๋ฐ˜์‘ํ˜•