1 -> 2 -> 5 -> 10 -> 11 2 -> 1 -> 3 -> 6 -> 8 -> 9 3 -> 2 -> 9 -> 10 -> 11 4 -> 6 -> 7 -> 8 5 -> 1 -> 7 6 -> 2 -> 4 -> 7 -> 12 7 -> 1 -> 4 -> 5 -> 6 -> 12 8 -> 2 -> 4 9 -> 2 -> 3 -> 11 10 -> 1 -> 3 -> 11 11 -> 1 -> 3 -> 9 -> 10 -> 12 12 -> 6 -> 7 -> 11
Exercise 2 Given the following graph: a. Write the formal description of the graph, G=(V,E) b. Show the Adjacency Matrix representation C. Show the Adjacency List representation d. Calculate step by step the shortest paths from a e. Show the DFS tree/forest from a f. Show the BFS tree/forest from a g MST using Prim h. MST using Kruskal
10. Graphs (2 points) Determine the following for the graph G: a) List the strongly connected components in G: b) Give the adjacency matrix representation for this graph. a bcd e f
Please show work clearly. Thanks
3. (10 points) Let G be an undirected graph with nodes vi,..Vn. The adja.- cency matriz representation for G is the nx n matrix M given by: Mij-1 if there is an edge from v, to ty. and M,',-0 otherwise. A triangle is a set fvi, vjof 3 distinct vertices so that there is an edge from v, to vj, another from v to k and a third from vk to v. Give and analyze...
22.1-1 Given an adjacency-list representation of a directed graph, how long does it take to compute the out-degree of every vertex? How long does it take to compute the in-degrees?
Please answer question 2. Introduction to Trees
Thank you
1. Graphs (11 points) (1) (3 points) How many strongly connected components are in the three graphs below? List the vertices associated with each one. 00 (2) (4 points) For the graph G5: (a) (0.5 points) Specify the set of vertices V. (b) (0.5 points) Specify the set of edges E. (c) (1 point) Give the degree for each vertex. (d) (1 point) Give the adjacency matrix representation for this graph....
114points Let G- (V,E) be a directed graph. The in-degree of a vertex v is the number of edges (a) Design an algorithm (give pseudocode) that, given a vertex v EV, computes the in-degree of v under (b) Design an algorithm (give pseudocode) that, given a vertex v E V, computes the in-degree of v incident into v. the assumption that G is represented by an adjacency list. Give an analysis of your algorithm. under the assumption that G is...
Problem 1: Dynamic Programming in DAG Let G(V,E), |V| = n, be a directed acyclic graph presented in adjacency list representation, where the vertices are labelled with numbers in the set {1, . . . , n}, and where (i, j) is and edge inplies i < j. Suppose also that each vertex has a positive value vi, 1 ≤ i ≤ n. Define the value of a path as the sum of the values of the vertices belonging to...
4. Draw a simple (non-directional) graph G based on the given sets V(G) and E(G). V(G) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) E(G) = { <1-2>, <1-3>, <2-4>, <2-5>, <3-6>, <5-7>, <5-8>, <6-9>, <9-10>, <8-11>} What type of a graph is it? A. Binary tree B. Full binary tree C. Complete binary tree D. Perfect binary tree 5. Find the diameter of the graph G in problem 4.12 points) D(G) = 6. Write the...
Graph Representation Worksheet 4 1. What are the storage requirements assuming an adjacency matrix is used. As- sume each element of the adjacency matrix requires four bytes 2. Repeat for an adjacency list representation. Assume that an int requires 4 bytes and that a pointer also requires 4 bytes 3. Now, consider an undirected graph with 100 vertices and 1000 edges. What are the storage requirements for the adjacent matrix and adjacency list data structures?
Just give me the Edge list structure, Adjacency List structure,
Adjacency Map Structure and Adjacency Matrix structure for the
given
graph.
show all work please.
1. Pen down the complexities for all 4 data structures for graph. Give the Edge list structure, Adjacency List structure, Adjacency Map Structure and Adjacency Matrix structure for the given graph. 8 points 3 2 b 4 1