



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




A DAG is - ANSa digraph with no directed cycles A hash function is - ANSany function that can be used to map data of arbitrary size to fixed-size values A hash table is - ANSa table for implementing the dictionary operations where a hash function is used to compute an index A sink in a DAG is a - ANSvertex v such that all the edges at v are directed into v A source in a DAG is a - ANSvertex v such that all the edges at v are directed out of v A topological sort labeling of a DAG is a labeling of the vertices such that - ANSthe label of the tail of every edge is smaller than the label of its head A topological sort of a DAG always yields - ANSthe reverse explored order of a DFT A topological sort of a DAG is a - ANSlist of the vertices so that for each edge (u, v) vertex u occurs before vertex v in the list
An effective way to prove correctness of the greedy method for solving the knapsack problem is to use - ANSproof by contradiction An efficient way to test for cycles when implementing Kruskal's algorithm is to utilize: - ANSDisjoint sets ADT where the collection of disjoint sets corresponds to the vertex sets of the trees in the forest being grown. Consider symbols a, b, c, d, e with frequencies 10, 20, 30, 40, 50 respectively. The length of the Huffman code for symbols a, b, c, d, e is respectively - ANS3, 3, 2, 2, 2 Consider the recurrence relation given by W(n) = 10W(n/2), initial condition W(1) = 1 for n a power of 2. Then W(n) has order: - ANSn^(log2(10)) DAG stands for - ANSdirected acyclic graph Dijkstra's algorithm can be implemented efficiently using - ANSa priority queue of vertices not in the current tree T where the priority of a vertex is Dist[v] Dijkstra's algorithm for finding shortest paths from vertex r to all the other vertices (if such a path exists) in a diagraph where edge e is assigned the positive real weight w(e) is based on: - ANSGrowing a tree T rooted at r by adding the smallest-weight edge in Cut(T), where the weight of an edge xy in Cut(T) is Dist[x] + w(xy). Dijkstra's shortest-path algorithm is similar to - ANSPrim's MST algorithm FFT has order worst-case complexity W(n) given by: - ANSnlog(n)
The knapsack problem is solved using the greedy method by first - ANSsorting the objects in nonincreasing order of their identities The number of multiplications performed by Strassen's algorithm to compute the product of two nxn matrices: - ANSn^(log2(7)) The number of spanning tress of Ksub10 is - ANS100,000, The order of the worst-case complexity of Kruskal's MST algorithm for a graph having n vertices and m edges, implemented using adjacency lists, is:
array is used to implement the priority queue of vertices not in the current tree? - ANSn^