Graph vs Tree

Tree vs Graph

๊ณตํ†ต์ 

  • Node์™€ Edge๋กœ ๊ตฌ์„ฑ๋จ

    • Node: ํ•˜๋‚˜์˜ ์ง€์ . ๋ณดํ†ต ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง

    • Edge: Node๋ฅผ ์ž‡๋Š” ์„ 

์ฐจ์ด์ 

  • Tree๋Š” Graph ์ค‘ ํŠน์ • ์กฐ๊ฑด์„ ๋งŒ์กฑํ•˜๋Š” ์ผ๋ถ€ ๊ทธ๋ž˜ํ”„๋ฅผ ์นญํ•˜๋Š” ์šฉ์–ด

  • Tree๋Š” Cycle์ด ์กด์žฌํ•˜์ง€ ์•Š์Œ

  • Tree๋Š” ํ•œ Node์—์„œ ๋‹ค๋ฅธ ํ•œ Node๋กœ ์ด๋™ํ•˜๋Š” ๊ฒฝ๋กœ๊ฐ€ ๋‹จ ํ•œ ๊ฐ€์ง€(์œ ์ผ)

  • Tree๋Š” ๊ณ„์ธต ๊ตฌ์กฐ(๋ถ€๋ชจ-์ž์‹)๋ฅผ ๊ฐ€์ง

  • Graph๋Š” ๋‹จ๋ฐฉํ–ฅ ๋˜๋Š” ์–‘๋ฐฉํ–ฅ์ด ์กด์žฌ (์ฆ‰, ๋ฐฉํ–ฅ์„ฑ์ด ์žˆ์„ ์ˆ˜๋„ ์žˆ๊ณ  ์—†์„ ์ˆ˜๋„ ์žˆ์Œ)

Last updated