






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







15-0: Graphs
15-1: Graphs & Edges
15-2: Graph Problems
15-3: Connected Undirected Graph
15-4: Connected Undirected Graph
15-5: Connected Undirected Graph
15-6: Strongly Connected Graph
15-7: Strongly Connected Graph
15-10: Cycles in Graphs
15-11: Cycles in Graphs
15-12: Cycles in Graphs
1
2 3
4 5
6
15-13: Cycles in Graphs
1
2
4 3 5
6
15-14: Cycles in Graphs
1
2
4 3 5
6
15-15: Cycles in Graphs
1
2
4 3 5
6
15-21: Cycles & Connectivity
15-22: Cycles & Connectivity
15-23: Cycles & Connectivity
15-24: Cycles & Connectivity
15-25: Cycles & Connectivity
15-26: Graph Representations
15-27: Adjacency Matrix
15-28: Adjacency Matrix
15-29: Adjacency Matrix
15-34: Sparse vs. Dense
15-35: Nodes with Labels
15-36: Nodes with Labels
15-37: Nodes with Labels
15-38: Nodes with Labels
15-39: Nodes with Labels
Examples! 15-40: Topological Sort
15-41: Topological Sort
15-42: Topological Sort
15-43: Topological Sort
15-44: Topological Sort
15-45: Topological Sort
for (i=0; i < NumberOfVertices; i++) NumIncident[i] = 0;
for(i=0; i < NumberOfVertices; i++) each node k adjacent to i NumIncident[k]++
15-46: Topological Sort
for(i=0; i < NumberOfVertices; i++) NumIncident[i] = 0;
for(i=0; i < NumberOfVertices; i++) for(tmp=G[i]; tmp != null; tmp=tmp.next()) NumIncident[tmp.neighbor()]++
15-47: Topological Sort