Lập trình C nâng cao - Fit Lec 9 (HUST) GV.AnhTT
- Seiten
- 12
- Định dạng
- Dung lượng
- 161 KB
- Trường
- Đại học Bách khoa Hà Nội
- Aufrufe
- 0
- Kommentare
- 0
- Lượt tải
- 0
Vorschau wird generiert...
Tài liệu giảng dạy về đồ thị có hướng, bao gồm các khái niệm cơ bản như đồ thị liên thông, chu trình, cây, cũng như các thuật toán duyệt đồ thị (BFS, DFS), tìm thành phần liên thông, và sắp xếp topo trên đồ thị có hướng không chu trình (DAG).
- Dokumentenname
- Lập trình C nâng cao - Fit Lec 9 (HUST) GV.AnhTT
- Schule / Kurs
- Đại học Bách khoa Hà Nội · Lập trình C
- Autor (im Dokument)
- AnhTT
- Inhalt
- Tài liệu này tập trung vào đồ thị có hướng, bao gồm định nghĩa, biểu diễn, duyệt đồ thị, tìm thành phần liên thông và giới thiệu về sắp xếp tôpô cho đồ thị không chu trình.
- Inhaltsverzeichnis
- Directed graphs
- Terminology
- Connected graph
- Sub-graph
- Connected Components
- Cycle
- Tree
- Directed Graph
- Directed Acyclic Graph
- Directed Graphs
- Paths/Cycles
- Graph traversal
- Finding Connected Components
- A complete graph API
- Topological Sort
- Seiten
- 12 Seiten
- Hochgeladen von
- lienhejb
Beschreibung
Trích nội dung tài liệu
Directed graphs anhtt-fit@mail.hut.edu.vn dungct@it-hut.edu.vn http://www.4shared.com/file/43395119/3907952d/lect08. html Terminology Connected graph A graph is connected if and only if there exists a path between every pair of distinct vertices Sub-graph A graph with the vertex and edge set being subsets of the original graph Connected Components A connected component of a graph is a maximally connected subgraph of a graph Cycle A path in a graph that starts and ends at the same vertex Tree A graph G is a tree if and only if it is connected and acyclic Directed Graph A graph whose the edges (arcs) are directional Directed Acyclic Graph A directed graph with no directed cycles 1 Directed Graphs A directed graph can be represented by an adjacency matrix/list the same way as in undirected graph, except: An arc (u, v) only contributes to 1 entry in the adj. matrix or 1 node in the adj. list Paths/Cycles A directed graph can also contain paths and cycles (“directed paths” and “directed cycles”) b a Graph on top has directed paths and directed cycle Graph on bottom has directed paths but NO directed cycle (acyclic) c b a c 2 Graph traversal BFS and DFS can be used to traverse a directed graph, the same way as in undirected graph To check for connectivity of a graph run BFS or DFS using an arbitrary vertex as the source. If all vertices have been visited, then the graph is connected; otherwise, the graph is disconnected Finding Connected Components Run DFS or BFS from a vertex the set of visited vertices form a connected component Find another vertex i which has not been visited before, run DFS or BFS from it we have another connected component Repeat the steps until all vertices are visited Running time is O(ni + mi ) = O ( i mi ) = O( n
Häufig gestellte Fragen
Ist dieses Dokument kostenlos?
Ja. „Lập trình C nâng cao - Fit Lec 9 (HUST) GV.AnhTT“ ist kostenlos — melden Sie sich einfach an und klicken Sie auf Herunterladen, um die Originaldatei zu erhalten.
Wie viele Seiten hat dieses Dokument?
Das Dokument hat 12 Seiten, für den Kurs Lập trình C. Sie können es vor dem Herunterladen online in der Vorschau ansehen.
Kann ich vor dem Herunterladen eine Vorschau ansehen?
Ja. Sie können sich dieses Dokument direkt auf dieser Seite im Online-Reader ansehen und dann entscheiden, ob Sie es herunterladen möchten.
Lập trình C nâng cao - Fit Lec 9 (HUST) GV.AnhTT
Vorschau wird generiert...
Trích nội dung tài liệu
Directed graphs anhtt-fit@mail.hut.edu.vn dungct@it-hut.edu.vn http://www.4shared.com/file/43395119/3907952d/lect08. html Terminology Connected graph A graph is connected if and only if there exists a path between every pair of distinct vertices Sub-graph A graph with the vertex and edge set being subsets of the original graph Connected Components A connected component of a graph is a maximally connected subgraph of a graph Cycle A path in a graph that starts and ends at the same vertex Tree A graph G is a tree if and only if it is connected and acyclic Directed Graph A graph whose the edges (arcs) are directional Directed Acyclic Graph A directed graph with no directed cycles 1 Directed Graphs A directed graph can be represented by an adjacency matrix/list the same way as in undirected graph, except: An arc (u, v) only contributes to 1 entry in the adj. matrix or 1 node in the adj. list Paths/Cycles A directed graph can also contain paths and cycles (“directed paths” and “directed cycles”) b a Graph on top has directed paths and directed cycle Graph on bottom has directed paths but NO directed cycle (acyclic) c b a c 2 Graph traversal BFS and DFS can be used to traverse a directed graph, the same way as in undirected graph To check for connectivity of a graph run BFS or DFS using an arbitrary vertex as the source. If all vertices have been visited, then the graph is connected; otherwise, the graph is disconnected Finding Connected Components Run DFS or BFS from a vertex the set of visited vertices form a connected component Find another vertex i which has not been visited before, run DFS or BFS from it we have another connected component Repeat the steps until all vertices are visited Running time is O(ni + mi ) = O ( i mi ) = O( n
- Dokumentenname
- Lập trình C nâng cao - Fit Lec 9 (HUST) GV.AnhTT
- Schule / Kurs
- Đại học Bách khoa Hà Nội · Lập trình C
- Autor (im Dokument)
- AnhTT
- Inhalt
- Tài liệu này tập trung vào đồ thị có hướng, bao gồm định nghĩa, biểu diễn, duyệt đồ thị, tìm thành phần liên thông và giới thiệu về sắp xếp tôpô cho đồ thị không chu trình.
- Inhaltsverzeichnis
- Directed graphs
- Terminology
- Connected graph
- Sub-graph
- Connected Components
- Cycle
- Tree
- Directed Graph
- Directed Acyclic Graph
- Directed Graphs
- Paths/Cycles
- Graph traversal
- Finding Connected Components
- A complete graph API
- Topological Sort
- Seiten
- 12 Seiten
- Hochgeladen von
- lienhejb
Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!
Lập trình C nâng cao - Fit Lec 8 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 5 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 3 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 10 (HUST) GV.AnhTT
K5 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K2 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K3 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K4 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)
K1 Bộ đề luyện thi Trạng Nguyên Tiếng Việt (NXB DHQG)

Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!