Faster Algorithms for Computing Longest Common Increasing Subsequences Gerth Stølting Brodal Kanela Kaligosi Irit Katriel Martin Kutz BRICS, University of Aarhus Max-Planck Institut für Informatik Saarbrücken, Germany Århus, Denmark max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 1 informatik
The Longest-Commmon-Subsequence Problem Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some alphabet Σ α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 2 informatik
The Longest-Commmon-Subsequence Problem Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some alphabet Σ α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest subsequence that occurs in both sequences, a longest common subsequence (LCS) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 2 informatik
The Longest-Commmon-Subsequence Problem Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some alphabet Σ α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest subsequence that occurs in both sequences, a longest common subsequence (LCS) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 2 informatik
The Longest-Commmon-Subsequence Problem Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some alphabet Σ α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest subsequence that occurs in both sequences, a longest common subsequence (LCS) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 2 informatik
The Longest-Commmon-Subsequence Problem Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some alphabet Σ α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest subsequence that occurs in both sequences, a longest common subsequence (LCS) Note: letters may occur repeatedly in the subsequence max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 2 informatik
The Longest-Increasing-Subsequence Problem Given: a sequence A = ( a 1 , . . . , a m ) over an ordered alphabet Σ = { α < β < γ < δ < ǫ } γ α δ β δ α γ β ǫ δ max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 3 informatik
The Longest-Increasing-Subsequence Problem Given: a sequence A = ( a 1 , . . . , a m ) over an ordered alphabet Σ = { α < β < γ < δ < ǫ } γ α δ β δ α γ β ǫ δ Task: Find a longest increasing subsequence (LIS) in A max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 3 informatik
The Longest-Increasing-Subsequence Problem Given: a sequence A = ( a 1 , . . . , a m ) over an ordered alphabet Σ = { α < β < γ < δ < ǫ } γ α δ β δ α γ β ǫ δ Task: Find a longest increasing subsequence (LIS) in A max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 3 informatik
The Longest-Increasing-Subsequence Problem Given: a sequence A = ( a 1 , . . . , a m ) over an ordered alphabet Σ = { α < β < γ < δ < ǫ } γ α δ β δ α γ β ǫ δ Task: Find a longest increasing subsequence (LIS) in A Important: here, letters may not occur repeatedly (strictly increasing subsequence) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 3 informatik
Classical Results LCS can be computed in O ( mn ) time by dynamic programming [Wagner & Fischer, 1974] (and by divide-&-conquer in O ( n ) space [Hirschberg, 1975]) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 4 informatik
Classical Results LCS can be computed in O ( mn ) time by dynamic programming [Wagner & Fischer, 1974] (and by divide-&-conquer in O ( n ) space [Hirschberg, 1975]) Θ ( log n ) -time speed-up possible [Masek & Paterson, 1980] max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 4 informatik
Classical Results LCS can be computed in O ( mn ) time by dynamic programming [Wagner & Fischer, 1974] (and by divide-&-conquer in O ( n ) space [Hirschberg, 1975]) Θ ( log n ) -time speed-up possible [Masek & Paterson, 1980] important parameter: r = # matches (pairs ( i, j ) with a i = b j ) LCS in O ( r log n ) time [Hunt & Szymanski, 1977] (assuming r ≥ m, n ) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 4 informatik
Classical Results LCS can be computed in O ( mn ) time by dynamic programming [Wagner & Fischer, 1974] (and by divide-&-conquer in O ( n ) space [Hirschberg, 1975]) Θ ( log n ) -time speed-up possible [Masek & Paterson, 1980] important parameter: r = # matches (pairs ( i, j ) with a i = b j ) LCS in O ( r log n ) time [Hunt & Szymanski, 1977] (assuming r ≥ m, n ) LIS in O ( n log n ) time [Fredman, 1975] (also as corollary of O ( r log n ) -time algorithm above) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 4 informatik
Longest Commmon Increasing Subsequences Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some ordered alphabet Σ = { α < β < γ < δ < · · · } α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 5 informatik
Longest Commmon Increasing Subsequences Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some ordered alphabet Σ = { α < β < γ < δ < · · · } α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest increasing subsequence that occurs in both sequences, a longest common increasing subsequence (LCIS) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 5 informatik
Longest Commmon Increasing Subsequences Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some ordered alphabet Σ = { α < β < γ < δ < · · · } α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest increasing subsequence that occurs in both sequences, a longest common increasing subsequence (LCIS) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 5 informatik
Longest Commmon Increasing Subsequences Given: two sequences A = ( a 1 , . . . , a m ) , B = ( b 1 , . . . , b n ) over some ordered alphabet Σ = { α < β < γ < δ < · · · } α γ γ β ǫ α β β α γ δ γ β α γ ǫ β δ δ α β δ Task: Find a longest increasing subsequence that occurs in both sequences, a longest common increasing subsequence (LCIS) Quite recently introduced by Yang, Huang, and Chao (IPL, 2005): They compute LCIS in Θ ( mn ) time and space. max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 5 informatik
LCIS Results LCIS in Θ ( mn ) time and space [Yang et al., IPL 2005] max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 6 informatik
LCIS Results LCIS in Θ ( mn ) time and space [Yang et al., IPL 2005] � � parametrized: O min { r log | Σ | , m | Σ | + r } log log m + Sort Σ ( m ) [Chan et al., ISAAC 2005] max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 6 informatik
LCIS Results LCIS in Θ ( mn ) time and space [Yang et al., IPL 2005] � � parametrized: O min { r log | Σ | , m | Σ | + r } log log m + Sort Σ ( m ) (essentially O ( r · log | Σ | ) ) [Chan et al., ISAAC 2005] max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 6 informatik
LCIS Results LCIS in Θ ( mn ) time and space [Yang et al., IPL 2005] � � parametrized: O min { r log | Σ | , m | Σ | + r } log log m + Sort Σ ( m ) (essentially O ( r · log | Σ | ) ) [Chan et al., ISAAC 2005] remember: r might be Ω ( mn ) but it could also be much smaller in certain important cases (when A, B are permutations, for example) max planck institut Martin Kutz: Faster Algorithms for Longest Common Increasing Subsequences – p. 6 informatik
Recommend
More recommend