반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 리눅스
- FLEX5
- QA엔지니어
- database연결
- 설탕문제
- Lesson2
- 벤쿠버렌트
- 레노보노트북
- 벤쿠버 렌트
- 파이도 환불
- 엔테크서비스
- Linux
- 1463번
- 부산입국
- FK 설정
- 프로그래머스
- 데이터의 무결성
- 언마운트
- 백준알고리즘
- binaray_gap
- FIDO 환불
- IntelliJ
- 캐나다워홀
- 외래키설정
- Java
- 벤쿠버집구하기
- codility
- 자바
- BC렌트
- Lesson3
Archives
- Today
- Total
대충이라도 하자
Graph - overview 본문
반응형
There are many types of “graphs”. In this Explore Card, we will introduce three types of graphs: undirected graphs, directed graphs, and weighted graphs.
Undirected graphs
The edges between any two vertices in an “undirected graph” do not have a direction, indicating a two-way relationship.
Directed graphs
The edges between any two vertices in a “directed graph” graph are directional.
Weighted graphs
Each edge in a “weighted graph” has an associated weight. The weight can be of any metric, such as time, distance, size, etc. The most commonly seen “weighted map” in our daily life might be a city map.
- Vertex : In Figure 1, nodes such as A, B, and C are called vertices of the graph.
- Edge: The connection between two vertices are the edges of the graph. In Figure 1, the connection between person A and B is an edge of the graph.
- Path: the sequence of vertices to go through from one vertex to another.
- Path Length: the number of edges in a path. In Figure 1, the path lengths from person A to C are 2, 3, and 5, respectively.
- Cycle: a path where the starting point and endpoint are the same vertex. In Figure 1, [A, B, D, F, E] forms a cycle. Similarly, [A, G, B] forms another cycle.
- Negative Weight Cycle: In a “weighted graph”, if the sum of the weights of all edges of a cycle is a negative value, it is a negative weight cycle. In Figure 4, the sum of weights is -3.
- Connectivity: if there exists at least one path between two vertices, these two vertices are connected. In Figure 1, A and C are connected because there is at least one path connecting them.
- Degree of a Vertex: the term “degree” applies to unweighted graphs. The degree of a vertex is the number of edges connecting the vertex. In Figure 1, the degree of vertex A is 3 because three edges are connecting it.
- In-Degree: “in-degree” is a concept in directed graphs. If the in-degree of a vertex is d, there are d directional edges incident to the vertex. In Figure 2, A’s indegree is 1, i.e., the edge from F to A.
- Out-Degree: “out-degree” is a concept in directed graphs. If the out-degree of a vertex is d, there are d edges incident from the vertex. In Figure 2, A’s outdegree is 3, i,e, the edges A to B, A to C, and A to G.
반응형
'꼬꼬마 개발자 노트 > Coding Problems' 카테고리의 다른 글
Graph -chaper 1(2) (0) | 2022.01.20 |
---|---|
Graph - Disjoint Set (0) | 2022.01.18 |
Arrays-chapter6 (0) | 2022.01.17 |
Arrays - chapter5 (0) | 2022.01.13 |
Arrays -chapter 4 (0) | 2022.01.12 |
Comments