| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- baekjoon
- 문자열
- pointer
- C++
- OOP
- 포인터
- 백준
- raw data
- 배열
- 파이썬
- vscode
- 오블완
- predictive analysis
- 티스토리챌린지
- Object Oriented Programming
- array
- assignment operator
- function
- Class
- 알고리즘
- 함수
- string
- pass by reference
- Python
- Data Science
- const
- programming
- 반복문
- Pre-processing
- Deep Learning
- Today
- Total
Channi Studies
[Data Structure] Weighted Graphs 본문
[Data Structure] Weighted Graphs
Chan Lee 2025. 5. 26. 14:48A weighted graph associates a weight with each edge.
A graph edge's weight, or cost, represents some numerical value between vertex items, such as flight cost between airports, connection speed between computers, or travel time between cities.
A weighted graph may be directed or undirected.

In a weighted graph, the path length is the sum of the edge weights in the path.

The cycle length is the sum of the edge weights in a cycle.
A negative edge weight cycle has a cycle length less than 0.
A shortest path doesn't exist in a graph with a negative edge weight cycle, because each loop around the negative edge weight cycle further decreases the cycle length, so no minimum exists. (minimum = -∞)

'Data Science > Data Structure & Algorithm' 카테고리의 다른 글
| [Python] Dijkstra's Shortest Path | 다익스트라 최단거리 (0) | 2025.05.27 |
|---|---|
| [Data Structure] Python: Graphs (0) | 2025.05.27 |
| [Data Structure] Directed Graphs (0) | 2025.05.26 |
| [Data Structure] Graphs: Breadth-first Search / Depth-first Search (0) | 2025.05.26 |
| [Data Structure] Graphs: Intro, Adjacency Lists, Adjacency Matrices (0) | 2025.05.26 |