Let G = (V, E) be an undirected unweighted connected graph. The diameter of G is defined as:
diam(G) = $$\displaystyle\max_{u, x\in V}$$ {the length of shortest path between u and v}
Let M be the adjacency matrix of G.
Define graph G2 on the same set of vertices with adjacency matrix N, where
$$N_{ij} =\left\{ {\begin{array}{*{20}{c}} {1 \ \ \text{if} \ \ {M_{ij}} > 0 \ \ \text{or} \ \ P_{ij} > 0, \ \text{where} \ \ P = {M^2}}\\ {0, \ \ \ \ \ \text{otherwise}} \end{array}} \right.$$
Which one of the following statements is true?
Consider a matrix multiplication chain $${F_1}{F_2}{F_3}{F_4}{F_5},$$ where matrices $${F_1},{F_2},{F_3},{F_4}$$ and $${F_5}$$ are of dimensions $$2 \times 25,\,\,25 \times 3,\,\,3 \times 16,\,\,16 \times 1$$ and $$1 \times 1000,$$ respectively. In the parenthesization of $${F_1}{F_2}{F_3}{F_4}{F_5}$$ that minimizes the total number of scalar multiplications, the explicitly computed pairs is/are
GROUP 1 | GROUP 2 |
---|---|
1. Dijkstra's Shortest Path | i. Divide and Conquer |
2. Floyd-Warshall algorithm to compute all pairs shortest path |
ii. Dynamic Programming |
3. Binary search on a sorted array | iii. Greedy design |
4. Backtracking search on a graph | iv. Depth-first search |
v. Breadth-first search |
Match the above algorithms on the left to the corresponding design paradigm they follow.