a simple streaming bit parallel algorithm for swap
play

A Simple Streaming Bit-parallel Algorithm for Swap Pattern Matching - PowerPoint PPT Presentation

Introduction Algorithm Conclusion A Simple Streaming Bit-parallel Algorithm for Swap Pattern Matching V aclav Bla zej (joint work with Ond rej Such y and Tom a s Valla) Faculty of Information Technology Czech Technical


  1. Introduction Algorithm Conclusion A Simple Streaming Bit-parallel Algorithm for Swap Pattern Matching V´ aclav Blaˇ zej (joint work with Ondˇ rej Such´ y and Tom´ aˇ s Valla) Faculty of Information Technology Czech Technical University in Prague November 15, 2017 V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  2. Introduction Algorithm Conclusion Motivation Definition History Exact pattern matching V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  3. Introduction Algorithm Conclusion Motivation Definition History Exact pattern matching V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  4. Introduction Algorithm Conclusion Motivation Definition History Exact pattern matching V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  5. Introduction Algorithm Conclusion Motivation Definition History Exact pattern matching V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  6. Introduction Algorithm Conclusion Motivation Definition History Swap pattern matching (Swap Matching) What is sawp pattren matchnig? V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  7. Introduction Algorithm Conclusion Motivation Definition History Swap pattern matching (Swap Matching) What is sawp pattren matchnig? Did you mean: “What is swap pattern matching?” ? V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  8. Introduction Algorithm Conclusion Motivation Definition History Swap pattern matching (Swap Matching) What is sawp pattren matchnig? Did you mean: “What is swap pattern matching?” ? V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  9. Introduction Algorithm Conclusion Motivation Definition History Swap pattern matching (Swap Matching) What is sawp pattren matchnig? Did you mean: “What is swap pattern matching?” ? x we are allowed to swap adjacent symbols V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  10. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  11. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  12. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), 2 for all i, π ( i ) ∈ { i − 1 , i, i + 1 } (swap only adjacent symbols), V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  13. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), 2 for all i, π ( i ) ∈ { i − 1 , i, i + 1 } (swap only adjacent symbols), 3 when π ( i ) � = i then S π ( i ) � = S i (cannot swap same symbols). V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  14. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), 2 for all i, π ( i ) ∈ { i − 1 , i, i + 1 } (swap only adjacent symbols), 3 when π ( i ) � = i then S π ( i ) � = S i (cannot swap same symbols). acbabcabbab acbab V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  15. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), 2 for all i, π ( i ) ∈ { i − 1 , i, i + 1 } (swap only adjacent symbols), 3 when π ( i ) � = i then S π ( i ) � = S i (cannot swap same symbols). acbabcabbab acbab V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  16. Introduction Algorithm Conclusion Motivation Definition History Definition of Swap Matching problem We search for occurrences of patterns in the text while allowing pattern to swap adjacent symbols. We define swaps π : { 1 . . . n } → { 1 . . . n } in the pattern S such that: 1 when π ( i ) = j then π ( j ) = i (symbols S i , S j are swapped), 2 for all i, π ( i ) ∈ { i − 1 , i, i + 1 } (swap only adjacent symbols), 3 when π ( i ) � = i then S π ( i ) � = S i (cannot swap same symbols). acbabcabbab acbab V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  17. Introduction Algorithm Conclusion Motivation Definition History Swap Matching example Search for abba in text abbabaaababbbaaabbabaaabbbbaab : Figure: found occurrences of abba in the text V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  18. Introduction Algorithm Conclusion Motivation Definition History History • 1995 - Swap Matching problem was announced as open problem [Muthukrishnan, CPM 95] 1 • 1997 - first solution using FFT, O ( nm 2 log m ) [Amir et al., J. Algorithms] • 2008 - first non-FFT algorithm, using bit-parallelism [Iliopoulos and Rahman, SOFSEM 2008] O (( n + m ) log m ) • 2009 - Cross Sampling algorithm which solves the problem in O ( n ) for short patterns [Cantone and Faro, SOFSEM 2009] • 2013 - new model using reactive automata and solution with O ( n ) complexity for short patterns [Faro, PSC 2013] • 2014 - Smalgo-I algorithm, uses bit-parallelism [Ahmed et al., Theor. Comput. Sci.] O ( m w n ) V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  19. Introduction Algorithm Conclusion Motivation Definition History History • 1995 - Swap Matching problem was announced as open problem [Muthukrishnan, CPM 95] 1 2 log m ) [Amir et al., J. • 1997 - first solution using FFT, O ( nm Algorithms] • 2008 - first non-FFT algorithm, using bit-parallelism [Iliopoulos and Rahman, SOFSEM 2008] FATAL ERROR • 2009 - Cross Sampling algorithm which solves the problem in O ( n ) for short patterns [Cantone and Faro, SOFSEM 2009] • 2013 - new model using reactive automata and solution with O ( n ) complexity for short patterns [Faro, PSC 2013] • 2014 - Smalgo-I algorithm, uses bit-parallelism [Ahmed et al., Theor. Comput. Sci.] FATAL ERROR V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  20. Introduction Algorithm Conclusion Model Our algorithm Unsolvable with DFA The Model [Iliopoulos and Rahman, SOFSEM 2008] • Graph represents all patterns which are feasible. 1 2 3 4 5 6 7 − 1 a c a a b b b a c a c 0 b b b c a c c 1 b b b b Figure: Graph for P = abcbbac V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  21. Introduction Algorithm Conclusion Model Our algorithm Unsolvable with DFA The Model [Iliopoulos and Rahman, SOFSEM 2008] • Graph represents all patterns which are feasible. • Each path from first to last column is one such pattern. 1 2 3 4 5 6 7 − 1 a c c a a b b b a c c a a c c 0 b b b b b b c a c c 1 b b b b Figure: Graph for P = abcbbac V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  22. Introduction Algorithm Conclusion Model Our algorithm Unsolvable with DFA The Model [Iliopoulos and Rahman, SOFSEM 2008] • Graph represents all patterns which are feasible. • Each path from first to last column is one such pattern. 1 2 3 4 5 6 7 − 1 a c c a a b b b a c c a a c c 0 b b b b c a c c 1 b b b b Figure: Graph for P = abcbbac V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  23. Introduction Algorithm Conclusion Model Our algorithm Unsolvable with DFA The Model [Iliopoulos and Rahman, SOFSEM 2008] • Graph represents all patterns which are feasible. • Each path from first to last column is one such pattern. 1 2 3 4 5 6 7 − 1 a c a a b b b a c c a a c 0 b b b b c a c c 1 b b b b Figure: Graph for P = abcbbac V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

  24. Introduction Algorithm Conclusion Model Our algorithm Unsolvable with DFA The Model [Iliopoulos and Rahman, SOFSEM 2008] • Graph represents all patterns which are feasible. • Each path from first to last column is one such pattern. • The signal is information that a path partially matches. 1 2 3 4 5 6 7 − 1 a c a a b b b a a c c a c 0 b b b b c a c c 1 b b b b Figure: Graph for P = abcbbac V´ aclav Blaˇ zej Streaming Algorithm for Swap Matching

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend