Question

sana 1. Given a graph G: + + + + + + ++++ + + Give adjacency list representation: 10 → 11→ 12 →

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

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
Add a comment
Know the answer?
Add Answer to:
sana 1. Given a graph G: + + + + + + ++++ + + Give...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Exercise 2 Given the following graph: a. Write the formal description of the graph, G=(V,E) b....

    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...

    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

  • Let G = (V, E) be a directed acyclic graph with n vertices and m edges....

    Let G = (V, E) be a directed acyclic graph with n vertices and m edges. Give an O(n + m) time algorithm that determines if G contains a directed path that touches every vertex in G exactly once. The graph G is given by its adjacency list representation.

  • 1. Given a graph G = (V, E). a) Design an algorithm to print all the...

    1. Given a graph G = (V, E). a) Design an algorithm to print all the shortest path from a starting node s to all other nodes b) Implement your proposed algorithm above in your preferred programming languages. You can choose to represent the edges in such graph by either adjacency matrix or adjacency list.

  • 3. (10 points) Let G be an undirected graph with nodes vi,..Vn. The adja.- cency matriz represent...

    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...

    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)...

    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...

    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...

    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)...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT