String comparison by transposition networks

Size: px
Start display at page:

Download "String comparison by transposition networks"

Transcription

1 String omprison y trnsposition networks Alexnder Tiskin (Joint work with Peter Krushe) Deprtment of Computer Siene University of Wrwik (inludes n extended version of this presenttion) Alexnder Tiskin (Wrwik) String omprison y networks / 36

2 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 2 / 36

3 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 3 / 36

4 Semi-lol string omprison String mthing: finding n ext pttern in string String omprison: finding similr ptterns in two strings (Also known s pproximte string mthing, no reltion to pproximtion lgorithms!) Applitions: omputtionl iology, imge reognition,... Alexnder Tiskin (Wrwik) String omprison y networks 4 / 36

5 Semi-lol string omprison String mthing: finding n ext pttern in string String omprison: finding similr ptterns in two strings (Also known s pproximte string mthing, no reltion to pproximtion lgorithms!) Applitions: omputtionl iology, imge reognition,... Stndrd types of string omprison: glol: whole string ginst whole string lol: sustrings ginst sustrings Min interest of this work: semi-lol: whole string ginst sustrings; prefixes ginst suffixes Alexnder Tiskin (Wrwik) String omprison y networks 4 / 36

6 Semi-lol string omprison Consider strings (= sequenes) over n lphet of size σ Distinguish ontiguous sustrings nd not neessrily ontiguous susequenes Speil ses of sustring: prefix, suffix Stndrd nottion: strings, of length m, n respetively Assume when neessry: m n; m, n resonly lose Alexnder Tiskin (Wrwik) String omprison y networks 5 / 36

7 Semi-lol string omprison Consider strings (= sequenes) over n lphet of size σ Distinguish ontiguous sustrings nd not neessrily ontiguous susequenes Speil ses of sustring: prefix, suffix Stndrd nottion: strings, of length m, n respetively Assume when neessry: m n; m, n resonly lose The longest ommon susequene (LCS) sore: length of the longest string tht is susequene of oth nd The LCS prolem: determine the LCS sore for ginst Alexnder Tiskin (Wrwik) String omprison y networks 5 / 36

8 Semi-lol string omprison The LCS prolem is speil se of the edit distne prolem: minimum ost to trnsform into y hrter edits Chrter edits: insertions, deletions, sustitutions Levenshtein distne ED Lev (, ): ost in = ost del = ost su = LCS distne ED LCS (, ): ost in = ost del =, ost su 2 Equivlently, sustitutions not llowed ED LCS (, ) = m + n 2 LCS(, ) An edit distne is rtionl, if ost in+ost del ost su is rtionl numer All tehniques in this work extend to rtionl edit distnes Alexnder Tiskin (Wrwik) String omprison y networks 6 / 36

9 Semi-lol string omprison The lignment grph (direted, yli) lue = 0 red = LCS("", "") = "" LCS = highest-sore orner-to-orner pth Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

10 Semi-lol string omprison LCS prolem: omputtion time, ssuming σ = O() O(mn) [Wgner, Fisher: 974] O ( ) mn log n [Msek, Pterson: 980], [Crohemore+: 2003] Alexnder Tiskin (Wrwik) String omprison y networks 8 / 36

11 Semi-lol string omprison LCS prolem: omputtion time, ssuming σ = O() O(mn) [Wgner, Fisher: 974] O ( ) mn log n [Msek, Pterson: 980], [Crohemore+: 2003] Stndrd pproh: dynmi progrmming Speedup y exhustive preomputtion of smll loks Blok size: t = O(log n) Blok interfe: O(t) vlues, eh of size O() Totl work O ( mn log n), log-ost RAM Alexnder Tiskin (Wrwik) String omprison y networks 8 / 36

12 Semi-lol string omprison The semi-lol LCS prolem: determine the length of LCS string-sustring LCS: string ginst every sustring of prefix-suffix LCS: every prefix of ginst every suffix of symmetrilly, sustring-string nd suffix-prefix LCS Alexnder Tiskin (Wrwik) String omprison y networks 9 / 36

13 Semi-lol string omprison The semi-lol LCS prolem: determine the length of LCS string-sustring LCS: string ginst every sustring of prefix-suffix LCS: every prefix of ginst every suffix of symmetrilly, sustring-string nd suffix-prefix LCS Output: the highest-sore mtrix of O(n 2 ) LCS sores, llowed to e represented impliitly Cf.: stndrd dynmi progrmming gives prefix-prefix LCS Alexnder Tiskin (Wrwik) String omprison y networks 9 / 36

14 Semi-lol string omprison The lignment grph lue = 0 red = LCS("", "...") = "" Semi-lol LCS = ll highest-sore order-to-order pths (string-sustring = top-to-ottom, et.) Alexnder Tiskin (Wrwik) String omprison y networks 0 / 36

15 Semi-lol string omprison A: the highest-sore mtrix for semi-lol LCS of nd = "" = "" A(0, 3) = LCS(, ) = 8 = "..." A(4, ) = LCS(, ) = 5 A(i, j) = j i if i > j Alexnder Tiskin (Wrwik) String omprison y networks / 36

16 Semi-lol string omprison Semi-lol LCS prolem: output representtion size query time O(n 2 ) O() trivil O(m /2 n) O(log n) string-sustring, [Alves+: 2003] O(n) O(n) string-sustring, [Alves+: 2005] O(n log n) O(log 2 n) [T: 2006], using [Bentley: 980] Alexnder Tiskin (Wrwik) String omprison y networks 2 / 36

17 Semi-lol string omprison Semi-lol LCS prolem: output representtion size query time O(n 2 ) O() trivil O(m /2 n) O(log n) string-sustring, [Alves+: 2003] O(n) O(n) string-sustring, [Alves+: 2005] O(n log n) O(log 2 n) [T: 2006], using [Bentley: 980] Semi-lol LCS prolem: omputtion time, ny σ O(mn 2 ) nive O(mn) string-sustring, [Shmidt: 998], [Alves+: 2005] O ( ) mn [T: 2006] log 0.5 n O ( mn(log log n) 2 ) log n [T: 2007] Bsed on the seweed lgorithm, log-ost RAM Alexnder Tiskin (Wrwik) String omprison y networks 2 / 36

18 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 3 / 36

