Presentation is loading. Please wait.

Presentation is loading. Please wait.

Greedy Algorithms for the Shortest Common Superstring Overview by Anton Nesterov Saint Petersburg State University Russia Original paper by A. Frieze,

Similar presentations


Presentation on theme: "Greedy Algorithms for the Shortest Common Superstring Overview by Anton Nesterov Saint Petersburg State University Russia Original paper by A. Frieze,"— Presentation transcript:

1 Greedy Algorithms for the Shortest Common Superstring Overview by Anton Nesterov Saint Petersburg State University Russia Original paper by A. Frieze, Carnegie Mellon University, USA W. Szpankowski, Purdue University, USA

2 Contents of the report Description of the problem Formulation of main results Ideas of the proof

3 Shortest common superstring Problem (SCS) Given a collection of strings: We want to find a superstring that contains each as a substring

4 Example Three words: fear nature arena Superstring: fearenature

5 Algorithms It is known, that the problem is NP-hard. It is of a great interest to develop a good approximation algorithm. Some greedy algorithms will be presented

6 Definitions We define an overlap and a special sum of two strings Alphabet

7 Example

8 Total optimal overlap Let us have a set of n strings Assume that we had solved the SCS The minimal superstring is S

9 Descriptions of algorithms Generic greedy algorithm : GREEDY In step (*) we choose x,y in order to maximize o(x,y); RGREEDY In step (*) x is a string z from the previous iteration. It means that we have only one long string, which grows by addition of strings at the right-hand end. (*)

10 Bernoulli model All strings are of the same length Symbols are independent on the previous ones. Let be the associated entropy for the Bernoulli model where

11 Main result Theorem. Let us consider the SCS problem under the Bernoulli model. Then, with high probability: provided where

12 Another models Markovian model: each symbol depends only on the previous one Mixing model When we are solving more complicated problems using SCS, two previous models are too unrealistic. Then it needs to use mixing model. The main idea of it is as follows: Let we have the string:...100110110010 The farther the symbol the lesser the dependence on it

13 Compression SCS can be used to compress strings. Instead of storing all strings of total length nℓ we can store the SCS and n pointers indicating the beginning of an original strings plus lengths of all strings. Compression ratio will be: But when the length of a string grows faster then logn, then compression ratio will be 1

14 Ideas of the proof First of all we shall show that it is unlikely that there is a pair of strings with overlap more than half of their length Let E denotes the event that there is no such a pair If, then provided

15 Two halves of a string Let’s consider a part of our superstring :...ancneanaosaasunanssana.. Overlaps of two nearby strings are marked by red. Each string has two marked overlaps the “tail” and the “nose”. Knowing that such overlaps practically never takes more than half of the string, we would divide every string into two parts: the first half and the second one, each has a length of l/2. Then, if we want to consider an overlap of two strings a and b, we should operate only with the first half of a and the second part of b.

16 RGREEDY and trees We now consider a tree process that is equal to RGREEDY Tree T would be an infinite rooted M-ary tree. M (size of an alphabet) edges leading down from each vertex will be labeled with Thus, each vertex of depth d is identified with string of length d.

17 Modeling RGREADY For the each string we will mark each vertex with a number of strings that has prefix associated with this vertex. “k” means that there are k strings starting from

18 Example 1. We will climb down to our tree, following letters from the second half of the first string, to the depth of l/2. 2. We’ll stop at the highest positive integer, let’s call it t. 3. So, we can find t strings that have suffixes equal to the prefix of the first string. 4. Let’s consider one of these t stings in the similar way (see 1.). We’ll repeat such procedure n times.

19 GREEDY Let D be the digraph –with edges weights We sort the edges A into so that Thus the problem is to find a path along the edges, which has the maximum weight.


Download ppt "Greedy Algorithms for the Shortest Common Superstring Overview by Anton Nesterov Saint Petersburg State University Russia Original paper by A. Frieze,"

Similar presentations


Ads by Google