지난 학기 학교 알고리즘 수업을 수강하며, 정리 해 놓았던 마크다운 문서입니다. 문제시 삭제하겠습니다
Airline routes 그래프를 이용해 표현가능
(vertex와 edge이용)
Binary relation

x는 y의 진 인수이다 (proper factor), S={1,2,... ,10}
y가 12라면 x!=y이고 x/y의 나머지가 0이면 x는 y의 proper factor
G=(V,E), vertex의 원소의 수=n, edge의 원소의 수=m로 정의

Subgraph: 어떤 G=(V,E)에 대해 G'=(V',E') of G : V' -> V and E' -> E
complete graph: 모든 정점쌍이 간선으로 연결되어있는 그래프
undirected graph: m=n(n-1)/2를 넘을수 x
digraph: m=n(n-1)을 넘을수 x
Adjacency relation: 두 정점이 하나의 엣지로 연결 되는가?
Path

simple path: path상의 모든 정점들 distinct한 경우
reachable: 정점 v,w 가는 길존재하면->reachable
Connected: 그래프 모든 vertex쌍이 서로 reachable하면 connected graph (undirected graph의 경우)
Strongly Connected: 위와 같음 (digraph의 경우)
Cycle: 시작 정점과 끝 정점이 동일한 non-empty path (길이 가장 짧은 cycle: 자기자신 가리키는 cycle: self loop)
undirected graph에서 cycle 가장 작은경우 (적어도 3보단 커야한다)
simple cycle: 시작 정점과 끝 정점은 동일 나머지 정점은 path 상에 한번 나타나는 경우(distinct)
acyclic: 싸이클이 존재하지 않음 (ex. DAG : Directed Acyclic Graph)
free tree (undirected tree): 세가지 조건 만족 grpah
undirected forest
1. acyclic
2. undirected
(connected 해도되고 안해도 됨)
rooted tree: root가 존재하는 free tree
Connected component: maximal connected subgraph를 의미 (undirected graph에서)
ex. 3개의 connected component
in-deg(v)=3
out-deg(v)=2
digraph의 경우 모든 정점에 대해 in-degree의 sum은 edge의 개수 m이 된다 (outgoing edge도 반드시 어떤 정점에서는 incoming edge가 되기 때문에), out-degree도 마찬가지
-> 모든 정점에 대한 그냥 degree의 sum은 2m