Question: 1) Which of the following basic algorithms can be used to most efficiently determine the shortest path from a source to all other vertices (if
1)Which of the following basic algorithms can be used to most efficiently determine the shortest path from a source to all other vertices (if a given graph is unweighted and connected)? a. Partition
b. Topological Sorting
c. Depth First Search
d. Breadth First Search
2) In a forest with n vertices and k trees how many edges can we have?
a. n-k-1
b. k-1
c. n-1
d. n-k
3) How many linked lists are used to represent a graph with 6 nodes and 10 edges, when using an adjacency matrix representation?
a. 10 b. 18 c. 36 d. 6
4) Each DAG has a unique topological sorting.
a. True b. False
5) How can you make a directed graph a DAG?
a. Run Depth First Search and remove tree edges
b. Run Depth First Search and remove back edges
c. Run Depth First Search and remove forward edges
d. Run Depth First Search and remove cross edges
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