19 Algorithmi tehniques The lignment grph nd the seweeds = "" = "" = "..." A(4, ) = LCS(, ) = 4 P Σ (i, j) = 4 2 = 5 P gives n impliit representtion of A P(i, j) = orresponds to seweed (top, i) (ottom, j) Alexnder Tiskin (Wrwik) String omprison y networks 4 / 36

20 Algorithmi tehniques The lignment grph nd the seweeds = "" = "" = "..." A(4, ) = LCS(, ) = 4 P Σ (i, j) = 4 2 = 5 P gives n impliit representtion of A P(i, j) = orresponds to seweed (top, i) (ottom, j) Also define top right, left right, left ottom seweeds Gives omplete order-to-order grph-theoreti mthing Alexnder Tiskin (Wrwik) String omprison y networks 4 / 36

21 Algorithmi tehniques Gudí s seweeds (Cs Milà, Brelon) Alexnder Tiskin (Wrwik) String omprison y networks 5 / 36

22 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 6 / 36

23 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

24 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

25 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

26 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

27 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

28 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

29 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

30 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

31 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

32 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

33 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

34 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

35 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

36 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

37 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

38 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

39 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

40 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

41 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

42 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

43 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

44 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

45 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

46 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

47 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

48 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

49 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

50 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

51 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

52 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

53 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

54 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

55 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

56 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

57 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

58 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

59 Algorithmi pplitions: the seweed lgorithm The seweed lgorithm [T: 2006] Iterte over lignment grph, tring seweeds Eh pir of seweeds is llowed to ross t most one Time O(mn) Alexnder Tiskin (Wrwik) String omprison y networks 7 / 36

60 Algorithmi pplitions: the seweed lgorithm Alexnder Tiskin (Wrwik) String omprison y networks 8 / 36

61 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 9 / 36

62 Algorithmi pplitions: trnsposition networks Comprison network: iruit of omprtors A omprtor ompres two inputs, then outputs them in presried order Comprison networks trditionlly used to otin non-rnhing merging nd sorting lgorithms Clssil omprison networks: # omprtors merging O(n log n) [Bther: 968] sorting O(n log 2 n) [Bther: 968] O(n log n) [Ajti+: 983] Alexnder Tiskin (Wrwik) String omprison y networks 20 / 36

63 Algorithmi pplitions: trnsposition networks Comprison network: iruit of omprtors A omprtor ompres two inputs, then outputs them in presried order Comprison networks trditionlly used to otin non-rnhing merging nd sorting lgorithms Clssil omprison networks: # omprtors merging O(n log n) [Bther: 968] sorting O(n log 2 n) [Bther: 968] O(n log n) [Ajti+: 983] Comprison networks re desried y wire digrms Alexnder Tiskin (Wrwik) String omprison y networks 20 / 36

64 Algorithmi pplitions: trnsposition networks The dimond network [Munter: 993] k inputs rrive t top-left k outputs otined t ottom-right Θ(k 2 ) omprtors Eh omprtor swps min to ottom-left mx to top-right A trnsposition network: ll omprisons re etween djent wires A merging network: if oth hlves of input pre-sorted, then output sorted Alexnder Tiskin (Wrwik) String omprison y networks 2 / 36

65 Algorithmi pplitions: trnsposition networks The dimond network If oth hlves of input re sorted, the output is sorted nd n e omputed in time O(n) y merging We will onsider the dimond network s output for n unsorted input, for whih the sorting order is known (s seprte permuttion) In this se, the (unsorted) output n still e omputed in time O(n) Therefore, trnsposition network n e omputed effiiently, if it n e deomposed into smll numer of dimond sunetworks Alexnder Tiskin (Wrwik) String omprison y networks 22 / 36

66 Algorithmi pplitions: trnsposition networks The seweed lgorithm s trnsposition network = "" = "" Comprtors orrespond to hrter mismthes Inputs distint nd pre-sorted in reverse; outputs normlly unsorted Eh input-to-output vlue pth tres seweed Alexnder Tiskin (Wrwik) String omprison y networks 23 / 36

67 Algorithmi pplitions: trnsposition networks Prmeterised omprison: ompring highly similr or dissimilr strings Assume m = n Let ls = LCS(, ), ed = ED LCS (, ) = 2(n ls) High-similrity omprison: (some kind of) ed smll only need to look t O(n ed) hrter mthes High-dissimilrity omprison: ls smll my hve to look t ll hrter mthes ssume the mthes re given s prt of the input; otherwise extr hrge e.g. O(n log n) or O(n σ) (depending on the model) Flexile omprison: sensitive to oth similrity nd dissimilrity Alexnder Tiskin (Wrwik) String omprison y networks 24 / 36

68 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) O(n ls + n log n) [Hirsherg: 977], [Apostolio, Guerr: 985] O(n ed Lev ) [Ukkonen: 985] O(n ed) [Myers: 986] O(ls ed log n) [Myers: 986], [Wu+: 990] O(n ls) [Apostolio+: 992] O(ls ed) [Rik: 995] Alexnder Tiskin (Wrwik) String omprison y networks 25 / 36

69 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) O(n ls + n log n) [Hirsherg: 977], [Apostolio, Guerr: 985] O(n ed Lev ) [Ukkonen: 985] O(n ed) [Myers: 986] O(ls ed log n) [Myers: 986], [Wu+: 990] O(n ls) [Apostolio+: 992] O(ls ed) [Rik: 995] O(ls ed) = O(n ls) nd O(n ed) running together Both re mzingly simple using trnsposition networks The network tkes inputs (no longer distint) Vlue pths now depend on tion of 0 vs 0 nd vs omprisons. Define suh tion to e lwys non-swp. Alexnder Tiskin (Wrwik) String omprison y networks 25 / 36

70 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) High-similrity Alexnder Tiskin (Wrwik) String omprison y networks 26 / 36

71 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) High-similrity Alexnder Tiskin (Wrwik) String omprison y networks 26 / 36

72 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) High-similrity High-dissimilrity Alexnder Tiskin (Wrwik) String omprison y networks 26 / 36

73 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) High-similrity High-dissimilrity Alexnder Tiskin (Wrwik) String omprison y networks 26 / 36

74 Algorithmi pplitions: trnsposition networks Prmeterised omprison (ontd.) High-similrity High-dissimilrity Impliit minstrem of 0s/s ross the network, roken y stry 0s/s There re t most ed or ls stry 0s/s, we tre them expliitly O(n ed) O(n ls) Alexnder Tiskin (Wrwik) String omprison y networks 26 / 36

75 Algorithmi pplitions: trnsposition networks Bit-prllel omprison: using stndrd instrutions on words of size w O(mn/w) [Allison, Dix: 986], [Myers: 999], [Crohemore+: 200] Alexnder Tiskin (Wrwik) String omprison y networks 27 / 36

76 Algorithmi pplitions: trnsposition networks Bit-prllel omprison: using stndrd instrutions on words of size w O(mn/w) [Allison, Dix: 986], [Myers: 999], [Crohemore+: 200] A simple interprettion using trnsposition networks The network tkes inputs ; let it M = mth M S C S M S C + S C S C M S C C S C M S C Alexnder Tiskin (Wrwik) String omprison y networks 27 / 36

77 Algorithmi pplitions: trnsposition networks Bit-prllel omprison: using stndrd instrutions on words of size w O(mn/w) [Allison, Dix: 986], [Myers: 999], [Crohemore+: 200] A simple interprettion using trnsposition networks The network tkes inputs ; let it M = mth M S C S M S C + S C S C M S C C S C M S C Therefore S ( S + ( S M)) ( S M), where S, M re words Alexnder Tiskin (Wrwik) String omprison y networks 27 / 36

78 Algorithmi pplitions: trnsposition networks Alexnder Tiskin (Wrwik) String omprison y networks 28 / 36

79 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 29 / 36

80 Algorithmi pplitions: sprse omprison The sprse LCS prolem: ompring strings with few hrter mthes Speil se: the LCS prolem on permuttions, m = n mthes Equivlent to the longest inresing susequene (LIS) prolem O(n 2 ) nive O(n log n) impliit in [Erdös, Szekeres: 935] [Roinson: 938], [Knuth: 970], [Dijkstr: 980] O(n log log n) unit-ost RAM [Chng, Wng: 992] unit-ost RAM [Bespmytnikh, Segl: 2000] Alexnder Tiskin (Wrwik) String omprison y networks 30 / 36

81 Algorithmi pplitions: sprse omprison Generl se: r mthes. Suppose m = n, n r n 2. O(n 2 ) nive O(r log n) [Hunt, Szymnski: 977] Alexnder Tiskin (Wrwik) String omprison y networks 3 / 36

82 Algorithmi pplitions: sprse omprison Generl se: r mthes. Suppose m = n, n r n 2. O(n 2 ) nive O(r log n) [Hunt, Szymnski: 977] A simple interprettion using trnsposition networks Impliit minstrem of 0s ross the network, split into sustrems y s moving digonlly t mthes For every mth, O(log n) inry serh to find its sustrem Totl work O(r log n) Alexnder Tiskin (Wrwik) String omprison y networks 3 / 36

83 Algorithmi pplitions: sprse omprison The sprse semi-lol LCS prolem Speil se: the semi-lol LCS prolem on permuttions, m = n mthes O(n 2 log n) nive O(n 2 ) restrited, [Alert+: 2003], [Chen+: 2005] O(n.5 log n) rndomised restrited, [Alert+: 2007] O(n.5 ) [T: 2006] Alexnder Tiskin (Wrwik) String omprison y networks 32 / 36

84 Algorithmi pplitions: sprse omprison The sprse semi-lol LCS prolem Speil se: the semi-lol LCS prolem on permuttions, m = n mthes O(n 2 log n) nive O(n 2 ) restrited, [Alert+: 2003], [Chen+: 2005] O(n.5 log n) rndomised restrited, [Alert+: 2007] O(n.5 ) [T: 2006] Algorithm: divide the lignment grph reursively into strips Hlf of seweeds in eh strip is trivil Otin the non-trivil seweeds in eh strip y reursion Conquer the resulting two seweed sets y (min, +)-multiplition Top-level onquer domintes, totl work O(n.5 ) Alexnder Tiskin (Wrwik) String omprison y networks 32 / 36

85 Algorithmi pplitions: sprse omprison The sprse semi-lol LCS prolem Generl se: r mthes. Suppose m = n, n r n 2. O(nr 0.5 ) [Krushe, T: 2008] Alexnder Tiskin (Wrwik) String omprison y networks 33 / 36

86 Algorithmi pplitions: sprse omprison The sprse semi-lol LCS prolem Generl se: r mthes. Suppose m = n, n r n 2. O(nr 0.5 ) [Krushe, T: 2008] Algorithm: divide the lignment grph reursively into squre loks Reursion se: lok with no mthes or lok of size with mth Compute eh lok of size h > s dimond trnsposition network. Cn e done in time O(h) insted of the nive O(h 2 ). In the divide-nd-onquer tree: root: one lok of size n, work O(n) level log 4 r: r loks of size n/r 0.5, work O(r n/r 0.5 ) = O(nr 0.5 ) leves: r loks of size, work O(n) Level log 4 r domintes, totl work O(nr 0.5 ) Alexnder Tiskin (Wrwik) String omprison y networks 33 / 36

87 Algorithmi pplitions: sprse omprison Alexnder Tiskin (Wrwik) String omprison y networks 34 / 36

88 Semi-lol string omprison 2 Algorithmi tehniques 3 Algorithmi pplitions: the seweed lgorithm 4 Algorithmi pplitions: trnsposition networks 5 Algorithmi pplitions: sprse omprison 6 Conlusions nd future work Alexnder Tiskin (Wrwik) String omprison y networks 35 / 36

89 Conlusions nd future work String omprison y trnsposition networks: the seweed lgorithm s network simple interprettion of high-similrity nd dissimilrity LCS simple interprettion of it-prllel LCS sprse semi-lol LCS vi trnsposition networks Further pplitions of the method: ompring run-length ompressed strings online pproximte mthing...? Alexnder Tiskin (Wrwik) String omprison y networks 36 / 36

Paradigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms

Paradigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms Prdigm. Dt Struture Known exmples: link tble, hep, Our leture: suffix tree Will involve mortize method tht will be stressed shortly in this ourse Suffix trees Wht is suffix tree? Simple pplitions History

More information

Lecture 8: Graph-theoretic problems (again)

Lecture 8: Graph-theoretic problems (again) COMP36111: Advned Algorithms I Leture 8: Grph-theoreti prolems (gin) In Prtt-Hrtmnn Room KB2.38: emil: iprtt@s.mn..uk 2017 18 Reding for this leture: Sipser: Chpter 7. A grph is pir G = (V, E), where V

More information

CS 241 Week 4 Tutorial Solutions

CS 241 Week 4 Tutorial Solutions CS 4 Week 4 Tutoril Solutions Writing n Assemler, Prt & Regulr Lnguges Prt Winter 8 Assemling instrutions utomtilly. slt $d, $s, $t. Solution: $d, $s, nd $t ll fit in -it signed integers sine they re 5-it

More information

Outline. Motivation Background ARCH. Experiment Additional usages for Input-Depth. Regular Expression Matching DPI over Compressed HTTP

Outline. Motivation Background ARCH. Experiment Additional usages for Input-Depth. Regular Expression Matching DPI over Compressed HTTP ARCH This work ws supported y: The Europen Reserh Counil, The Isreli Centers of Reserh Exellene, The Neptune Consortium, nd Ntionl Siene Foundtion wrd CNS-119748 Outline Motivtion Bkground Regulr Expression

More information

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chpter 9 Greey Tehnique Copyright 2007 Person Aison-Wesley. All rights reserve. Greey Tehnique Construts solution to n optimiztion prolem piee y piee through sequene of hoies tht re: fesile lolly optiml

More information

Pattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions

Pattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions Pttern Mthing Pttern Mthing Some of these leture slides hve een dpted from: lgorithms in C, Roert Sedgewik. Gol. Generlize string serhing to inompletely speified ptterns. pplitions. Test if string or its

More information

Duality in linear interval equations

Duality in linear interval equations Aville online t http://ijim.sriu..ir Int. J. Industril Mthemtis Vol. 1, No. 1 (2009) 41-45 Dulity in liner intervl equtions M. Movhedin, S. Slhshour, S. Hji Ghsemi, S. Khezerloo, M. Khezerloo, S. M. Khorsny

More information

COMP108 Algorithmic Foundations

COMP108 Algorithmic Foundations Grph Theory Prudene Wong http://www.s.liv..uk/~pwong/tehing/omp108/201617 How to Mesure 4L? 3L 5L 3L ontiner & 5L ontiner (without mrk) infinite supply of wter You n pour wter from one ontiner to nother

More information

Greedy Algorithm. Algorithm Fall Semester

Greedy Algorithm. Algorithm Fall Semester Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion

More information

COSC 6374 Parallel Computation. Non-blocking Collective Operations. Edgar Gabriel Fall Overview

COSC 6374 Parallel Computation. Non-blocking Collective Operations. Edgar Gabriel Fall Overview COSC 6374 Prllel Computtion Non-loking Colletive Opertions Edgr Griel Fll 2014 Overview Impt of olletive ommunition opertions Impt of ommunition osts on Speedup Crtesin stenil ommunition All-to-ll ommunition

More information

Information Retrieval and Organisation

Information Retrieval and Organisation Informtion Retrievl nd Orgnistion Suffix Trees dpted from http://www.mth.tu.c.il/~himk/seminr02/suffixtrees.ppt Dell Zhng Birkeck, University of London Trie A tree representing set of strings { } eef d

More information

Lesson 4.4. Euler Circuits and Paths. Explore This

Lesson 4.4. Euler Circuits and Paths. Explore This Lesson 4.4 Euler Ciruits nd Pths Now tht you re fmilir with some of the onepts of grphs nd the wy grphs onvey onnetions nd reltionships, it s time to egin exploring how they n e used to model mny different

More information

Suffix trees, suffix arrays, BWT

Suffix trees, suffix arrays, BWT ALGORITHMES POUR LA BIO-INFORMATIQUE ET LA VISUALISATION COURS 3 Rluc Uricru Suffix trees, suffix rrys, BWT Bsed on: Suffix trees nd suffix rrys presenttion y Him Kpln Suffix trees course y Pco Gomez Liner-Time

More information

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2012 Colin Dewey cdewey@biostt.wisc.edu Gols for Lecture the key concepts to understnd re the following how lrge-scle lignment

More information

The Network Layer: Routing in the Internet. The Network Layer: Routing & Addressing Outline

The Network Layer: Routing in the Internet. The Network Layer: Routing & Addressing Outline CPSC 852 Internetworking The Network Lyer: Routing in the Internet Mihele Weigle Deprtment of Computer Siene Clemson University mweigle@s.lemson.edu http://www.s.lemson.edu/~mweigle/ourses/ps852 1 The

More information

V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V)

V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V) Definitions G = (V, E) V = set of verties (vertex / noe) E = set of eges (v, w) (v, w in V) (v, w) orere => irete grph (igrph) (v, w) non-orere => unirete grph igrph: w is jent to v if there is n ege from

More information

COSC 6374 Parallel Computation. Communication Performance Modeling (II) Edgar Gabriel Fall Overview. Impact of communication costs on Speedup

COSC 6374 Parallel Computation. Communication Performance Modeling (II) Edgar Gabriel Fall Overview. Impact of communication costs on Speedup COSC 6374 Prllel Computtion Communition Performne Modeling (II) Edgr Griel Fll 2015 Overview Impt of ommunition osts on Speedup Crtesin stenil ommunition All-to-ll ommunition Impt of olletive ommunition

More information

COSC 6374 Parallel Computation. Dense Matrix Operations

