DS352 Assignment 3 Questions PDF

Summary

This document contains questions related to algorithm design. It covers topics like B-trees, hash tables, and graph algorithms, particularly Warshall's algorithm and Prim's algorithm.

Full Transcript

Question One ============ Explain the steps and draw the B-tree obtained after inserting 67 and then 68 in the B-tree in the figure below (Assume that a leaf cannot contain more than three items.) Question Two ============ For the input 40, 60, 37, 83, 42, 18 and hash function h(K) = K mod 11 a\...

Question One ============ Explain the steps and draw the B-tree obtained after inserting 67 and then 68 in the B-tree in the figure below (Assume that a leaf cannot contain more than three items.) Question Two ============ For the input 40, 60, 37, 83, 42, 18 and hash function h(K) = K mod 11 a\. Construct both the open and closed hash tables. b\. Find the largest number of key comparisons in a successful search in both tables. c\. Find the average number of key comparisons in a successful search in both tables. [\ ] Question Three ============== Apply Warshall's algorithm to find the transitive closure of the digraph defined by the following adjacency matrix: ![](media/image3.png) [\ ] Question Four ============= How can one use Prim's algorithm to find a spanning tree of a connected graph with no weights on its edges? Is it a good algorithm for this problem? What are the other efficient alternatives?

Use Quizgecko on...
Browser
Browser