An adjacency list for a weighted undirected graph is shown inthe diagram. The number in a linked-list node is the weight of thecorresponding edge in the graph.
An adjacency list representation for a weighted undirected graph is shown below. (Note: please wait for the image to load/display). The number in a linked-list node is the weight of the corresponding edge in the graph. A B5 C6-DSH-E6 AS-CS/ C-A6-B5-D3-F8 D9 F 3D4 E G E4F6H3-12/ G4-H9/ H-E9-63-18-35/ 1-F1-G2 HB-34/ -HS-047 Answer the following questions by filling up the blanks. Numeric answers must be encoded as Arabic numbers. For example, if the answer is 5 you should encode the number 5 (not the word "five"). 1. How many edges does this graph have? 2. Is this graph connected? Answer with a Yes or No. 3. What is the degree of vertex A? 4. What is the degree of vertex F? 5. Is there a path from A to J? (answer with a Yes or No) For the next two questions, you will follow the BFS and DFS procedures specified in the main textbook. 6. Get the DFS tree of the graph. With A as root, what is the height of the resulting tree? 7. Get the BFS tree of the graph starting from vertex A. With A as root, what is the height of the resulting tree?
7. Get the BFS tree of the graph starting from vertex A. With A as root, what is the height of the resulting tree? Using Kruskal's algorithm, get a minimum spanning tree of the graph described by the adjacency list above. Answer the following questions by filling up the blanks. If the question is asking for an edge, write it with a comma (no spaces) in between the two vertices connected by the edge. For example, to write the edge connecting vertex A and vertex B, you may write A,B or B,A. Do not encode the left and right parentheses as they are already written in the question item. 1. The weight of the resulting minimum spanning tree is 2. The edge (. ) is the last edge added to the minimum spanning tree. 3. The edge ) is the first edge added to the minimum spanning tree. 4.The degree of vertex G is in the resulting minimum spanning tree 5. The resulting minimum spanning tree has 6. The resulting minimum spanning tree has 7. The resulting minimum spanning tree has 8. Does the edge (E,D) exist in the minimum spanning tree? Yes or no? number of edges with weight 8. number of edges with weight of 5. number of edges with weight 4.
An adjacency list for a weighted undirected graph is shown in the diagram. The number in a linked-list node is the weigh
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am