COSC 6374 Parallel Computation. Dense Matrix Operations COSC 6374 Prllel Computtion Dense Mtrix Opertions Edgr Griel Fll Edgr Griel Prllel Computtion Edgr Griel erminology Dense Mtrix: ll elements of the mtrix ontin relevnt vlues ypilly stored s 2-D rry, (e.g.

More information

What are suffix trees?

What are suffix trees? Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl

More information

Algorithm Design (5) Text Search

Algorithm Design (5) Text Search Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:

More information

Distance vector protocol

Distance vector protocol istne vetor protool Irene Finohi finohi@i.unirom.it Routing Routing protool Gol: etermine goo pth (sequene of routers) thru network from soure to Grph strtion for routing lgorithms: grph noes re routers

More information

Width and Bounding Box of Imprecise Points

Width and Bounding Box of Imprecise Points Width nd Bounding Box of Impreise Points Vhideh Keikh Mrten Löffler Ali Mohdes Zhed Rhmti Astrt In this pper we study the following prolem: we re given set L = {l 1,..., l n } of prllel line segments,

More information

CS553 Lecture Introduction to Data-flow Analysis 1

CS553 Lecture Introduction to Data-flow Analysis 1 ! Ide Introdution to Dt-flow nlysis!lst Time! Implementing Mrk nd Sweep GC!Tody! Control flow grphs! Liveness nlysis! Register llotion CS553 Leture Introdution to Dt-flow Anlysis 1 Dt-flow Anlysis! Dt-flow

More information

s 1 t 4 s 2 4 t 2 a b r 2 r 8 r10 g 4

s 1 t 4 s 2 4 t 2 a b r 2 r 8 r10 g 4 k-pirs Non-Crossing Shortest Pths in Simple Polgon Evnthi Ppdopoulou Northwestern Universit, Evnston, Illinois 60208, USA Astrt. This pper presents n O(n + k) time lgorithm to ompute the set of k non-rossing

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

CS453 INTRODUCTION TO DATAFLOW ANALYSIS

CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 Leture Register llotion using liveness nlysis 1 Introdution to Dt-flow nlysis Lst Time Register llotion for expression trees nd lol nd prm vrs Tody Register

More information

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1.

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1. Answer on Question #5692, Physics, Optics Stte slient fetures of single slit Frunhofer diffrction pttern. The slit is verticl nd illuminted by point source. Also, obtin n expression for intensity distribution

More information

CMPUT101 Introduction to Computing - Summer 2002

CMPUT101 Introduction to Computing - Summer 2002 CMPUT Introdution to Computing - Summer 22 %XLOGLQJ&RPSXWHU&LUFXLWV Chpter 4.4 3XUSRVH We hve looked t so fr how to uild logi gtes from trnsistors. Next we will look t how to uild iruits from logi gtes,

More information

CS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal

CS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal CS 55 Computer Grphis Hidden Surfe Removl Hidden Surfe Elimintion Ojet preision lgorithms: determine whih ojets re in front of others Uses the Pinter s lgorithm drw visile surfes from k (frthest) to front

More information

Computational geometry

Computational geometry Leture 23 Computtionl geometry Supplementl reding in CLRS: Chpter 33 exept 33.3 There re mny importnt prolems in whih the reltionships we wish to nlyze hve geometri struture. For exmple, omputtionl geometry

More information

COMBINATORIAL PATTERN MATCHING

COMBINATORIAL PATTERN MATCHING COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized

More information

12/9/14. CS151 Fall 20124Lecture (almost there) 12/6. Graphs. Seven Bridges of Königsberg. Leonard Euler

12/9/14. CS151 Fall 20124Lecture (almost there) 12/6. Graphs. Seven Bridges of Königsberg. Leonard Euler CS5 Fll 04Leture (lmost there) /6 Seven Bridges of Königserg Grphs Prof. Tny Berger-Wolf Leonrd Euler 707-783 Is it possile to wlk with route tht rosses eh ridge e Seven Bridges of Königserg Forget unimportnt

More information

Distributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems

Distributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems Distriuted Systems Priniples nd Prdigms Mrten vn Steen VU Amsterdm, Dept. Computer Siene steen@s.vu.nl Chpter 11: Distriuted File Systems Version: Deemer 10, 2012 2 / 14 Distriuted File Systems Distriuted

More information

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer

More information

Internet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014.

Internet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014. omputer Networks 9/29/2014 IP Pket Formt Internet Routing Ki Shen IP protool version numer heder length (words) for qulity of servie mx numer remining hops (deremented t eh router) upper lyer protool to

More information

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

Distance Computation between Non-convex Polyhedra at Short Range Based on Discrete Voronoi Regions

Distance Computation between Non-convex Polyhedra at Short Range Based on Discrete Voronoi Regions Distne Computtion etween Non-onvex Polyhedr t Short Rnge Bsed on Disrete Voronoi Regions Ktsuki Kwhi nd Hiroms Suzuki Deprtment of Preision Mhinery Engineering, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku,

More information

Containers: Queue and List

Containers: Queue and List Continers: Queue n List Queue A ontiner in whih insertion is one t one en (the til) n eletion is one t the other en (the he). Also lle FIFO (First-In, First-Out) Jori Cortell n Jori Petit Deprtment of

More information

Comparing Hierarchical Data in External Memory

Comparing Hierarchical Data in External Memory Compring Hierrhil Dt in Externl Memory Surshn S. Chwthe Deprtment of Computer Siene University of Mryln College Prk, MD 090 hw@s.um.eu Astrt We present n externl-memory lgorithm for omputing minimum-ost

More information

Problem Final Exam Set 2 Solutions

Problem Final Exam Set 2 Solutions CSE 5 5 Algoritms nd nd Progrms Prolem Finl Exm Set Solutions Jontn Turner Exm - //05 0/8/0. (5 points) Suppose you re implementing grp lgoritm tt uses ep s one of its primry dt strutures. Te lgoritm does

More information

Chapter 4 Fuzzy Graph and Relation

Chapter 4 Fuzzy Graph and Relation Chpter 4 Fuzzy Grph nd Reltion Grph nd Fuzzy Grph! Grph n G = (V, E) n V : Set of verties(node or element) n E : Set of edges An edge is pir (x, y) of verties in V.! Fuzzy Grph ~ n ( ~ G = V, E) n V :

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

4.3 Balanced Trees. let us assume that we can manipulate them conveniently and see how they can be put together to form trees.

4.3 Balanced Trees. let us assume that we can manipulate them conveniently and see how they can be put together to form trees. 428 T FOU 4.3 Blned Trees T BT GOIT IN T VIOU setion work well for wide vriety of pplitions, ut they hve poor worst-se performne. s we hve noted, files lredy in order, files in reverse order, files with

More information

Minimal Memory Abstractions

Minimal Memory Abstractions Miniml Memory Astrtions (As implemented for BioWre Corp ) Nthn Sturtevnt University of Alert GAMES Group Ferury, 7 Tlk Overview Prt I: Building Astrtions Minimizing memory requirements Performnes mesures

More information

Adjacency. Adjacency Two vertices u and v are adjacent if there is an edge connecting them. This is sometimes written as u v.

Adjacency. Adjacency Two vertices u and v are adjacent if there is an edge connecting them. This is sometimes written as u v. Terminology Adjeny Adjeny Two verties u nd v re djent if there is n edge onneting them. This is sometimes written s u v. v v is djent to nd ut not to. 2 / 27 Neighourhood Neighourhood The open neighourhood

More information

Final Exam Review F 06 M 236 Be sure to look over all of your tests, as well as over the activities you did in the activity book

Final Exam Review F 06 M 236 Be sure to look over all of your tests, as well as over the activities you did in the activity book inl xm Review 06 M 236 e sure to loo over ll of your tests, s well s over the tivities you did in the tivity oo 1 1. ind the mesures of the numered ngles nd justify your wor. Line j is prllel to line.

More information

Asurveyofpractical algorithms for suffix tree construction in external memory

Asurveyofpractical algorithms for suffix tree construction in external memory Asurveyofprtil lgorithms for suffix tree onstrution in externl memory M. Brsky,, U. Stege n A. Thomo University of Vitori, PO Box, STN CSC Vitori, BC, VW P, Cn SUMMAY The onstrution of suffix trees in

More information

Intermediate Information Structures

Intermediate Information Structures CPSC 335 Intermedite Informtion Structures LECTURE 13 Suffix Trees Jon Rokne Computer Science University of Clgry Cnd Modified from CMSC 423 - Todd Trengen UMD upd Preprocessing Strings We will look t

More information

Outline. CS38 Introduction to Algorithms. Graphs. Graphs. Graphs. Graph traversals

Outline. CS38 Introduction to Algorithms. Graphs. Graphs. Graphs. Graph traversals Outline CS38 Introution to Algorithms Leture 2 April 3, 2014 grph trversls (BFS, DFS) onnetivity topologil sort strongly onnete omponents heps n hepsort greey lgorithms April 3, 2014 CS38 Leture 2 2 Grphs

More information

[SYLWAN., 158(6)]. ISI

[SYLWAN., 158(6)]. ISI The proposl of Improved Inext Isomorphi Grph Algorithm to Detet Design Ptterns Afnn Slem B-Brhem, M. Rizwn Jmeel Qureshi Fulty of Computing nd Informtion Tehnology, King Adulziz University, Jeddh, SAUDI

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distriuted Systems Priniples nd Prdigms Christoph Dorn Distriuted Systems Group, Vienn University of Tehnology.dorn@infosys.tuwien..t http://www.infosys.tuwien..t/stff/dorn Slides dpted from Mrten vn Steen,

More information

CS481: Bioinformatics Algorithms

CS481: Bioinformatics Algorithms CS481: Bioinformtics Algorithms Cn Alkn EA509 clkn@cs.ilkent.edu.tr http://www.cs.ilkent.edu.tr/~clkn/teching/cs481/ EXACT STRING MATCHING Fingerprint ide Assume: We cn compute fingerprint f(p) of P in

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

Augmenting Sux Trees, with Applications Yossi Matias 1?, S. Muthukrishnan 2??,Suleyman Cenk Ṣahinalp 3???, and Jacob Ziv 4 y 1 Tel-Aviv University, an

Augmenting Sux Trees, with Applications Yossi Matias 1?, S. Muthukrishnan 2??,Suleyman Cenk Ṣahinalp 3???, and Jacob Ziv 4 y 1 Tel-Aviv University, an Augmenting Sux Trees, with Applitions Yossi Mtis 1?, S. Mhukrishnn??,Suleymn Cenk Ṣhinlp 3???, nd Jo Ziv 4 y 1 Tel-Aviv University, nd Bell Ls, Murry Hill Bell Ls, Murry Hill 3 University ofwrwik nd University

More information

[Prakash* et al., 5(8): August, 2016] ISSN: IC Value: 3.00 Impact Factor: 4.116

[Prakash* et al., 5(8): August, 2016] ISSN: IC Value: 3.00 Impact Factor: 4.116 [Prksh* et l 58: ugust 6] ISSN: 77-9655 I Vlue: Impt Ftor: 6 IJESRT INTERNTIONL JOURNL OF ENGINEERING SIENES & RESERH TEHNOLOGY SOME PROPERTIES ND THEOREM ON FUZZY SU-TRIDENT DISTNE Prveen Prksh* M Geeth

More information

Introduction to Algebra

Introduction to Algebra INTRODUCTORY ALGEBRA Mini-Leture 1.1 Introdution to Alger Evlute lgeri expressions y sustitution. Trnslte phrses to lgeri expressions. 1. Evlute the expressions when =, =, nd = 6. ) d) 5 10. Trnslte eh

