Fall 2006 CMSC 651 Midterm Exam, Exams of Computer Science

The fall 2006 midterm exam for cmsc 651, a graduate-level computer science course focusing on algorithms and data structures. The exam covers topics such as matrix multiplication over z5, union of binomial heaps and fibonacci heaps, disjoint sets data structure, and dijkstra's algorithm. Students are expected to demonstrate their understanding of these concepts through problem-solving. The exam consists of multiple-choice and short-answer questions, with points ranging from 0 to 20.

Typology: Exams

Pre 2010

Uploaded on 07/30/2009

koofers-user-mzu
koofers-user-mzu 🇺🇸

5

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Fall 2006 CMSC 651: MIDTERM Due: Nov 1
1. (0 points) What is your name?
2. (20 points) Show how to multiply two n×nmatrices over Z5in O(n3/log n) steps in a manner
similar to the one given in class for Z2.
3. (20 points)
(a) Give the algorithm and analysis for taking the union of THREE Binomial Heaps. (Do
not assume that the alg for the union of TWO is known.)
(b) Give the algorithm and analysis for taking the union of THREE Fibonacci Heaps.
4. (20 points) Give a data structure and the psuedocode for maintaining disjoint sets such that,
if the structure has nelements in it, that supports the following three operations in the time
bound given (amortized).
UNION O(1).
FIND O(logn).
FINDALL (lists out all the elements of the structure) O(n). (NOTE- the order does not
matter.)
INSERT O(1)
5. (20 points) In class we did Dijistras algorithm with bounded weights, bound C, with buckets
of size 1,2,22,23,...,2log2C. What goes wrong with the proof if we use buckets of sizes
1,3,32,33,...,3log3C.
6. (20 points) Let G= (V, E ) be a graph. Let Mbe a matching in G. Let Mbe a maximum
matching in G. Show that if Mhas kmore edges then Mthen Mhas at least kdisjoint
augmenting paths.
1

Partial preview of the text

Download Fall 2006 CMSC 651 Midterm Exam and more Exams Computer Science in PDF only on Docsity!

Fall 2006 CMSC 651: MIDTERM Due: Nov 1

  1. (0 points) What is your name?
  2. (20 points) Show how to multiply two n×n matrices over Z 5 in O(n^3 / log n) steps in a manner similar to the one given in class for Z 2.
  3. (20 points)

(a) Give the algorithm and analysis for taking the union of THREE Binomial Heaps. (Do not assume that the alg for the union of TWO is known.) (b) Give the algorithm and analysis for taking the union of THREE Fibonacci Heaps.

  1. (20 points) Give a data structure and the psuedocode for maintaining disjoint sets such that, if the structure has n elements in it, that supports the following three operations in the time bound given (amortized). - UNION O(1). - FIND O(log∗^ n). - FINDALL (lists out all the elements of the structure) O(n). (NOTE- the order does not matter.) - INSERT O(1)
  2. (20 points) In class we did Dijistras algorithm with bounded weights, bound C, with buckets of size 1, 2 , 22 , 23 ,... , 2 log^2 C^. What goes wrong with the proof if we use buckets of sizes 1 , 3 , 32 , 33 ,... , 3 log^3 C^.
  3. (20 points) Let G = (V, E) be a graph. Let M be a matching in G. Let M ∗^ be a maximum matching in G. Show that if M ∗^ has k more edges then M then M has at least k disjoint augmenting paths.