# assign4 - CS648 Randomized Algorithms Semester II 2007-08...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS648 Randomized Algorithms Semester II, 2007-08. 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 non-empty 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 well-defined 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 sub-matrix of X . To apply the randomized algorithm described above, we convert the matrix....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

assign4 - CS648 Randomized Algorithms Semester II 2007-08...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online