space-saving strategies for computing Δ -points

12
Space-Saving Strategies for Computing Δ-points Kun-Mao Chao ( 趙趙趙 ) Department of Computer Scienc e and Information Engineering National Taiwan University, T aiwan E-mail: [email protected] WWW: http://www.csie.ntu.edu.tw/~k mchao

Upload: tashya-palmer

Post on 31-Dec-2015

16 views

Category:

Documents


0 download

DESCRIPTION

Space-Saving Strategies for Computing Δ -points. Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan E-mail: [email protected] WWW: http://www.csie.ntu.edu.tw/~kmchao. Δ -points. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Space-Saving Strategies for Computing  Δ -points

Space-Saving Strategies for Computing Δ-points

Kun-Mao Chao (趙坤茂 )Department of Computer Science an

d Information EngineeringNational Taiwan University, Taiwan

E-mail: [email protected]

WWW: http://www.csie.ntu.edu.tw/~kmchao

Page 2: Space-Saving Strategies for Computing  Δ -points

2

Δ-points• S-(i, j): the best score of a path from (0, 0) to (i, j).• S+(i, j): the best score of a path from (i, j) to (m, n).• Δ-points: S-(i, j) + S+( i, j) >= Δ

S -

S +

Page 3: Space-Saving Strategies for Computing  Δ -points

3

Method 1: O(MN) time; O(MN) space

S - S +

M

N

Page 4: Space-Saving Strategies for Computing  Δ -points

4

Method 2: O(M2N) time; O(M+N) space

S -

S +

Each row takes O(MN) time. In total, O(M) x O(MN) = O(M2N)

M

N

Page 5: Space-Saving Strategies for Computing  Δ -points

5

Method 3: O(MN) time; O(M+N) space

S -

S +

M

N

Page 6: Space-Saving Strategies for Computing  Δ -points

6

Method 4: O(MN log M) time; O(M+N log M) space

S -

S +

M

N

Page 7: Space-Saving Strategies for Computing  Δ -points

7

Method 5: O(MN log min {M, N}) time; O(M+N) space

M

N

Page 8: Space-Saving Strategies for Computing  Δ -points

8

Method 6: O(MN log log min {M, N}) time; O(M+N) space

M

N

1/22

1/23

1/25

1/29

1/25

1/210

1/219

Real Size

Page 9: Space-Saving Strategies for Computing  Δ -points

9

Method 7: O(1/ε MN) time; O(M+ 1/ε MεN) space

Here we use ε= 1/2 to illustrate the idea.

S -

S +

M

N

M1/2 Solve each M1/2N problem

Page 10: Space-Saving Strategies for Computing  Δ -points

10

Method 8: O(1/εMN) time; O(1/ε M1+ε+ N) space

Here we use ε= 1/2 to illustrate the idea.

M

NM 2M 3M

S -

S +

M

M

M1/2 Solve each M1/2M problem

O(N)

Page 11: Space-Saving Strategies for Computing  Δ -points

11

Methods

Method 1: O(MN) time; O(MN) spaceMethod 2: O(M2N) time; O(M+N) spaceMethod 3: O(MN) time; O(M+N) spaceMethod 4: O(MN log M) time; O(M+N log M) spaceMethod 5: O(MN log min {M, N}) time; O(M+N) sp

aceMethod 6: O(MN log log min {M, N}) time; O(M+

N) spaceMethod 7: O(1/εMN) time; O(M+1/ ε MεN) spaceMethod 8: O(1/εMN) time; O(1/ε M1+ε+ N) space

Page 12: Space-Saving Strategies for Computing  Δ -points

12

Bonus points

• O(MN) time; O(M+N) space

• o(MN log log min {M, N}) time; O(M+N) space

• O(1/εMN) time; o(1/ε M1+ε+N) space