CS7800 12F: Homework 02

Created: Wed 19 Sep 2012
Last modified: 

Assigned: Wed 19 Sep 2012
Due: Wed 26 Sep 2012


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 0506070809...
    CreditRCRCRCECRC RCNARCRC...

    where "RC" is "regular credit", "EC" is "extra credit", and "NA" is "not applicable" (not attempted). 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: 18 pts per problem

  1. Exercise 8.1-3

  2. Exercise 8.1-4

  3. Exercises 8.2-4, 8.3-4, and the following problem:

    Suppose that you are given the task of devising an algorithm for sorting n records and that the basic operation in your algorithm is an exchange: Exchange[i,j] swaps the data records in positions i and j. (Bubble-sort, Insertion-sort, Heapsort, Quicksort, and Shell-sort are all examples of such algorithms.) The width of an exchange is defined to be the distance across which data records are moved, i.e., j - i for Exchange[i,j]. Prove that any algorithm for sorting which uses only constant width exchanges must run in Omega(n2) time in the worst case.

  4. Problem 8-1 (a, b, c, d, e)

  5. Problem 8-3

  6. Exercises 9.3-7 and 9.3-9

  7. Problem 9-2 (a, b, c)


Switch to:


jaa@ccs.neu.edu