PARTITION

Show the results of inserting the keys 8, 25, 20, 4, 18, 6, 3, 30, 7, 10, 40, 33, 42, 38, 2, 5, 53, 47, 32, 41, 1 in order into an empty B-tree with minimum degree 2. Draw only the configurations of the tree just before some node must split, and also draw the final configuration.

CP5602 Assignment Answer all questions in a single document. Each question should begin on a new page. Providing an answer without explanation in which how did you achieve it, is not acceptable. Show all your work (Partial mark applies). If you use pen-and-paper you may submit a scan of your worksheet. Upload your solution to […]

Give a nondeterministic polynomial time algorithm for the sum of subset problem. Define the transformation from the partition problem to the sum of subsets problem.

ASSIGNMENT Total: 100 points) Let X(1..n) and Y(1..n) contain two lists of n integers, each sorted in nondecreasing order. Give the best (worst-case complexity) algorithm that you can think for finding (a) the largest integer of all 2n combined elements. (b) the second largest integer of all 2n combined elements. (c) the median (or the […]

Scroll to top