Question: Problem 1: Remember [20 points] Answer the following true/false questions. True False In a directed graph, the number of entries in an adjacency list representation
Problem 1: Remember [20 points] Answer the following true/false questions. True False In a directed graph, the number of entries in an adjacency list representation is exactly m. In an undirected graph, we only have to store half of the adjacency matrix, so the adjacency matrix for an undirected graph of n nodes is asymptotically smaller than the adjacency matrix for a directed graph. A graph that is connected and does not contain a cycle will always be a tree. The "frontier" in a BFS search is stored in a ("last-in-first-out") stack data structure. If T is the tree that results from a depth first search on a graph G, and the edge (u,v) exists in G, then either u is the parent of v in T or v is the parent of u in T. A graph that has no cycles is guaranteed to be bipartite. In a directed graph, it is possible that v is part of u 's strongly connected component, but u is not part of v 's strongly connected component. For the topological order on a directed graph to be well-defined, the graph must be connected. In a greedy algorithm, we simply make some choice that appears to be the best at the moment. If a greedy algorithm is optimal (i.e., there's no solution better than taking the greedy choice), it will always be efficient (i.e., have polynomial running times)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
