This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS648 Randomized Algorithms Semester II, 200708. Assignment 4 Due on : 1st April Note : Give complete details of the analysis of your solution. Be very rigorous in providing any mathematical detail in support of your arguments. Also mention the Lemma/Theorem you use. 1. (15) (a) In this problem we will use a different finger printing technique to solve the pattern matching problem. The idea is to map any bit string s into a 2 × 2 matrix M ( s ) , as follows. • For the empty string ǫ , M ( ǫ ) = bracketleftBigg 1 1 bracketrightBigg . • M (0) = bracketleftBigg 1 1 1 bracketrightBigg . • M [1] = bracketleftBigg 1 1 1 bracketrightBigg . • For nonempty strings x and y , M ( xy ) = M ( x ) × M ( y ) . Work out the proof of the following assertions only to convince yourself (no need to submit the proofs). i. M ( x ) is welldefined for all x ∈ { , 1 } * . ii. M ( x ) = M ( y ) ⇒ x = y . iii. For x ∈ { , 1 } n , the entries in M ( x ) are bounded by Fibonacci number F n . Can you con struct such a sequence of n entries where entries are of the order of n th Fibonacci number ? By considering the matrices M ( x ) modulo a suitable prime p , show how you would perform efficient randomized pattern matching. (b) Consider two dimensional version of the pattern matching problem. The text is an n × n matrix X , and the pattern is an m × m matrix Y . A pattern matches occurs if Y appears as a contiguous submatrix of X . To apply the randomized algorithm described above, we convert the matrix....
View
Full Document
 Spring '08
 SurenderBaswana
 Economics, Algorithms, Trigraph, TI

Click to edit the document details