知识卡片

普通读书笔记卡 · 3709.b

变换末列的重复字符按次序赋秩

理解等级:中级

求BWT逆变换时,按字符的字典序给末列每个出现位置唯一秩;同一个字符的后续出现,秩比前一次大1。这保留了重复字符在末列中的相对次序,可对应到排序旋转的首列。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第32章 字符串匹配 · 查看原书依据

      Each character in the BWT has a unique lexicographic rank from 1 to n. Denote the rank of BWT[i] by rank[i]. If a character appears multiple times in the BWT, each instance of the character has a rank 1 greater than the previous instance of the character. Here are BWT and rank for rutabaga: For example, rank[1] = 2 because BWT[1] = a and the only character that precedes the first a lexicographically is $ (which we defined to precede all other characters, so that $ has rank 1). Next, we have rank[2] = 6 because BWT[2] = g and five characters in the BWT precede g lexicographically: $, the three instances of a, and b. Jumping ahead to rank

    参考来源

    - 位置:《算法导论(第4版)》第32章《字符串匹配》(OEBPS/chapter032.xhtml,文本字符[95000,100000))。 - 结论依据:原文章末问题32-2给出的构造步骤、问题32-3给出的BWT定义及逆变换说明,或章末脚注。 - 原始内容:Each character in the BWT has a unique lexicographic rank from 1 to n . Denote the rank of BWT [ i ] by rank [ i ]. If a character appears multiple times in the BWT, each instance of the character has a rank 1 greater than the previous instance of the character. Here are BWT and rank for rutabaga : For example, rank [1] = 2 because BWT [1] = a and the only character that precedes the first a lexicographically is $ (which we defined to precede all other characters, so that $ has rank 1). Next, we have rank [2] = 6 because BWT [2] = g and five characters in the BWT precede g lexicographically: $ , the three instances of a , and b . Jumping ahead to rank