CS 580 Homework Assignment #5 (Due: Wed, April. 29)

  1. [15 point] Exercise 30.1-6, Page 701 (handout for chapter 30 in 1st edition).
  2. [10 point] Exercise 30.2-3, Page 709 (handout for chapter 30 in 1st edition).
  3. [15 point] Exercise 30.2-5, Page 709 (handout for chapter 30 in 1st edition).
  4. [10 point] Exercise 35.1-3, page 1027.
  5. [15 point] Exercise 35.1-5, page 1027.
  6. [15 point] EXercise 32.1-4. Page 910.
  7. [10 point] EXercise 32.4-4. Page 930.
  8. [10 point] EXercise 32.4-5. Page 930.
  9. [20 point] Suppose we have a very efficient algorithm MATCHING for the string matching problem. Given a pattern P of size m and text T of size n, MATCHING runs in time T(n,m). However, it only accepts strings (pattern and text) over the alphabet of DNA nucleotides {A, G, T, C}. Show how to use MATCHING as a black-box to obtain an algorithm GENERIC-MATCHING that handles any alphabet ∑. Your algorithm should have running time O((n + T(n,m)) log |∑|). You can assume that the elements of ∑ are represented by integers from {0,...,|∑|-1}.