Home Work Number 2 Fall 2011
This is Home Work Number 2 - Due on september 15
Do the following five problems. Please submit your answers in paper with your name and section number.
- Question 1.14 (Das Gupta et al) Give a pseudo code description and analyze the running time.
- Question 1.17 (Das Gupta et al)
- Question 1.20 (Das Gupta et al)
- Question 1.25 (Das Gupta et al)
- One of the applications of Computing with numbers is in Hashing computation..
Please read Karp-Rabin String Search Algorithm which uses Hashing in a clever fasion.. Please write a pseudo code how rolling hashes are computed. In particular if a hash computation is
done for a substring s[i]...s[i+m-1] (m being the length of the pattern we
are trying to match) , how to compute the hash value for the substring
s[i+1]...s[i+m]. The lab home work for next week will be to implement
Karp - Rabin string search algorithm. You can use any hash function.