More information

Table-driven look-ahead lexical analysis

Table-driven look-ahead lexical analysis Tle-riven look-he lexil nlysis WUU YANG Computer n Informtion Siene Deprtment Ntionl Chio-Tung University, HsinChu, Tiwn, R.O.C. Astrt. Moern progrmming lnguges use regulr expressions to efine vli tokens.

More information

Product of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials

Product of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials Product of polynomils Introduction to Progrmming (in C++) Numericl lgorithms Jordi Cortdell, Ricrd Gvldà, Fernndo Orejs Dept. of Computer Science, UPC Given two polynomils on one vrile nd rel coefficients,

More information

Can Pythagoras Swim?

Can Pythagoras Swim? Overview Ativity ID: 8939 Mth Conepts Mterils Students will investigte reltionships etween sides of right tringles to understnd the Pythgoren theorem nd then use it to solve prolems. Students will simplify

More information

SOFTWARE-BUG LOCALIZATION WITH GRAPH MINING

SOFTWARE-BUG LOCALIZATION WITH GRAPH MINING Chpter 17 SOFTWARE-BUG LOCALIZATION WITH GRAPH MINING Frnk Eihinger Institute for Progrm Strutures nd Dt Orgniztion (IPD) Universit-t Krlsruhe (TH), Germny eihinger@ipd.uk.de Klemens B-ohm Institute for

