CS7800 12F: Homework 05

Assigned: Wed 24 Oct 2012
Due: Wed 31 Oct 2012

Last modified:


General Instructions

  1. Please review the grading policy outlined in the course information page.

  2. On the first page of your solution write-up, you must make explicit which problems are to be graded for "regular credit", which problems are to be graded for "extra credit", and which problems you did not attempt. Please use a table something like the following

    Problem01020304 0507070809...
    CreditRCRCRCECRC RCNARCRC...

    where "RC" is "regular credit", "EC" is "extra credit", and "NA" is "not attempted" (not applicable). Failure to do so will result in an arbitrary set of problems being graded for regular credit, no problems being graded for extra credit, and a five percent penalty assessment.

  3. You must also write down with whom you worked on the assignment. If this changes from problem to problem, then you should write down this information separately with each problem.


Problems

Required: 6 of the following 7 problems
Points: 16 pts per problem

  1. Exercise 22.1-4
  2. See pg. 1172 of CLRS for the definition of a multigraph.

    Hint: When processing the adjacency list associated with a vertex, you will want to keep track of which edges you have seen so as not to duplicate any edges. Use an array to "mark" edges (i.e., vertices) that you have seen and processed in the adjacency list. In Theta(V + E) total time, you cannot afford to "clear" the marks after processing each adjacency list; instead, consider using "marks" which never need to be cleared...

  3. Exercise 22.1-6
  4. Hint: Consider any matrix entry (i,j) where i does not equal j (i.e., consider any matrix entry which is not on the main diagonal). The value of entry (i,j) causes either i or j to be eliminated from contention... (Why?)

  5. Exercise 22.4-5

  6. Exercises 23.1-2 and 23.1-3

  7. Exercise 23.2-4 and 23.2-5

    Note: You should obtain improvements in at least three out of the four cases described in these exercises.

  8. Exercise 24.3-6 and Problem 24-3 (a)

  9. Problem 25-2, parts (a, b, c).

    Hint: A d-ary heap is an array indexed starting at 0 where the parent of the element in position i, p(i), and the k-th child of the element in position i, childk(i), are defined as follows:


Switch to:


jaa@ccs.neu.edu