18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Shortest Common Superstring<br />

Next: <strong>Algorithm</strong>ic Resources Up: Set and String Problems Previous: Longest Common Substring<br />

Shortest Common Superstring<br />

Input description: A set of strings .<br />

Problem description: Find the shortest string S' that contains each element of S as a substring.<br />

Discussion: Shortest common superstring arises in a variety of applications, including sparse matrix<br />

compression. Suppose we have an matrix with most of the elements being zero. We can partition<br />

each row into m/k runs of k elements each and construct the shortest common superstring S' of these runs.<br />

We now have reduced the problem to storing the superstring, plus an array of pointers into the<br />

superstring denoting where each of the runs starts. Accessing a particular element M[i,j] still takes<br />

constant time, but there is a space savings when |S|

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!