| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 반복문
- Deep Learning
- C++
- 배열
- string
- Data Science
- array
- function
- 함수
- vscode
- Python
- baekjoon
- Pre-processing
- Class
- OOP
- pass by reference
- 포인터
- raw data
- 문자열
- 알고리즘
- 백준
- programming
- Object Oriented Programming
- 티스토리챌린지
- 파이썬
- predictive analysis
- 오블완
- pointer
- assignment operator
- const
- 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 |