Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
- Pages
- 11
- Format
- Size
- 228 KB
- Trường
- Đại học Bách khoa Hà Nội
- Views
- 0
- Comments
- 0
- Lượt tải
- 0
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ị.
Frequently asked questions
Is this document free?
Yes. “Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT” is free — just sign in and click Download to get the original file.
How many pages is this document?
The document has 11 pages, for the course Lập trình C. You can preview it online before downloading.
Can I preview before downloading?
Yes. You can preview this document right on this page with the online reader, then decide whether to download.
- Document name
- Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
- School / Course
- Đại học Bách khoa Hà Nội · Lập trình C
- Author (in document)
- AnhTT
- Content
- 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.
- Table of contents
- Undirected graphs
- Graph terminology
- Some graph-processing problems
- Graph representation (1)
- Edge List Structure
- Graph representation (2)
- Graph representation (3)
- Adjacency List Representation
- Pages
- 11 pages
- Uploaded by
- lienhejb
Generating preview...
Description
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,
Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
Generating preview...
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,
Read full document
- Document name
- Lập trình C nâng cao - Fit Lec 6 (HUST) GV.AnhTT
- School / Course
- Đại học Bách khoa Hà Nội · Lập trình C
- Author (in document)
- AnhTT
- Content
- 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.
- Table of contents
- Undirected graphs
- Graph terminology
- Some graph-processing problems
- Graph representation (1)
- Edge List Structure
- Graph representation (2)
- Graph representation (3)
- Adjacency List Representation
- Pages
- 11 pages
- Uploaded by
- lienhejb
Comments (0)
No comments yet. Be the first!
Lập trình C nâng cao - Fit Lec 7 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 8 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 4 (HUST) GV.AnhTT
Lập trình C nâng cao - Fit Lec 5 (HUST) GV.AnhTT
Slide Lập trình C nâng cao - Fit Lec 11 (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)
Comments (0)
No comments yet. Be the first!