Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
Tài liệu giảng dạy về đồ thị vô hướng, các khái niệm cơ bản về biểu diễn đồ thị (danh sách cạnh, ma trận kề, danh sách kề) và các bài tập thực hành lập trình C để xây dựng các cấu trúc dữ liệu đồ thị.
Vorschau wird generiert...
Undirected graphs anhtt-fit@mail.hut.edu.vn dungct@it-hut.edu.vn Undirected graphs A graph G=(V, E) where V is a set of vertices connected pairwise by edges E. Why study graph algorithms? Interesting and broadly useful abstraction. Challenging branch of computer science and discrete math. Hundreds of graph algorithms known. Thousands of practical applications. Communication, circuits, transportation, scheduling, software systems, internet, games, social network, neural networks, … 1 Graph terminology Some graph-processing problems Path: Is there a path between s to t? Shortest path: What is the shortest path between s and t? Cycle: Is there a cycle in the graph? Euler tour: Is there a cycle that uses each edge exactly once? Hamilton tour: Is there a cycle that uses each vertex exactly once? Connectivity: Is there a way to connect all of the vertices? MST: What is the best way to connect all of the vertices? Biconnectivity: Is there a vertex whose removal disconnects the graph? 2 Graph representation (1) Maintain a list of the edges Not suitable for searching Edge List Structure Edge sequence sequence of edge objects Edge object element origin vertex object destination vertex object reference to position in edge sequence Vertex sequence sequence of vertex objects Vertex object element reference to position in vertex sequence 3 Graph representation (2) Maintain an adjacency matrix. Suitable for random accesses to the edges A graph data structure Use a dynamic array to represent a graph as the following typedef struct { int * matrix; int sizemax; } Graph; Define the following API Graph createGraph(int sizemax); void setEdge(Graph* graph, int v1,
… Tải file gốc để đọc toàn bộ tài liệu.
- Dokumentenname
- Lập trình C nâng cao - Fit Lec 6 (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ị vô hướng, các bài toán liên quan và các phương pháp biểu diễn đồ thị phổ biến như danh sách cạnh, ma trận kề và danh sách kề, cùng với các ví dụ và bài tập thực hành.
- Inhaltsverzeichnis
- Undirected graphs
- Graph terminology
- Some graph-processing problems
- Graph representation (1)
- Edge List Structure
- Graph representation (2)
- Graph representation (3)
- Adjacency List Representation
- Doc.pages
- 11 Seiten
- Hochgeladen von
- lienhejb
Häufig gestellte Fragen
Tài liệu này có miễn phí không?
Có. “Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 11 trang, thuộc môn Lập trình C. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.

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