Final Study Guide

Dynamic programming is similar to divide and conquer in that we find a(n) ____ property.
Click the card to flip 👆
1 / 31
Terms in this set (31)
Given four matrices A, B, C and D, the number of elementary multiplication operations needed to obtain their product might be different depending the order in which the matrices are multiplied - True or False.TrueMatrix multiplication is an associative operation, meaning that the order in which we multiply does not change the product/answer. E.g. for three matrices A, B, C if (AB)C = R then A(BC) is also R. (True or False).TrueWe can multiply two matrices A and B where A is of dimension 2X3 and B is of dimension 3X6 (True or False)TrueThe complexity of the dynamic programming based minimum matrix multiplication algorithm we discussed in class is theta(n3) (True or False).TrueIn dynamic programming, we solve the small instances first, store the results, and look them up when we need them instead of recomputing them.TrueIn greedy, we obtain a solution by making a sequence of choices, each choice appears to be the best choice at that step.FalseA spanning tree for a graph G is a connected sub-graph that contains all the vertices of G and is a tree.TrueIf n is the number of vertices, the every-case time complexity of Prim's algorithm covered in class is order of _______n2For a sparse graph, Kruskal's algorithm should be faster than Prim's algorithm.TrueDijkstra's single source short path problem implementation covered in class is Θ(n2)TrueThe greedy approach does not always produce an optimal solution.TrueA set of edges E is said to be _________ if edges can be added to it so as to form a minimum spanning tree.promisingTime in the system is the time spent both waiting and being served.TrueIn scheduling with deadlines covered in class, we must schedule all jobs regardless of whether they start after their deadline.FalseIn depth-first search, a path is followed as deeply as possible until a dead end is reached. At the dead-end we back up until we reach a node with an un-visited child and continue again.TrueExtending our 4-queens analysis from class to 8-queens on an 8 X 8 board, if we assign each of the 8 queens to a different row, how many candidate solutions are possible.B. 8 X 8 X 8 X 8 X 8 X 8 X 8 X 8In the n-Queens problem, for n = 8 the number of nodes in the state space tree is:C. 19,173,961The purpose of backtracking is to avoid checking many of the nodes in the state space tree.TrueIn scheduling with deadlines, we need not consider any schedule what has a job scheduled after its deadline because ______.B. that schedule has the same profit as the one that doesn't schedule the job at allA feasible set is a set of jobs such that there exists at least one feasible sequence for the jobs in the set.TrueWhich of the above is more efficient? Why do you think that is the case? Bin using dynamic programming and divide and conquerThe iterative version using dynamic programming is faster than the recursive one because the value only needs to be looked up after the calculations are made rather than having to call the function over and over again until the base case and then working back up to the needed term (dynamic prog))the second one uses a recursive property. However, it takes a bottom-up approach and stores the results of previous calculations. (no points deducted)