More information

MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam

MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam Cmrige, Msshusetts Introution to Mtrois n Applitions Srikumr Rmlingm MERL mm//yy Liner Alger (,0,0) (0,,0) Liner inepenene in vetors: v, v2,..., For ll non-trivil we hve s v s v n s, s2,..., s n 2v2...

More information

Presentation Martin Randers

Presentation Martin Randers Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

More information

Applied Databases. Sebastian Maneth. Lecture 13 Online Pattern Matching on Strings. University of Edinburgh - February 29th, 2016

Applied Databases. Sebastian Maneth. Lecture 13 Online Pattern Matching on Strings. University of Edinburgh - February 29th, 2016 Applied Dtses Lecture 13 Online Pttern Mtching on Strings Sestin Mneth University of Edinurgh - Ferury 29th, 2016 2 Outline 1. Nive Method 2. Automton Method 3. Knuth-Morris-Prtt Algorithm 4. Boyer-Moore

More information

COMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator.

COMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator. COMMON FRACTIONS BASIC DEFINITIONS * A frtion is n inite ivision. or / * In the frtion is lle the numertor n is lle the enomintor. * The whole is seprte into "" equl prts n we re onsiering "" of those

More information

Convex Hull Algorithms. Convex hull: basic facts

Convex Hull Algorithms. Convex hull: basic facts CG Leture D Conve Hull Algorithms Bsi fts Algorithms: Nïve, Gift wrpping, Grhm sn, Quik hull, Divide-nd-onquer Lower ound 3D Bsi fts Algorithms: Gift wrpping, Divide nd onquer, inrementl Conve hulls in

More information

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997.

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997. Forced convex n-gons in the plne F. R. K. Chung y University ofpennsylvni Phildelphi, Pennsylvni 19104 R. L. Grhm AT&T Ls - Reserch Murry Hill, New Jersey 07974 Mrch 2,1997 Astrct In seminl pper from 1935,

More information

Approximate Joins for Data Centric XML

Approximate Joins for Data Centric XML Approximte Joins for Dt Centri XML Nikolus Augsten 1, Mihel Böhlen 1, Curtis Dyreson, Johnn Gmper 1 1 Fulty of Computer Siene, Free University of Bozen-Bolzno Dominiknerpltz 3, Bozen, Itly {ugsten,oehlen,gmper}@inf.uniz.it

More information

Geometric Algorithms. Geometric Algorithms. Warning: Intuition May Mislead. Geometric Primitives

Geometric Algorithms. Geometric Algorithms. Warning: Intuition May Mislead. Geometric Primitives Geometri Algorithms Geometri Algorithms Convex hull Geometri primitives Closest pir of points Voronoi Applitions. Dt mining. VLSI design. Computer vision. Mthemtil models. Astronomil simultion. Geogrphi

More information

Tabu Split and Merge for the Simplification of Polygonal Curves

Tabu Split and Merge for the Simplification of Polygonal Curves Proeedings of the 2009 IEEE Interntionl Conferene on Systems, Mn, nd Cybernetis Sn Antonio, TX, USA - Otober 2009 Tbu Split nd Merge for the Simplifition of Polygonl Curves Gilds Ménier VALORIA, Université

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

CS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

CS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string. CS 340, Fll 2016 Sep 29th Exm 1 Nme: Note: in ll questions, the speil symol ɛ (epsilon) is used to indite the empty string. Question 1. [10 points] Speify regulr expression tht genertes the lnguge over

More information

c s ha2 c s Half Adder Figure 2: Full Adder Block Diagram

c s ha2 c s Half Adder Figure 2: Full Adder Block Diagram Adder Tk: Implement 2-it dder uing 1-it full dder nd 1-it hlf dder omponent (Figure 1) tht re onneted together in top-level module. Derie oth omponent in VHDL. Prepre two implementtion where VHDL omponent

More information

Image Compression based on Quadtree and Polynomial

