知识卡片
变换末列的重复字符按次序赋秩
求BWT逆变换时,按字符的字典序给末列每个出现位置唯一秩;同一个字符的后续出现,秩比前一次大1。这保留了重复字符在末列中的相对次序,可对应到排序旋转的首列。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 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