HW help11111111

SoccerBoss
Category:
Computer Science
Price: $40 USD

Question description

  1. Consider the following directed graph, which is given in adjacency list form and where vertexes have numerical labels:

    1: 2, 4, 6
    2: 4, 5
    3: 1, 2, 6, 9
    4: 5
    5: 4, 7
    6: 1, 5, 7
    7: 3, 5
    8: 2, 6, 7
    9: 1, 7
    

    The first line indicates that the graph contains a directed edge from vertex 1 to vertex 2, from 1 to vertex 4, and 1 to 6, and likewise for subsequent lines.

    Part A: What is the degree of node 3?

    Part B: List the nodes in the order they're visited by depth-first search starting at vertex 4. When choosing successors, use the 367 convention of increasing numerical order.

    Part C: Show the corresponding breadth-first search spanning tree for the graph above starting at vertex 3. When choosing successors, use the 367 convention of increasing numerical order. Draw your tree either graphically or in the same manner using characters as done in prior assignments. Verify that your trees in the pdf file looks okay before submitting.

  2. Consider the following directed graph, which is given in adjacency list form as described above and where vertexes have numerical labels:

    1: 3, 5
    2: 6
    3: 6
    4: 6, 7
    5: 7, 8
    6: 
    7: 8 
    8: 9
    9:
    

    Show the topological ordering for the graph above when using the 367 convention of choosing vertexes in increasing numerical order.


  3. Consider the following undirected graph, which is given in adjacency matrix form and where vertexes have character labels and edges have non-negative integer weights (no value indicates no edge exists):

        A B C D E F G
      +--------------
    A |   2 8 4
    B | 2     1 7
    C | 8         3 5
    D | 4 1     3
    E |   7   3   1
    F |     3   1   8
    G |     5     8
    

    Part A: What is the degree of node F?

    Part B: Trace Dijkstra's algorithm starting at node C by completing the table started below where each row represents one iteration of the algorithm.

    IterationList of Visited Vertexes and their
    shortest distances from start
    Priority Queue's items
    (listed in increasing order)
    0-0 C
    1C 03 F, 5 G, 8 A
    2C 0, F 3 
  4. Part C: What is the shortest path from C to A? Give a list of vertexes starting at C and ending at A.

    Part D: What is the shortest path from C to D? Give a list of vertexes starting at C and ending at D.

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Carnegie Mellon University
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1831 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors