String Matching with Variable Length Gaps By Philip Bille, Inge Li - - PowerPoint PPT Presentation

string matching with variable length gaps
SMART_READER_LITE
LIVE PREVIEW

String Matching with Variable Length Gaps By Philip Bille, Inge Li - - PowerPoint PPT Presentation

String Matching with Variable Length Gaps By Philip Bille, Inge Li Grtz, Hjalte Wedel Vildhj and David Kofoed Wind Presented by Hjalte Wedel Vildhj October 13, 2010 SPIRE 2010, Los Cabos, Mexico The Variable Length Gap Problem Given some


slide-1
SLIDE 1

String Matching with Variable Length Gaps

By Philip Bille, Inge Li Gørtz, Hjalte Wedel Vildhøj and David Kofoed Wind Presented by Hjalte Wedel Vildhøj October 13, 2010 SPIRE 2010, Los Cabos, Mexico

slide-2
SLIDE 2

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T.

slide-3
SLIDE 3

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1

slide-4
SLIDE 4

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

slide-5
SLIDE 5

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17
  • 6

6

end pos in T

slide-6
SLIDE 6

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17
  • Not a valid match!

8 6

slide-7
SLIDE 7

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17, 28
  • 6

6

end pos in T

slide-8
SLIDE 8

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17, 28
  • 7

5

end pos in T

slide-9
SLIDE 9

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17, 28, 31
  • 7

3

end pos in T

slide-10
SLIDE 10

The Variable Length Gap Problem

Given some string T ∈ Σ+ and a variable length gap pattern P = P1 · g{a1, b1} · P2 · g{a2, b2} · · · g{ak−1, bk−1} · Pk . Find the end positions for all occurrences of P in T. Some x ∈ Σ∗ s.t. a1 ≤ |x| ≤ b1 Example: P = A · g{6, 7} · CC · g{2, 6} · GT T = ATCGGCTCCAGACCAGTACCCGTTCCGTGGT Solution:

  • 17, 28, 31
slide-11
SLIDE 11

A Closer Look At The Problem

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

slide-12
SLIDE 12

A Closer Look At The Problem

Parameters n = |T| α = # occ. of P1, P2, . . . , Pk in T m =

k

  • i=1

|Pi| A =

k

  • i=1

ai

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

slide-13
SLIDE 13

A Closer Look At The Problem

Parameters n = |T| α = # occ. of P1, P2, . . . , Pk in T m =

k

  • i=1

|Pi| A =

k

  • i=1

ai Known Upper Bounds By Time Space Bille & Thorup1 O

  • n(klog w

w

+ log k) + m log m + A

  • O(m + A)

Morgante et al.2 O((n + m) log k + α) O(m + α)

  • 1P. Bille and M. Thorup. Regular expression matching with multi-strings and
  • intervals. In Proc. 21st SODA, 2010
  • 2M. Morgante, A. Policriti, N. Vitacolonna, and A. Zuccolo. Structured motifs
  • search. J. Comput. Bio., 12(8):1065-1082, 2005
slide-14
SLIDE 14

A Closer Look At The Problem

Parameters n = |T| α = # occ. of P1, P2, . . . , Pk in T m =

k

  • i=1

|Pi| A =

k

  • i=1

ai Known Upper Bounds By Time Space Bille & Thorup O

  • n(klog w

w

+ log k) + m log m + A

  • O(m + A)

Morgante et al. O((n + m) log k + α) O(m + α)

Can you get the best of both?

slide-15
SLIDE 15

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-16
SLIDE 16

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-17
SLIDE 17

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-18
SLIDE 18

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-19
SLIDE 19

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-20
SLIDE 20

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-21
SLIDE 21

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-22
SLIDE 22

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-23
SLIDE 23

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-24
SLIDE 24

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-25
SLIDE 25

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-26
SLIDE 26

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-27
SLIDE 27

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-28
SLIDE 28

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-29
SLIDE 29

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-30
SLIDE 30

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-31
SLIDE 31

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-32
SLIDE 32

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-33
SLIDE 33

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

dead

slide-34
SLIDE 34

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

dead

slide-35
SLIDE 35

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

dead

slide-36
SLIDE 36

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-37
SLIDE 37

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-38
SLIDE 38

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-39
SLIDE 39

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-40
SLIDE 40

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead dead

L3

slide-41
SLIDE 41

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead dead

L3

slide-42
SLIDE 42

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2 L3

slide-43
SLIDE 43

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-44
SLIDE 44

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-45
SLIDE 45

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-46
SLIDE 46

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-47
SLIDE 47

Illustrating the Algorithm

P = A · g{6, 7} · CC · g{2, 6} · GT

P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3

A T C G G C T C C A G A C C A G T A C C C G T T C C G T G G T

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

L2

dead

L3

slide-48
SLIDE 48

Time and Space

Claim: The algorithm runs in O((n + m) log k + α) time and uses O(m + A) space.

slide-49
SLIDE 49

Time and Space

Claim: The algorithm runs in O((n + m) log k + α) time and uses O(m + A) space. Time

◮ Processing T using AC automaton takes

O((n + m) log k + α) time.

◮ At most α ranges are added and removed, so O(α) extra

time is spent maintaining the lists.

slide-50
SLIDE 50

Time and Space

Claim: The algorithm runs in O((n + m) log k + α) time and uses O(m + A) space. Time

◮ Processing T using AC automaton takes

O((n + m) log k + α) time.

◮ At most α ranges are added and removed, so O(α) extra

time is spent maintaining the lists. Space

◮ AC automaton takes O(m) space. ◮ How much space is used by L2, . . . , Lk?

slide-51
SLIDE 51

Maximum Size of Li

Pi−1 R(x1) x1 is reported and R(x1) is added to Li

Position in T

x1

slide-52
SLIDE 52

Maximum Size of Li

Pi−1 Pi R(x1) x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

Position in T

x1

slide-53
SLIDE 53

Maximum Size of Li

Pi−1 Pi Pi−1 R(x1) R(xℓ) x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

Position in T

x1 xℓ

slide-54
SLIDE 54

Maximum Size of Li

Pi−1 Pi Pi−1 R(x1) R(xℓ) R(x2) x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

  • 1

Position in T

x1 xℓ

slide-55
SLIDE 55

Maximum Size of Li

Pi−1 Pi Pi−1 R(x1) R(xℓ) R(x2) d |Pi| − 1 ai−1 ci−1 bi−1 + 1 x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

  • 1

Position in T

x1 xℓ

slide-56
SLIDE 56

Maximum Size of Li

Pi−1 Pi Pi−1 R(x1) R(xℓ) R(x2) d |Pi| − 1 ai−1 ci−1 bi−1 + 1 x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

  • 1

Position in T

x1 xℓ

|Li| ≤

  • d

ci−1 + 1

  • + 1 =

2ci−1 + |Pi| + ai−1 ci−1 + 1

  • = O(|Pi| + ai−1) .
slide-57
SLIDE 57

Maximum Size of Li

Pi−1 Pi Pi−1 R(x1) R(xℓ) R(x2) d |Pi| − 1 ai−1 ci−1 bi−1 + 1 x1 is reported and R(x1) is added to Li Last position where R(x1) is still alive

  • 1

Position in T

x1 xℓ

|Li| ≤

  • d

ci−1 + 1

  • + 1 =

2ci−1 + |Pi| + ai−1 ci−1 + 1

  • = O(|Pi| + ai−1) .

Total space:

k

  • i=2

|Li| = O       

k

  • i=2

|Pi| +

k−1

  • i=1

ai        = O(m + A)