DFS, BFS, SPs, MSTs (Discussion 10) (Thuật toán duyệt đồ thị) - Christine Zhou
- ページ数
- 68
- 形式
- PPTX
- サイズ
- 1.2 MB
- Trường
- University of California, Berkeley
- 閲覧数
- 0
- コメント
- 0
- Lượt tải
- 0
プレビューを生成中...
Tài liệu thảo luận về các thuật toán duyệt đồ thị (BFS, DFS, preorder, postorder) với bài tập và lời giải chi tiết.
- ドキュメント名
- DFS, BFS, SPs, MSTs (Discussion 10) (Thuật toán duyệt đồ thị) - Christine Zhou
- 学校 / コース
- University of California, Berkeley · Lập trình Java
- 内容
- Tài liệu này giải thích các khái niệm về DFS và BFS, cùng với các biến thể preorder, inorder, postorder của DFS. Nó cung cấp một ví dụ chi tiết về cách thực hiện DFS preorder và postorder trên một đồ thị cụ thể, bao gồm cả cách sử dụng stack và marked set.
- 目次
- Announcements
- Agenda
- Graph Traversals
- Preorder vs. Postorder vs. Inorder
- Q1.1: Graphs
- Q1.1: Implementing Post/Preorder
- Q1.1: DFS Pre/postorder Solution
- ページ数
- 68 ページ
- アップロード者
- Uni24h
説明
Trích nội dung tài liệu
Discussion 10 DFS, BFS, SPs, MSTs Announcements Welcome back from spring break! Hope you had a restful week :) Reach out to your mentor GSI if you feel yourself falling behind, or are feeling overwhelmed -- we’re here for you! We want to help you finish as strong as you can. We will be running the full autograder for project 2AB on ~4/2 Midterm 2 this Friday, April 5th from 8-10pm! ○ Check out @3764 for important information about the midterm & review sessions! No lab due this week! We’ll be doing exam review in lab. 61B Imposter Syndrome Panel ○ Sunday, 4/7 from 5-6:30pm in Soda 310 Remember to complete the anonymous spring break survey for 8 points of EC! Discussion survey: tinyurl.com/cz-disc10-sp19 Agenda Focus on what has the highest votes, but we’ll try to get through everything! Graph Traversals Level-Order/Breadth First Search (BFS): ○ Visit top to bottom, left to right, just like how you read! Depth-order/Depth First Search (DFS): ○ Traverse “deeper” nodes before shallow ones Preorder vs. Postorder vs. Inorder (all types of DFS) Preorder: “Visit” a node, then traverse its children Inorder: Traverse left child, “visit” node, then traverse right child Postorder: Traverse children, then “visit” node. Note: The prefix to order (pre, in, post) refers to when a node is visited with respect to its children ○ ex) That’s why postorder means that we visit the node AFTER we visit the children (post is a prefix, meaning “behind,” “after,”) Note: Node and vertex are used interchangeably. Q1.1: Graphs Give the DFS preorder, DFS postorder, and BFS order of the graph traversals starting from vertex A. Break ties alphabetically. Q1.1: Implementing Post/Preorder Maintain a stack of nodes and a marked set. As soon as we add something to our stack, we note it for preorder. The top node in our stack represents the node we are currently on, and the marked set represents nodes that have been visited. After we add a node to the
よくある質問
このドキュメントは無料ですか?
はい。「DFS, BFS, SPs, MSTs (Discussion 10) (Thuật toán duyệt đồ thị) - Christine Zhou」は無料です。ログインして「ダウンロード」をクリックするだけで、元のファイルを取得できます。
このドキュメントは何ページありますか?
このドキュメントは 68 ページあります(Lập trình Java コース用)。ダウンロードする前にオンラインでプレビューできます。
ダウンロードする前にプレビューできますか?
はい。このページにあるオンラインリーダーでドキュメントをプレビューし、その後ダウンロードするかどうかを決めることができます。
DFS, BFS, SPs, MSTs (Discussion 10) (Thuật toán duyệt đồ thị) - Christine Zhou
プレビューを生成中...
Trích nội dung tài liệu
Discussion 10 DFS, BFS, SPs, MSTs Announcements Welcome back from spring break! Hope you had a restful week :) Reach out to your mentor GSI if you feel yourself falling behind, or are feeling overwhelmed -- we’re here for you! We want to help you finish as strong as you can. We will be running the full autograder for project 2AB on ~4/2 Midterm 2 this Friday, April 5th from 8-10pm! ○ Check out @3764 for important information about the midterm & review sessions! No lab due this week! We’ll be doing exam review in lab. 61B Imposter Syndrome Panel ○ Sunday, 4/7 from 5-6:30pm in Soda 310 Remember to complete the anonymous spring break survey for 8 points of EC! Discussion survey: tinyurl.com/cz-disc10-sp19 Agenda Focus on what has the highest votes, but we’ll try to get through everything! Graph Traversals Level-Order/Breadth First Search (BFS): ○ Visit top to bottom, left to right, just like how you read! Depth-order/Depth First Search (DFS): ○ Traverse “deeper” nodes before shallow ones Preorder vs. Postorder vs. Inorder (all types of DFS) Preorder: “Visit” a node, then traverse its children Inorder: Traverse left child, “visit” node, then traverse right child Postorder: Traverse children, then “visit” node. Note: The prefix to order (pre, in, post) refers to when a node is visited with respect to its children ○ ex) That’s why postorder means that we visit the node AFTER we visit the children (post is a prefix, meaning “behind,” “after,”) Note: Node and vertex are used interchangeably. Q1.1: Graphs Give the DFS preorder, DFS postorder, and BFS order of the graph traversals starting from vertex A. Break ties alphabetically. Q1.1: Implementing Post/Preorder Maintain a stack of nodes and a marked set. As soon as we add something to our stack, we note it for preorder. The top node in our stack represents the node we are currently on, and the marked set represents nodes that have been visited. After we add a node to the
- ドキュメント名
- DFS, BFS, SPs, MSTs (Discussion 10) (Thuật toán duyệt đồ thị) - Christine Zhou
- 学校 / コース
- University of California, Berkeley · Lập trình Java
- 内容
- Tài liệu này giải thích các khái niệm về DFS và BFS, cùng với các biến thể preorder, inorder, postorder của DFS. Nó cung cấp một ví dụ chi tiết về cách thực hiện DFS preorder và postorder trên một đồ thị cụ thể, bao gồm cả cách sử dụng stack và marked set.
- 目次
- Announcements
- Agenda
- Graph Traversals
- Preorder vs. Postorder vs. Inorder
- Q1.1: Graphs
- Q1.1: Implementing Post/Preorder
- Q1.1: DFS Pre/postorder Solution
- ページ数
- 68 ページ
- アップロード者
- Uni24h
コメント (0)
まだコメントはありません。最初のコメントを書きましょう!
Ôn tập lập trình Java (MT2 Review Solutions) - Ching and Christines
Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Introduction to Java (Discussion 1) (Giới thiệu về Java) - Christine Zhou
More Sorting (Discussion 13) (Thuật toán sắp xếp nâng cao) - Christine Zhou
Giáo trình Lập trình Java
Tổng hợp Đề Toán 5 - Luyện thi vào Lớp 6 - CLB EMath
Bài giảng vật lý đại cương (Chương 3) - Đỗ Ngọc Uấn
Chương 8.Nguyên tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang

コメント (0)
まだコメントはありません。最初のコメントを書きましょう!