Image Compression based on Quadtree and Polynomial Interntionl Journl of Computer Applitions (0975 8887 Imge Compression sed on Qudtree nd Polynomil Ghdh Al-Khfj Ph.D Dept. of Computer Siene, Bghdd University, College of Siene. ABSTRACT In this pper, n

More information

Internet Routing. Reminder: Routing. CPSC Network Programming

Internet Routing. Reminder: Routing. CPSC Network Programming PS 360 - Network Progrmming Internet Routing Mihele Weigle eprtment of omputer Siene lemson University mweigle@s.lemson.eu pril, 00 http://www.s.lemson.eu/~mweigle/ourses/ps360 Reminer: Routing Internet

More information

Shared Memory Architectures. Programming and Synchronization. Today s Outline. Page 1. Message passing review Cosmic Cube discussion

Shared Memory Architectures. Programming and Synchronization. Today s Outline. Page 1. Message passing review Cosmic Cube discussion Tody s Outline Arhitetures Progrmming nd Synhroniztion Disuss pper on Cosmi Cube (messge pssing) Messge pssing review Cosmi Cube disussion > Messge pssing mhine Shred memory model > Communition > Synhroniztion

More information

Using SIMD Registers and Instructions to Enable Instruction-Level Parallelism in Sorting Algorithms

Using SIMD Registers and Instructions to Enable Instruction-Level Parallelism in Sorting Algorithms Using SIMD Registers n Instrutions to Enle Instrution-Level Prllelism in Sorting Algorithms Timothy Furtk furtk@s.ulert. José Nelson Amrl mrl@s.ulert. Roert Niewiomski niewio@s.ulert. Deprtment of Computing

More information

Line The set of points extending in two directions without end uniquely determined by two points. The set of points on a line between two points

Line The set of points extending in two directions without end uniquely determined by two points. The set of points on a line between two points Lines Line Line segment Perpendiulr Lines Prllel Lines Opposite Angles The set of points extending in two diretions without end uniquely determined by two points. The set of points on line between two

More information

ASTs, Regex, Parsing, and Pretty Printing

ASTs, Regex, Parsing, and Pretty Printing ASTs, Regex, Prsing, nd Pretty Printing CS 2112 Fll 2016 1 Algeric Expressions To strt, consider integer rithmetic. Suppose we hve the following 1. The lphet we will use is the digits {0, 1, 2, 3, 4, 5,

More information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Adm Sheffer. Office hour: Tuesdys 4pm. dmsh@cltech.edu TA: Victor Kstkin. Office hour: Tuesdys 7pm. 1:00 Mondy, Wednesdy, nd Fridy. http://www.mth.cltech.edu/~2014-15/2term/m006/

More information

PARALLEL AND DISTRIBUTED COMPUTING

PARALLEL AND DISTRIBUTED COMPUTING PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce

More information

1.5 Extrema and the Mean Value Theorem

1.5 Extrema and the Mean Value Theorem .5 Extrem nd the Men Vlue Theorem.5. Mximum nd Minimum Vlues Definition.5. (Glol Mximum). Let f : D! R e function with domin D. Then f hs n glol mximum vlue t point c, iff(c) f(x) for ll x D. The vlue

More information

Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST

Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST Suffi Trees Outline Introduction Suffi Trees (ST) Building STs in liner time: Ukkonen s lgorithm Applictions of ST 2 3 Introduction Sustrings String is ny sequence of chrcters. Sustring of string S is

More information

IMAGE COMPRESSION USING HIRARCHICAL LINEAR POLYNOMIAL CODING

IMAGE COMPRESSION USING HIRARCHICAL LINEAR POLYNOMIAL CODING Rsh Al-Tmimi et l, Interntionl Journl of Computer Siene nd Mobile Computing, Vol.4 Issue.1, Jnury- 015, pg. 11-119 Avilble Online t www.ijsm.om Interntionl Journl of Computer Siene nd Mobile Computing

More information

On Compact Directed Acyclic Word Graphs

On Compact Directed Acyclic Word Graphs On Compt Direted Ayli Word Grphs Mxime Crohemore, Renud Vérin To ite this version: Mxime Crohemore, Renud Vérin. On Compt Direted Ayli Word Grphs. Myielski J., Rozenerg G., Slom A. Strutures in Logi nd

More information

Consistent Mesh Parameterizations

Consistent Mesh Parameterizations Sumitted for pulition, Jnury 2001 Consistent Mesh Prmeteriztions Emil Prun Prineton Wim Sweldens Bell Ls Peter Shröder Bell Ls + + + + + + + = Figure 1: When given set of hed models n ovious shpe to ompute

More information

Structure in solution spaces: Three lessons from Jean-Claude

Structure in solution spaces: Three lessons from Jean-Claude Struture in solution spes: Three lessons from Jen-Clue Dvi Eppstein Computer Siene Deprtment, Univ. of Cliforni, Irvine Conferene on Meningfulness n Lerning Spes: A Triute to the Work of Jen-Clue Flmgne

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it. 6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted

More information

Quadrilateral and Tetrahedral Mesh Stripification Using 2-Factor Partitioning of the Dual Graph

Quadrilateral and Tetrahedral Mesh Stripification Using 2-Factor Partitioning of the Dual Graph The Visul omputer mnusript No. (will e inserted y the editor) Plo Diz-Gutierrez M. Gopi Qudrilterl nd Tetrhedrl Mesh Stripifition Using 2-Ftor Prtitioning of the Dul Grph strt In order to find 2-ftor of

More information

and vertically shrinked by

and vertically shrinked by 1. A first exmple 1.1. From infinite trnsltion surfe mp to end-periodi mp. We begin with n infinite hlf-trnsltion surfe M 0 desribed s in Figure 1 nd n ffine mp f 0 defined s follows: the surfe is horizontlly

More information

Geometrical reasoning 1

Geometrical reasoning 1 MODULE 5 Geometril resoning 1 OBJECTIVES This module is for study y n individul teher or group of tehers. It: looks t pprohes to developing pupils visulistion nd geometril resoning skills; onsiders progression

More information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Instructor: Adm Sheffer. TA: Cosmin Pohot. 1pm Mondys, Wednesdys, nd Fridys. http://mth.cltech.edu/~2015-16/2term/m006/ Min ook: Introduction to Grph

More information

Agilent G3314AA BioConfirm Software

Agilent G3314AA BioConfirm Software Agilent G3314AA BioConfirm Softwre Quik Strt Guide Use this guide to instll nd get strted with the BioConfirm softwre. Wht is BioConfirm Softwre? Agilent G3314AA BioConfirm Softwre lets you onfirm the

More information

Research Article Determining Sensor Locations in Wireless Sensor Networks

Research Article Determining Sensor Locations in Wireless Sensor Networks Interntionl Journl of Distriuted Sensor Networks Volume 2015, Artile ID 914625, 6 pges http://dx.doi.org/10.1155/2015/914625 Reserh Artile Determining Sensor Lotions in Wireless Sensor Networks Zimo Li

More information

Introducing fractions

Introducing fractions Introduing frtions Nme Colour hlf of eh shpe: Show the following fr ons: out of out of out of Lel these fr ons: Shde these fr ons: 7 0 Represents ommon fr ons on different models Interprets the numertor

More information

Calculus Differentiation

Calculus Differentiation //007 Clulus Differentition Jeffrey Seguritn person in rowot miles from the nerest point on strit shoreline wishes to reh house 6 miles frther down the shore. The person n row t rte of mi/hr nd wlk t rte

More information

Design Space Exploration for Massively Parallel Processor Arrays

Design Space Exploration for Massively Parallel Processor Arrays In Proeedings of the Sixth Interntionl Conferene on Prllel Computing Tehnologies (PCT-2001), Novosiirsk, Russi, Septemer 3-7, 2001. Volume 2127 of Leture Notes in Computer Siene (LNCS), pp. 51-65, Springer-Verlg,

More information

High-speed architectures for binary-tree based stream ciphers: Leviathan case study

High-speed architectures for binary-tree based stream ciphers: Leviathan case study High-speed rhitetures for inry-tree sed strem iphers: Levithn se study Astrt Rel-time pplitions suh s streming medi nd voie require enryption lgorithms tht do not propgte errors nd support fst enryption

More information

ZZ - Advanced Math Review 2017

ZZ - Advanced Math Review 2017 ZZ - Advnced Mth Review Mtrix Multipliction Given! nd! find the sum of the elements of the product BA First, rewrite the mtrices in the correct order to multiply The product is BA hs order x since B is

More information